Wednesday, May 25, 2011

unRAID USB boot drive creation using Windows

1. Download which ever version of unRAID you like from the Lime Tech download page

2. Download the version of UNetbootin for your operating system from here

3. Go to the folder that has the version of unRAID you downloaded from step one. If you downloaded version 4.7 the filename would be "unRAID Server 4.7 AiO.zip"


Make a copy of the downloaded unRAID file and change the name to "unRAID Server 4.7 AiO.iso" Note the ISO ending


4. If you are on a Windows machine you will need to click the Windows logo button and then "Computer".  I am running Windows 7 so if you are on previous versions of Windows you may need to click on the "Start" button and then "My Computer". You should see your flash drive listed. In the photo below mine is listed as USB_DRIVE (E:)









5. Right click on the drive and select Format. The window below should appear


































6. Set the values to:

  • FAT32 for the File System
  • 4096 bytes for the Allocation unit size
  • UNRAID (all caps) for the Volume label
  • Quick Format for the Format options

7. Press the Start button and allow the format to take place.  NOTE: this will wipe all data off the drive as the below message states:













8. Once the process is finished you can close the Format window.  You should have a drive that looks like this in Explorer










9. Launch UNetbootin and allow UNetbootin to run.

10. You should then see the UNetbootin window

11. Select the Diskimage and set the values:

  • ISO from the dropdown
  • the "unRAID Server 4.7 AiO.iso" as the image
  • Type: USB Drive
  • Drive: E:\ - the listing here may be a little different. I suggest doing this step with only ONE USB drive plugged in























13. Click OK





















14. If you get any messages about over writing any files that exist just say "Yes to all"


15. Once the process is complete you can close the UNetbootin application


16. We can now delete some files from the UNRAID flash drive.  If you want to clean the flash drive off a little and give yourself as much room on there as possible you can delete the:

  • make_bootable.bat
  • syslinux.exe
  • ubnfilel.txt
  • ubnpathl.txt
  • readme.txt - leave if you want to
  • license.txt - leave if you want to
17. Now you can safely eject the unRAID flash drive from your machine and use it to boot your unRAID server.

NOTES:
1. On my Windows 7 machine I have UAC (User Account Control) settings turned all the way down.  I am not sure if the default settings, which are higher then mine, will cause any problems.  If you find the process is not working, turn UAC down from within Control Panel -> User Accounts.





Thursday, May 19, 2011

unRAID USB boot drive creation using OS X

1. Download which ever version of unRAID you like from the Lime Tech download page

2. Download the version of UNetbootin for your operating system from here

3. Go to the folder that has the version of unRAID you downloaded from step one. If you downloaded version 4.7 the filename would be "unRAID Server 4.7 AiO.zip"




Make a copy of the downloaded unRAID file and change the name to "unRAID Server 4.7 AiO.iso" Note the ISO ending




4. If you are on a Mac machine launch Disk Utility (located in Applications/Utilities) and you should see your flash drive listed.  In the photo below mine is listed as a 1GB Kingston DataTraveler 2.0 Media





























5. Select the drive from the left pane (disregard the OPENELEC name listed below the Kingston DataTraveler part)


























6. Select the Erase tab from the right hand side and set the values to:

  • MS-DOS (FAT) as the format
  • UNRAID (all capitals) as the Name


























7. Press the Erase button

8. Once the process is finished you can close the Disk Utility window

9. Launch UNetbootin and enter your password to allow UNetbootin to run the appleScript it contains















10. You should then see the UNetbootin window

























11. Select the Diskimage and set the values:

  • ISO from the dropdown
  • the "unRAID Server 4.7 AiO.iso" as the image
  • Type: USB Drive
  • Drive: /dev/disk1s1  <- the listing here may be a little different.  I suggest doing this step with only ONE USB drive plugged in




13. Click OK
























14. If you get any messages about over writing any files that exist just say "Yes to all"

15. Once the process is complete you can close the UNetbootin application

16. We can now delete some files from the UNRAID flash drive.  If you want to clean the flash drive off a little and give yourself as much room on there as possible you can delete the:
  • make_bootable.bat
  • syslinux.exe
  • ubnfilel.txt
  • ubnpathl.txt
  • readme.txt <- leave if you want to
  • license.txt <- leave if you want to
17. Now you can safely eject the unRAID flash drive from your machine and use it to boot your unRAID server.





Sunday, February 20, 2011

How To preclear your hard drives for use in your unRAID servers

In this How To I am going to cover basic preclear_disk.sh usage and why you should use it on every disk before adding it to your unRAID array.

First and formost I would like to thank Joe L. of the unRAID forums.  All credit goes to him for this hard drive testing and clearing utility.
The newest version of preclear_disk.sh is located bottom of this post (direct link) <- you will only be able to download the preclear_disk.sh if you have a free account on the unRAID forums.

First, the reasons to use preclear_disk.sh and my attempt to clear up some confusion.
If you are just setting up a new unRAID server I suggest using the most current stable version which as of this writing is unRAID 4.7. There is one setting that needs to be changed on the Settings page of unRAID that will be of benefit for any drives that are added to your unRAID server from this point forward.

On the Settings page go to the "Disk Settings" section and set "Default partition format" to "MBR: 4K-aligned"















OK, now that that is cleared up I can move on to the real meat of this post.
First I suggest downloading the newest version of the preclear_disk.sh from the link above.  From there copy preclear_disk.sh to the flash drive of you server.  You can do this by shutting down the unRAID server, pulling the flash drive, and then transferring the file over to it.  Then you can move the flash drive back to the unRAID server and boot it back up.  You can also transfer the preclear_disk.sh file to the flash drive over the network.  You can connect to the share so long as you have it set to "Export Read/Write" on the "Shares" page on the unRAID webGUI.  Once you are connected to the share just copy the file over.













Once the file is on the flash drive and the server is up and running you are ready to use preclear_disk.sh!!

There are a couple of different ways to run preclear but for the sake of keeping things simple to start I will limit this post to one way.  (Look for the other ways to run preclear_disk.sh in later posts!!)
For this post I will describe how to run preclear through a telnet session.  If you are using a Windows computer I suggest downloading PuTTY (documentation), if you are using a Mac then you can use Terminal (located in the Applications/Utilities folder).

Once you are ready you will need to telnet into the unRAID server.  From your computer open Terminal/PuTTY and type "telnet IP_ADDRESS_OF_SERVER" to connect to the unRAID server.  It will ask you for a password, just hit enter, then it will ask for a login, just type "root" to get to the command prompt where it reads "root@Tower:~#".

There are many many options for preclear_disk.sh that you can view and look through by typing:
/boot/preclear_disk.sh -?
You will not need to use all of these options and I will cover the ones that need to be used for a new unRAID setup based on version 4.7.

Now type:
/boot/preclear_disk.sh -l
You will see an output of something similar to this that will list all the disks that are able to be precleared:









So now that we have the listing of the drives that are available for clearing we can proceed.  From this point forward you will need to make sure that you are about to clear the drive you actually want to clear!!  If there are any drives not in the array they will be listed by using the above command and you have the potential to wipe ALL DATA off the drive should you use preclear_disk.sh on it.

Now pick the drive you want to preclear from the ones listed by the above command and type:
/boot/preclear_disk.sh -A /dev/hdb
OR
/boot/preclear_disk.sh -a /dev/hdb
The difference between the -A and -a switch is in regard to how the drive is set up for use in unRAID.  For version 4.7 and later (including version 5.0-beta3 and later) you will want to use the -A option for all drives EXCEPT for Western Digital Green drives that have a jumper installed on pins 7 and 8 (if the drives are Western Digital Green drives with a jumper then use the -a option instead).
The hdb part will be different depending on your server configuration.  It could be hda, hdb, hdc,... or sda, sdb, sdc,...
If the -A or -a option is left off the above command will use the default setting of the "Default partition format" from above. "MBR: 4K aligned" is the same as using the -A option, and "MBR: unaligned" is the same as using the -a option.

The above commands will run the preclear for 1 complete pass on a drive.  For a 2TB drive this can take 25+ hours to complete. When you run the above command you should end up with a screen similar to this:






You will need to answer "Yes" (Capital Y and lowercase es).















After you answer Yes you will be presented with a screen that looks like this:




This screen will update as the progress of the preclear_disk.sh script does its thing.













Here it is on step 2 of 10























There are 10 steps to the preclear_disk.sh process and below is the script on the final step:




















After the script is finished you will get a screen that looks something like this:

































One of the benefits of using this newest version of preclear_disk.sh is the "preclear_reports" folder that it creates on the flash drive.  Inside that folder is the start report, finish report, and final report produced by preclear_disk.sh.  The final report will be what you need to look at to understand the health of your drive.  It is much more understandable for new and inexperienced users.  If you do have any questions about the final report feel free to post the file in the preclear_disk.sh results thread.

Now for a few notes on preclear_disk.sh:
1. If you start a preclear_disk.sh session via the above instructions you will need to disable any settings on your Windows or Mac computer that would make it go to sleep/hibernate.  You can leave the screen saver enabled but the Windows/Mac machine must not be allowed to sleep/hibernate.  If it is allowed to sleep/hibernate then the preclear_disk.sh task that is running will be cancelled.
2. It is not necessary to use preclear on a drive but it does thoroughly test the drive to make sure it is working properly.
3. If you do not preclear the drive the unRAID array will be offline during its clearing process, meaning you can not get to your media files, for as long as it takes the drive to be cleared by unRAID itself (that could be 8+ hours).
4. There is a "-c" option that will clear a drive for a certain number of cycles.  If you wanted to clear the drive 3 times one right after the other you could type this:
/boot/preclear_disk.sh -A -c 3 /dev/hdb
5. There are many more options that can be specified and used though I will not go into them for this post.

And last but not least a few warnings:
1. This utility is not supported by Tom at Lime-Technology.
2. It is possible for you to clear a disk you did not intend...(if you have multiple disks that have data installed in your server, but they are not assigned to your array, and you want to clear one, but not the other, and you give the wrong device, it will be the wrong disk cleared...  If you do, sorry... I tried to protect you from yourself.  Do be careful.