Exporting ZFS Pool

Pete Erickson redlamb at redlamb.net
Wed Sep 8 02:42:01 UTC 2010


I'm relatively new to ZFS and have been playing around with different  
file-backed set ups to determine how I will eventually configure my  
pools. I've recently come across a problem with exporting a pool, but  
I'm not sure if it's a bug or just my poor understanding of ZFS. I  
create a simple pool using 2 128MB files. After exporting the pool, I  
am unable to import it and the pool is not found by the zpool command.  
Any advise would be appreciated. I'm currently running 8.1 STABLE.

ratchet# dd if=/dev/zero of=/disk1.dd bs=1m count=128
128+0 records in
128+0 records out
134217728 bytes transferred in 2.852547 secs (47051891 bytes/sec)
ratchet# dd if=/dev/zero of=disk2.dd bs=1m count=128
128+0 records in
128+0 records out
134217728 bytes transferred in 2.740976 secs (48967128 bytes/sec)
ratchet# zpool create pool /usr/tmp/disk1.dd /usr/tmp/disk2.dd
ratchet# zpool list
NAME   SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
pool   246M    75K   246M     0%  ONLINE  -
ratchet# zpool status
   pool: pool
  state: ONLINE
  scrub: none requested
config:

	NAME                 STATE     READ WRITE CKSUM
	pool                 ONLINE       0     0     0
	  /usr/tmp/disk1.dd  ONLINE       0     0     0
	  /usr/tmp/disk2.dd  ONLINE       0     0     0

errors: No known data errors
ratchet# zpool export pool
ratchet# zpool import -d .

If I then attempt to recreate the pool, I get an error indicating that  
one of the files is a part of an exported pool.

ratchet# zpool create z /usr/tmp/disk1.dd /usr/tmp/disk2.dd
invalid vdev specification
use '-f' to override the following errors:
/usr/tmp/disk1.dd is part of exported pool 'pool'

-- 
Pete Erickson
redlamb _at_ redlamb _dot_ net


More information about the freebsd-questions mailing list