Hi all,
I finally figured out the easiest way to get over this (A Stripe of Mirror or Raidz10). This is root on ZFS as you know.
So I install PC-BSD as a basic ZFS. No mirror or any other drive selected.
The log on the system and issue this command
zpool status
|
Code:
|
pool: tank0
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
tank0 ONLINE 0 0 0
ada0p2 ONLINE 0 0 0 |
I forgot to mention, I have total 4 hard drives. Also, they are pre-configured. All of them has the same layout; 64k for boot partition and the rest for ZFS.
As you can see only one drive is currently attach/active in my zpool (tank0). So I do
gpart show command to make sure I have everything I thought.
|
Code:
|
=> 34 1953525101 ada0 GPT (931G)
34 128 1 freebsd-boot (64k)
162 1854 - free - (927k)
2016 1953513472 2 freebsd-zfs (931G)
1953515488 9647 - free - (4.7M)
=> 34 1953525101 ada1 GPT (931G)
34 128 1 freebsd-boot (64k)
162 1953524973 2 freebsd-zfs (931G)
=> 34 1953525101 ada2 GPT (931G)
34 128 1 freebsd-boot (64k)
162 1953524973 2 freebsd-zfs (931G)
=> 34 1953525101 ada3 GPT (931G)
34 128 1 freebsd-boot (64k)
162 1953524973 2 freebsd-zfs (931G) |
Then I added bootcode to every boot partition of the hard drive.
|
Code:
|
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada1
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada2
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada3 |
Next thing I attach the one more drive to the pool by issuing this commad:
|
Code:
|
zpool attach -f tank0 /dev/ada0p2 /dev/ada1p2 |
(Credit go to
Nukama -
http://forums.pcbsd.org/newreply.php...treply&t=13977)
Then I want to see if it is working, using the command
zpool status
|
Code:
|
pool: tank0
state: ONLINE
status: One or more devices is currently being resilvered. The pool will
continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
scan: resilver in progress since Sun Jan 22 21:21:54 2012
97.0M scanned out of 6.13G at 10.8M/s, 0h9m to go
93.0M resilvered, 1.55% done
config:
NAME STATE READ WRITE CKSUM
tank0 ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada0p2 ONLINE 0 0 0
ada1p2 ONLINE 0 0 0 (resilvering) |
It is working! Resilvering means mirror(ing). Now that I have a mirror in my zpool. I will just add another mirror to make it a-stripe-of-mirror or RAIDZ10; command
|
Code:
|
zpool add -f tank0 mirror /dev/ada2p2 /dev/ada3p2 |
To verify
zpool status
|
Code:
|
pool: tank0
state: ONLINE
scan: resilvered 6.13G in 0h7m with 0 errors on Sun Jan 22 21:28:56 2012
config:
NAME STATE READ WRITE CKSUM
tank0 ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada0p2 ONLINE 0 0 0
ada1p2 ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
ada2p2 ONLINE 0 0 0
ada3p2 ONLINE 0 0 0
errors: No known data errors |
You might ask, what the hell? There is no swap partition at all? Easy fix.
Command:
|
Code:
|
zfs create -V 16G tank0/swap
zfs set org.freebsd:swap=on tank0/swap
zfs set checksum=off tank0/swap |
These steps are very important especially the 3rd line. (Yes, credit go to
gkontos. You can google Root on ZFS. Swap partition always doubled your physical RAM amount.
I hope this help whoever is struggling on this issue like me.
I love FreeBSD and PC-BSD. I hope someday it will shine more than it is right now. Thanks to all the people contribute to FreeBSD, PC-BSD and this forum. I can now have my PC-BSD & VirtualBox running Windows 7 and start learning some coding programs. If you have any question, just ask. I will see if I can answer. As I stated in earlier posted, I am no expert. I am just learning to get my system working (more like self-study)