ZFS rename /dev/devices

Dear List,

We are using 9.1-RC1 our hardware is a dell 2950 + a jbod with 24 3Tb disk
we have 3 pools, 2 of them are working ok one is completely screwed, we had to restart the server several times and for some reason FreeBSD recognize and rename the disk differently every time, the pool that I'm trying to fix is:

config:
Code:
	billinvoicepool           FAULTED  corrupted data
	  raidz1-0                ONLINE
	    6715737641300286339   UNAVAIL  corrupted data
	    17947327417864955568  UNAVAIL  corrupted data
	    5183987841926644283   UNAVAIL  corrupted data

This pool was created with da19, da20 and da21 but after the restart the same HD are now renamed to da0, da1, da2 now the disks are still there I just don't know how to tell zpool to import using this devices instead or how to rename /dev/da0 so it matches the weird id 6715737641300286339 that I got when I first created the pool any ideas?
Code:
diskinfo da0
        Z2929WRK000092350K7K    # Disk ident.
diskinfo da1
        Z2922YJ50000923506X2    # Disk ident.
diskinfo da2
        Z292A0BZ000092350F7S    # Disk ident.
Thanks in advance
 
If you use labels you will always reference the same disks. For example

Code:
# label the disks
glabel label pool3_disk1 /dev/da1
glabel label pool3_disk2 /dev/da2
glabel label pool3_disk3 /dev/da3

# create pool with labels
zpool create tank raidz3 /dev/label/pool3_disk1 /dev/label/pool3_disk2 /devlabel/pool3_disk3

If you need 4k alignment, look into gnop.
 
But do not label disks with data on them! Actually, the ZFS metadata should make that unnecessary.

AFAIK, ZFS should still be able to import that pool by poolname.
 
Do a manual import and point it at the /dev directory:
Code:
# zpool import -d /dev poolname

That will force zfs to reread the metadata on the disks and get things syraightened out.
 
Back
Top