To enable mirroring on my two HDDs I tried to follow the steps described at http://darkstar-solaris.blogspot.com/2008/09/zfs-root-mirror.html and http://malsserver.blogspot.com/2008/08/mirroring-resolved-correct-way.html but got a little confused by the different device names.
What I needed to do is copy the partition table from the first drive to the second one and then I could attach it to the rpool. The following steps I did as a root user.
# zpool status pool: rpool state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 c8d0s0 ONLINE 0 0 0 errors: No known data errors
Meaning: my first disk is c8d0s0 and it is attached directly to the rpool.
# format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c8d0 <DEFAULT cyl 19454 alt 2 hd 255 sec 63> /pci@0,0/pci-ide@9/ide@0/cmdk@0,0 1. c8d1 <DEFAULT cyl 19454 alt 2 hd 255 sec 63> /pci@0,0/pci-ide@9/ide@0/cmdk@1,0
So my second drives name is c8d1. I chose option (1) and used the fdisk command to create a solaris2 partition. Then I quit the format command.
To copy the partition table from the first drive to the second one I used:
# prtvtoc /dev/rdsk/c8d0s2|fmthard -s - /dev/rdsk/c8d1s2
Then I could force attach the second drive to the rpool:
# zpool attach rpool c8d0s0 c8d1s0 invalid vdev specification use '-f' to override the following errors: /dev/dsk/c8d1s0 overlaps with /dev/dsk/c8d1s2 # zpool attach -f rpool c8d0s0 c8d1s0 Please be sure to invoke installgrub(1M) to make 'c8d1s0' bootable. # zpool status pool: rpool state: ONLINE scrub: resilver completed after 0h2m with 0 errors on Mon Jul 13 10:16:55 2009 config: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 mirror ONLINE 0 0 0 c8d0s0 ONLINE 0 0 0 c8d1s0 ONLINE 0 0 0 4,18G resilvered errors: No known data errors
To make the second drive also bootable I invoked installgrub
# installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c8d1s0
stage1 written to partition 0 sector 0 (abs 16065)
stage2 written to partition 0, 271 sectors starting at 50 (abs 16115)
The next task will be to install the four different 1 TB HDDs I also bought into that Chenbro case and create a zpool for them.
Thanks giorgos, I followed your directions and it just worked
Comment by enorl — 21.08.2009 @ 14:34 |
Hi,
what kind of Chembro case did you use? You didn’t mention it in your previous post.
Comment by Frank — 21.09.2009 @ 15:33 |
Hi Frank,
unfortunately the description about the Chenbro case was not very useful. It was a “Chenbro SR107 HD Backplane SATA II”, but those only fit in Chenbro barebones, so I had to return them. Instead I used 4 Icy Dock screwless internal 3.5″ SATA HDD Enclosures (MB671SK).
Comment by pegolon — 27.09.2009 @ 7:07 |
[...] the graphical OpenSolaris installer to install it on the first HDD. After installation I used my directions from an earlier post to create a ZFS mirror using both [...]
Pingback by Setting up an OpenSolaris root server at Hetzner « Agile Developer, Berlin, Germany — 24.10.2009 @ 13:45 |