March 3, 201016 yr I have a need to format unRAID drives outside unRAID. Ideally this would be under Ubuntu via a usb>SATA2 cradle. The reasons i need this are long and convoluted but principally due to the fact new drives and delivered and filled to an alternate location before they come to me. This location is geographically far away from me but i do have root SSH access. Can anyone suggest the correct means to format drives on an Ubuntu system for direct later insertion into an unRAID array?
March 3, 201016 yr I have a need to format unRAID drives outside unRAID. Ideally this would be under Ubuntu via a usb>SATA2 cradle. The reasons i need this are long and convoluted but principally due to the fact new drives and delivered and filled to an alternate location before they come to me. This location is geographically far away from me but i do have root SSH access. Can anyone suggest the correct means to format drives on an Ubuntu system for direct later insertion into an unRAID array? Joe L.'s preclear_disk script came to mind. It was interesting to see if it would run, and do the job on a different Linux. So I fired up Ubuntu, telneted into it and became root, then ran the preclear_disk script against a brand new disk. It ran all the way, but it spit quite a few errors along the way... dd: writing `/dev/sdd': No space left on device ./preclear_disk.sh: line 324: let: bw=(dd: * 100): missing `)' (error token is ": * 100)") ./preclear_disk.sh: line 325: let: percent_wrote=( / 79691776): syntax error: operand expected (error token is "/ 79691776)") ./preclear_disk.sh: line 327: [: -gt: unary operator expected awk: line 13: function strtonum never defined ./preclear_disk.sh: line 1039: /etc/rc.d/rc.udev: No such file or directory ./preclear_disk.sh: line 277: smartctl: command not found ============================================================================ == == SORRY: Disk /dev/sdd MBR could NOT be precleared == == out4= 00092 == out5= 00092 ============================================================================ I suppose -- with some modifications -- you could make that script run on Ubuntu.
March 3, 201016 yr I have a need to format unRAID drives outside unRAID. Ideally this would be under Ubuntu via a usb>SATA2 cradle. The reasons i need this are long and convoluted but principally due to the fact new drives and delivered and filled to an alternate location before they come to me. This location is geographically far away from me but i do have root SSH access. Can anyone suggest the correct means to format drives on an Ubuntu system for direct later insertion into an unRAID array? Joe L.'s preclear_disk script came to mind. It was interesting to see if it would run, and do the job on a different Linux. So I fired up Ubuntu, telneted into it and became root, then ran the preclear_disk script against a brand new disk. It ran all the way, but it spit quite a few errors along the way... dd: writing `/dev/sdd': No space left on device ./preclear_disk.sh: line 324: let: bw=(dd: * 100): missing `)' (error token is ": * 100)") ./preclear_disk.sh: line 325: let: percent_wrote=( / 79691776): syntax error: operand expected (error token is "/ 79691776)") ./preclear_disk.sh: line 327: [: -gt: unary operator expected awk: line 13: function strtonum never defined ./preclear_disk.sh: line 1039: /etc/rc.d/rc.udev: No such file or directory ./preclear_disk.sh: line 277: smartctl: command not found ============================================================================ == == SORRY: Disk /dev/sdd MBR could NOT be precleared == == out4= 00092 == out5= 00092 ============================================================================ I suppose -- with some modifications -- you could make that script run on Ubuntu. From what I see in the errors you listed, the version of "awk" on the ubuntu release you used does not contain the strtonum function. Without it you will never get the preclear script to write the MBR. Also, smartctl does not seem to exist. By far the easiest way to remotely partition and format the drives is to boot up the free version of unRAID. Do not assign a parity drive, all you need do is assign a data drive and to start the array. It will then present a "Format" button for the disk. Once formatted you can un-assign it and then write to it as needed. Joe L.
March 3, 201016 yr Author Unfortunately the server i can use is at a clients and is online 24*7 for business purposes. I suppose i could request to install a new server but thats quite a bit of investment to overcome a problem with formatting. Using preclear would be bloody perfect if we could make it work?
March 3, 201016 yr Could you get the free version of unRAID running in a VM and then connect the disk? I think that should be possible (though I have not tried it) to do and then you could use the preclear script from there.
March 3, 201016 yr The problem is not just the pre-clearing. preclear_disk.sh just sets up the partition table and completely zeros the rest of the drive. It does not "format" the drive with a file-system. Therefore, even if you pre-clear it, it will not be writable. Also, unless the remote user is a Linux based server, it will not be able to write to the new drive as windows has no drivers for reiserfs that are "writable" (all that exist are read-only) If they are a linux server, you can use the script I posted here: http://lime-technology.com/forum/index.php?topic=5072.msg47122#msg47122 to partition the disk without clearing it. It just writes the first 512 bytes on the disk to partition it properly. You would still need to create a file-system on the partition by running: mkreiserfs /dev/XXX on the disk to create the file-system. Note the alternative script still needs a version of "awk" that is compatible. (You might be able to modify it to use "gawk" if that is different on the ubuntu OS. The "awk" on unRAID is actually "gawk" ) If your remote user is Windows based, have them format the disks as NTFS and write them in that format. After they ship the drives to you, you can mount the NTFS drive on your server and then copy the contents to the protected array on your server. Joe L.
March 3, 201016 yr You have considered the fact that each time you install one of the new "unRAID ready" drives into an existing unRAID array that you have to dump the parity protection and re-calculate it? Each time a drive is added this way the array will be unprotected until the parity is recalculated. It really would be better to mount the drive outside of the array and copy the data over. Peter
March 3, 201016 yr You have considered the fact that each time you install one of the new "unRAID ready" drives into an existing unRAID array that you have to dump the parity protection and re-calculate it? Each time a drive is added this way the array will be unprotected until the parity is recalculated. It really would be better to mount the drive outside of the array and copy the data over. ...which brings us to what Joe suggested above, the format doesn't have to be reiserfs ala unraid, it can be pretty much anything.
March 3, 201016 yr Author You have considered the fact that each time you install one of the new "unRAID ready" drives into an existing unRAID array that you have to dump the parity protection and re-calculate it? Each time a drive is added this way the array will be unprotected until the parity is recalculated. It really would be better to mount the drive outside of the array and copy the data over. Peter Yup i could do that but its another step which when you consider it is not unique data that can be replaced with another drive it justs slicker to do it direct. Another option is i just buy 10 or so drives, deliver them here, format then reship but thats about a years worth of up front investment. Ok its not the end of the world money wise but again its spending money instead of just formatting. I realsie i could just ext4 them (or whatever ubuntus default is these days) and copy via the network but theres an elegance to doing this the direct route that appeals to me
March 3, 201016 yr Will they be using a linux computer to write the drives? I'd try to get the unraid_partition_disk.sh script running. If they are all identically the same size and geometry, you could just copy the first 512 bytes of one you've partitioned in your server to the first 512 bytes in an identical size drive. (You could use "dd" for that and only write 512 bytes) That would "magically" get the partitioning. Then you just need to use mkreiserfs to create the file-system in the first partition.
Archived
This topic is now archived and is closed to further replies.