ZFS pool corrupted on upgrade of -current (probably sata
renaming)
Guido Falsi
mad at madpilot.net
Wed Jul 15 09:05:10 UTC 2009
On Wed, Jul 15, 2009 at 12:44:32PM +0900, Randy Bush wrote:
> > # glabel label disk01 /dev/ad4
> > # glabel label disk02 /dev/ad6
> > # glabel label disk03 /dev/ad8
> > # zpool create pool raidz1 label/disk01 label/disk02 label/disk03
> >
> > After that, you can shuffle the drives around in the system, and the pool
> > will continue to work correctly.
>
> ooooooo! i wish i had understood that when i built a large set of
> mirrored raid.
>
> any way to hack it ex post facto?
Don't know if this can be safely done on a large set, with a normal PC
using a simple zpool mirror I'm hacking this doing:
# 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
ad0p2 ONLINE 0 0 0
ad8p2 ONLINE 0 0 0
errors: No known data errors
# zpool detach tank ad0p2
# glabel label disk01 /dev/ad0p2
# zpool attach tank ad8p2 label/disk01
# zpool status tank
pool: tank
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 0h6m, 17.06% done, 0h29m to go
config:
NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
mirror ONLINE 0 0 0
ad8p2 ONLINE 0 0 0 60.7M resilvered
label/disk01 ONLINE 0 0 0 10.4G resilvered
errors: No known data errors
After the resilver I'll just go ahead with the other disk. It's working
flawlessly for now.
with a simple 2 disk setup this is quite easy, it can get tricky with
complex designs(f.e. zraid2, hot spares, cache and log devices and so
on...). If you have a complex design better make a detailed plan, before
shooting your own foot.
--
Guido Falsi <mad at madpilot.net>
More information about the freebsd-current
mailing list