Wednesday, December 18, 2013

Expanding a FREENAS ZFS volume by drive replacement

Freenas is a great NAS solution especially given the price and the hardware of other NAS solutions; Freenas offers the best performance, expandability, value and flexibility in a NAS solution.  Freenas can provide NFS, Samba and Apple shares so the platform you want to use really doesn't matter what the client machine is.

Just reciently I've found my self down to 100GB of my 6.4 TB NAS and decided it was time to upgrade my storage space.  Now upgrading storage space on freenas isn't as simple as just replacing a bunch of drives; you must replace them one at a time and you wait for the drive to be completely replaced (resilvered) before replacing another drive otherwise you risk data corruption or loss.  By default the auto grow is set to off so if you want to grow the space on your nas you must enable the auto expand feature in freenas.  As always you should have another backup of this data.

So on your FreeNAS server you want to login via SSH or use the shell console provided in the web interface.  Type the following command.

zpool set autoexpand = on {your volume name}

Once that is enabled you may now grow your freenas storage by replacing drives.  As for myself I've replaced 4 320GB drives with 4 1TB drives moving my NAS from 6.4 GB to 8.3GB of storage space and to replace the drives it is a daily process with replacing a drive once a day until they are done.

Thursday, December 12, 2013

Backing up your Android Phone's Stock Rom and Recovery

Backing up your Android Phone's Stock Rom and Recovery

Have you ever wanted to mod your new android phone but wanted a way to get back to the factory settings without having to mod the phone first?  It is possible to do but you need a few things, the Android Dev tools, fast boot, and some command line know how.  For this example I will be using a HTC One X on the Telus Network.

With HTC you have to get a developer token which can be obtained from  You will have to sign up as a dev to get your developer token.  HTC has a great tutorial on how to unlock your bootloader on the htcdev site.
Once your bootloader is unlocked you can now download a 3rd party rom manager (don't worry we are just going to boot off it; were not installing it yet - also make sure you have enabled USB Debugging in the developer tools).  I used TWRP, it is more compatible with my device then clockworkmod is.  Once downloaded (I renamed the downloaded rom manager to recovery.img) and moved it into my fastboot directory on my computer.

Here is a look at the fastboot directory on my computer

Now the fun can begin; make sure you have all the files you need in the directory your working out of, in my case the fastboot directory.  Your phone should be plugged in via usb to your computer then I used adb to reboot my phone into the bootloader

C:\fastboot>adb reboot bootloader

Then I booted off the recovery.img file in my fastboot directory.

C:\fastboot>fastboot boot recovery.img

Then your phone should boot off the custom recovery rom without installing it.  Then you can make a backup using the recovery rom.  Once done reboot into the phone's system and load a file manager like ES File Explorer to get the files off using dropbox or some other means.

Now you have a backup of your stock phone and you can now mod your phone to your heart's content.

Update:  I forgot to mention that with HTC you also have to update your boot.img file using the commandline interface.  To get the boot.img file you can get it by extracting it from your backup or the zip file from your thrid party rom like cyanogenmod.

C:\fastboot>fastboot flash boot boot.img

How to fix CURL call imporitng an RSS feed on a site blocking CURL calls

There is a 3rd party service provider that my organization uses called bibliocommons.  They have these nice book carousels.  However the car...