[SATLUG] Does my HDD raid setup need improvement?

Samuel Leon satlug at net153.net
Sun Oct 19 16:07:34 CDT 2008


Michael Lloyd wrote:
> My current computer set up is:
> 
> Hardware
> CPU = Intel Q6600 @ 3.2ghz -- idles at 31c
> Mobo = EVGA 122-CK-NF68-A1 LGA 775 NVIDIA nForce 680i SLI ATX
> Mem = 4gb (4x1) DDR2 800mhz ( pair of CORSAIR XMS2 and PNY XLR8)
> GPU = Nvidia 8800 GTS 640mb -- 54c
> HDD = Raid 0 -- HITACHI Deskstar 7K1000 750GB 7200 RPM 32MB Cache SATA
> 3.0Gb/s Hard Drive  -- 29c
> HDD  = back up SAMSUNG SpinPoint T Series 500GB 7200 RPM 16MB Cache
> SATA 3.0Gb/s Hard Drive -- 21c
> CPU Cooler = After market air cooler -- ZEROtherm Nirvana NV120 120mm
> Case = Antec Nine Hundred
> 
> Software
> Dual Boot Winblows Ulimate x64 & Ubuntu 8.04 x64
> Ubuntu is the only OS in Raid 0.
> 
> When originally installing Windblows, it BSOD with raid(mobo fake
> raid), 4 sticks of ram, and GPU driver.   When
> installing had to remove raid and ram sticks to update OS first; then
> had to update GPU driver;  Could not get it to boot other wise.
> 
> I don't think my setup is best.   Using linux software raid.  I would
> like to have performance and back up on my HDD's.  I didn't go with
> raid 5 cause I don't know how to restore in case failure occurs.  I
> manually copy files onto the 500gb spare drive; I tried sbackup app
> not working right as far as I can tell.  Does my set up need
> improvement?  What do you guys recommend?  I would like performance.
> I am willing to spend a few bucks to make improvements (add HDD's) if
> necessary.
> 
> 2 -750gb are partitioned --  500gb off of each for raid 0, 50mb off of
> each for boot (wouldn't let me have it in raid 0), 250 gb off one for
> Vista, and a 250gb blank ext3.
> 1 500GB is my manual backup.
> 
> 
> mike at ubuntu:~$ sudo fdisk -l
> [sudo] password for mike:
> 
> Disk /dev/sda: 750.1 GB, 750156374016 bytes
> 255 heads, 63 sectors/track, 91201 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Disk identifier: 0x936d138a
> 
>   Device Boot      Start         End      Blocks   Id  System
> /dev/sda1               1       31865   255955581   83  Linux
> /dev/sda2   *       91196       91201       48195   fd  Linux raid autodetect
> /dev/sda3           31866       91195   476568225   fd  Linux raid autodetect
> 
> Partition table entries are not in disk order
> 
> Disk /dev/sdb: 750.1 GB, 750156374016 bytes
> 255 heads, 63 sectors/track, 91201 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Disk identifier: 0xd952c54c
> 
>   Device Boot      Start         End      Blocks   Id  System
> /dev/sdb1   *           1       31871   256000000    7  HPFS/NTFS
> /dev/sdb2           91196       91201       48195   fd  Linux raid autodetect
> /dev/sdb3           31872       91195   476520030   fd  Linux raid autodetect
> 
> Partition table entries are not in disk order
> 
> Disk /dev/sdc: 500.1 GB, 500107862016 bytes
> 255 heads, 63 sectors/track, 60801 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Disk identifier: 0x9f91ce44
> 
>   Device Boot      Start         End      Blocks   Id  System
> /dev/sdc1               1       60801   488384001   83  Linux
> 
> Disk /dev/md1: 49 MB, 49283072 bytes
> 2 heads, 4 sectors/track, 12032 cylinders
> Units = cylinders of 8 * 512 = 4096 bytes
> Disk identifier: 0x00000000
> 
> Disk /dev/md1 doesn't contain a valid partition table
> 
> Disk /dev/md0: 975.9 GB, 975962177536 bytes
> 2 heads, 4 sectors/track, 238272016 cylinders
> Units = cylinders of 8 * 512 = 4096 bytes
> Disk identifier: 0x00000000
> 
> Disk /dev/md0 doesn't contain a valid partition table


I guess as you know, raid is not a form of backup.  Your setup does not 
look bad.  Someone correct me if I am wrong, but raid0 is not always the 
fastest.  It is really only good at reading and writing very large files 
(like for video editing, etc).  Raid1 is slow at writing but the reads 
to each file are interlaced between the drives, ie if you request 2 or 
more files to be read at the same time, one will be read from sda and 
the other from sdb.  This can be verified by using the speed benchmark 
test of hdparm.

First run the 2 speed tests simultaneously against a raid1 device:

betty:~# hdparm -t /dev/md0 & hdparm -t /dev/md0

/dev/md0:
Timing buffered disk reads: 222 MB in  3.00 seconds =  73.94 MB/sec
/dev/md0:
Timing buffered disk reads: 222 MB in  3.03 seconds =  73.35 MB/sec


And then do the same test against a block device from the raid1:

betty:~# hdparm -t /dev/sda & hdparm -t /dev/sda

/dev/sda:
  Timing buffered disk reads:  140 MB in  3.01 seconds =  46.46 MB/sec
/dev/sda:
  Timing buffered disk reads:  140 MB in  3.12 seconds =  44.94 MB/sec

So as you can see from the first test, the raid device md0 obviously 
sent each one of the 2 read requests to a separate drive.  I don't have 
a raid0 to test, but you would have seen a similar effect of its read 
speed getting cut in half upon 2 read requests.  The best of both worlds 
would be raid10

Now on to backup.  I like rsync, it is done at command line and is very 
easy (and also very easy to screw stuff up if you are using one of the 
--delete options)

Man page: http://www.manpagez.com/man/1/rsync/

For example:

rsync -av --stats --progress / /home/storage --exclude=/dev/ 
--exclude=/proc/ --exclude=/sys/ --exclude=/home/storage/

That will take your / and copy it to /home/storage, and exclude a couple 
of directories that you don't need to copy.  The next time you run it, 
instead of copying all the files again it will only copy the files that 
are new or have been modified.

I usually run mine with the argument --delete-before so that if a file 
is deleted from / it will also be deleted from the backup directory the 
next time it is ran.  You just have to be careful when you use those 
options, it is a good idea to test with the dry mode -n first to make 
sure you aren't going to delete your whole hard drive or something.

Sam


More information about the SATLUG mailing list