Thursday, March 22, 2007

FreeBSD Gstripe

I decided to try out raid0 with FreeBSD gstripe and it seems to be a pretty easy and quick setup. I have 6 disks in this setup, first one will be the primary and installed with the OS, and I will combine all the other 5 disks and building the raid0 with striping for it.

shell>gstripe label -v -s 131072 nsm \
/dev/ad2 /dev/ad3 /dev/ad4 /dev/ad5 /dev/ad6 /dev/ad7

I constructed UFS2 file system with soft-updates enabled.

shell>newfs -U /dev/stripe/nsm

After it is done, I just mount it to /nsm -

shell>mount /dev/stripe/nsm /nsm

Then enable gstripe on system boot -

shell>echo 'geom_stripe_load="YES"' >> /boot/loader.conf

Add it to mount on boot -

shell>echo '/dev/stripe/nsm /nsm ufs rw 2 2' >> /etc/fstab

Thanks to chflags for pointing out, I just did simple benchmarking and it is kinda impressive though.

shell>time dd if=/dev/zero of=/nsm/test.img bs=1M count=1024
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 8.884599 secs (120854281 bytes/sec)

real 0m8.907s
user 0m0.001s
sys 0m5.446s

Cheers ;]

1 comment:

Anonymous said...

Yes, gstripe is just great and does a great job on my pc