Today on this ol' server
Thursday Dec 04, 2008
Importing zfs pools
How to import disks recovered after a reinstall or upgrade. Run zpool import -d against the directory that holds your disk devices.
root@thumper # zpool import -d /dev/dsk/
pool: compilers
id: 12162905211102209752
state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:
compilers ONLINE
raidz1 ONLINE
/c0t0d0 ONLINE
/c1t0d0 ONLINE
/c4t0d0 ONLINE
/c6t0d0 ONLINE
/c7t0d0 ONLINE
Each zpool device will have a unique id. Run zpool import -d $DEVICE_DIRECTORY -f $ID where ID is either the name or the numeric id. I used the numeric id when I did the import. First try without the -f option. If the disks were exported then you won't need the -f. If you're recovering from a system crash or hardware failure it's likely the pool was not exported prior to the crash. -f forces zfs to import the pool even if it thinks it's active.
root@thumper # zpool import -d /dev/dsk -f 12162905211102209752If the import was successful zfs won't return any state message. Check that the pool was imported correctly by zpool status.
root@thumper # zpool status
pool: compilers
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
compilers ONLINE 0 0 0
raidz1 ONLINE 0 0 0
c0t0d0 ONLINE 0 0 0
c1t0d0 ONLINE 0 0 0
c4t0d0 ONLINE 0 0 0
c6t0d0 ONLINE 0 0 0
c7t0d0 ONLINE 0 0 0
Posted at 07:14PM Dec 04, 2008 by saf in Sun | Comments[0]
Comments: