View Single Post
  #2   (View Single Post)  
Old 13th July 2010
DraconianTimes's Avatar
DraconianTimes DraconianTimes is offline
Security Geek
 
Join Date: May 2008
Location: United Kingdom
Posts: 37
Default

OK, so I've been playing around with VirtualBox to try and work this out. For hours. By way of project log, I'll add in additional info/experiences here (based on what I *think* works, if anyone sees something off, please chime in). I created five disk images (10% equivalents) to replicate my setup above, attached the four 'data' disks to a separate virtual SATA controller in the FreeBSD environment within VirtualBox. I then run:

Code:
freebsd-test# egrep 'ad[0-9]|cd[0-9]' /var/run/dmesg.boot
acpi_acad0: <AC Adapter> on acpi0
ad0: 10240MB <VBOX HARDDISK 1.0> at ata0-master UDMA33
acd0: DVDROM <VBOX CD-ROM/1.0> at ata1-master UDMA33
ad4: 1024MB <VBOX HARDDISK 1.0> at ata2-master SATA300
ad6: 1024MB <VBOX HARDDISK 1.0> at ata3-master SATA300
ad8: 750MB <VBOX HARDDISK 1.0> at ata4-master SATA300
ad10: 750MB <VBOX HARDDISK 1.0> at ata5-master SATA300
Trying to mount root from ufs:/dev/ad0s1a
This allowed me to identify my virtual disks. I then created a mirror based on the command line example I found and included in my first post. The resulting ~1.72GB volume suggests it is right...

Code:
freebsd-test# zpool create tank mirror ad4 ad6 mirror ad8 ad10
freebsd-test# zpool list
NAME   SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
tank  1.72G    75K  1.72G     0%  ONLINE  -
I then used the following to check the config, which AFAICT has setup the mirror properly using all four disks (i.e. two pairs of mirrors, RAID10)

Code:
freebsd-test# zpool status tank
  pool: tank
 state: ONLINE
 scrub: none requested
config:

	NAME        STATE     READ WRITE CKSUM
	tank        ONLINE       0     0     0
	  mirror    ONLINE       0     0     0
	    ad4     ONLINE       0     0     0
	    ad6     ONLINE       0     0     0
	  mirror    ONLINE       0     0     0
	    ad8     ONLINE       0     0     0
	    ad10    ONLINE       0     0     0

errors: No known data errors
Still tinkering, will update again later.
Reply With Quote