i am attempting to follow the recipe in: http://blogs.sun.com/sa/entry/hotplugging_sata_drives the recipe copies the vtoc from the old drive to the new drive and then does an attach. when i get to the attach - the partition slices on the new drive overlap (the partition slices on the old drive overlap) - and i get an error message: initial at dogpatch:~# zpool attach rpool c7t0d0s0 c7t1d0s0 invalid vdev specification use ''-f'' to override the following errors: /dev/dsk/c7t1d0s0 overlaps with /dev/dsk/c7t1d0s2 here is the vtoc of the original drive: initial at dogpatch:~# prtvtoc /dev/rdsk/c7t0d0s2 * /dev/rdsk/c7t0d0s2 partition map * * Dimensions: * 512 bytes/sector * 63 sectors/track * 255 tracks/cylinder * 16065 sectors/cylinder * 36471 cylinders * 36469 accessible cylinders * * Flags: * 1: unmountable * 10: read-only * * Unallocated space: * First Sector Last * Sector Count Sector * 0 16065 16064 * * First Sector Last * Partition Tag Flags Sector Count Sector Mount Directory 0 2 00 16065 585858420 585874484 2 5 01 0 585874485 585874484 8 1 01 0 16065 16064 initial at dogpatch:~# the original opensolaris install would have partitioned and formatted this drive - so that partitions 0 and 2 overlap. to solve the problem, i used format to zero out s2 on the new drive - and then the attach for s0 worked. however - it caused the next step to fail: initial at dogpatch:~$ installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c7t1d0s0 cannot open/stat device /dev/rdsk/c7t1d0s2 should i have zeroed s0 on the new drive and attached s2? what should i have done differently? -- This message posted from opensolaris.org
Cindy Swearingen
2010-Mar-05 18:01 UTC
[zfs-discuss] hotplugging sata drives in opensolaris
Hi David, I think installgrub is unhappy that no s2 exists on c7t1d0. I would detach c7t1d0s0 from the pool and follow these steps to relabel/repartition this disk: http://www.solarisinternals.com/wiki/index.php/ZFS_Troubleshooting_Guide Replacing/Relabeling the Root Pool Disk Then, reattach the disk and run installgrub after the disk is resilvered. Thanks, Cindy On 03/05/10 10:43, xx wrote:> i am attempting to follow the recipe in: > http://blogs.sun.com/sa/entry/hotplugging_sata_drives > > the recipe copies the vtoc from the old drive to the new drive and then does an attach. when i get to the attach - the partition slices on the new drive overlap (the partition slices on the old drive overlap) - and i get an error message: > initial at dogpatch:~# zpool attach rpool c7t0d0s0 c7t1d0s0 > invalid vdev specification > use ''-f'' to override the following errors: > /dev/dsk/c7t1d0s0 overlaps with /dev/dsk/c7t1d0s2 > > here is the vtoc of the original drive: > initial at dogpatch:~# prtvtoc /dev/rdsk/c7t0d0s2 > * /dev/rdsk/c7t0d0s2 partition map > * > * Dimensions: > * 512 bytes/sector > * 63 sectors/track > * 255 tracks/cylinder > * 16065 sectors/cylinder > * 36471 cylinders > * 36469 accessible cylinders > * > * Flags: > * 1: unmountable > * 10: read-only > * > * Unallocated space: > * First Sector Last > * Sector Count Sector > * 0 16065 16064 > * > * First Sector Last > * Partition Tag Flags Sector Count Sector Mount Directory > 0 2 00 16065 585858420 585874484 > 2 5 01 0 585874485 585874484 > 8 1 01 0 16065 16064 > initial at dogpatch:~# > > the original opensolaris install would have partitioned and formatted this drive - so that partitions 0 and 2 overlap. to solve the problem, i used format to zero out s2 on the new drive - and then the attach for s0 worked. however - it caused the next step to fail: > > initial at dogpatch:~$ installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c7t1d0s0 > cannot open/stat device /dev/rdsk/c7t1d0s2 > > should i have zeroed s0 on the new drive and attached s2? what should i have done differently?
ok - i tried to follow the troubleshooting instructions - but i ran into the
same problem at step 5 - the attach:
initial at dogpatch:~# zpool attach rpool c7t0d0s0 c7t1d0s0
invalid vdev specification
use ''-f'' to override the following errors:
/dev/dsk/c7t1d0s0 overlaps with /dev/dsk/c7t1d0s2
and, of course, they overlap, since s2 is the entire disk:
initial at dogpatch:~# prtvtoc /dev/rdsk/c7t1d0s0
* /dev/rdsk/c7t1d0s0 partition map
*
* Dimensions:
* 512 bytes/sector
* 63 sectors/track
* 255 tracks/cylinder
* 16065 sectors/cylinder
* 36471 cylinders
* 36469 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* Unallocated space:
* First Sector Last
* Sector Count Sector
* 0 16065 16064
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 0 00 16065 585858420 585874484
2 5 01 0 585874485 585874484
8 1 01 0 16065 16064
the only difference, that i can see right off, with the format method and in the
other instructions that used fmthard is that the tags are 0,5,1 instead of 2,5,1
- but the slices(partitions) still overlap. should i use "-f" to force
it to run, as the error message suggests - the toubleshooting instructions show
overlapping partitions as well, but they don''t show a "-f" at
step 5. i was hoping the tag difference was the "magic". am i
overlooking something and making a mistake?
--
This message posted from opensolaris.org
ok - "-f" worked:
initial at dogpatch:~# zpool attach -f rpool c7t0d0s0 c7t1d0s0
Please be sure to invoke installgrub(1M) to make ''c7t1d0s0''
bootable.
Make sure to wait until resilver is done before rebooting.
initial at dogpatch:~# zpool status rpool
pool: rpool
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.
scrub: resilver in progress for 0h0m, 0.32% done, 1h37m to go
config:
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
c7t0d0s0 ONLINE 0 0 0
c7t1d0s0 ONLINE 0 0 0 148M resilvered
errors: No known data errors
--
This message posted from opensolaris.org