Over the course of multiple OpenSolaris installs , I first created a pool called "tank" and then, later and resusing some of the same drives, I created another pool called tank. I can `zpool export tank`, but when I `zpool import tank`, I get: bash-3.2# zpool import tank cannot import ''tank'': more than one matching pool import by numeric ID instead Then, using just `zpool import` I see the IDs: bash-3.2# zpool import pool: tank id: 15608629750614119537 state: ONLINE action: The pool can be imported using its name or numeric identifier. config: tank ONLINE raidz2 ONLINE c3t0d0 ONLINE c3t4d0 ONLINE c4t0d0 ONLINE c4t4d0 ONLINE c5t0d0 ONLINE c5t4d0 ONLINE raidz2 ONLINE c3t1d0 ONLINE c3t5d0 ONLINE c4t1d0 ONLINE c4t5d0 ONLINE c5t1d0 ONLINE c5t5d0 ONLINE pool: tank id: 3280066346390919920 state: ONLINE status: The pool was last accessed by another system. action: The pool can be imported using its name or numeric identifier and the ''-f'' flag. see: http://www.sun.com/msg/ZFS-8000-EY config: tank ONLINE raidz2 ONLINE c4t1d0p0 ONLINE c3t1d0p0 ONLINE c4t4d0p0 ONLINE c3t4d0p0 ONLINE c3t5d0p0 ONLINE c3t0d0p0 ONLINE How can I destroy the pool 3280066346390919920 so I do have to specify the ID to import tank in the future? Thanks, kent _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Hi Kent, This is what I do in similar situations: 1. Import the pool to be destroyed by using the ID. In your case, like this: # zpool import 3280066346390919920 If tank already exists you can also rename it: # zpool import 3280066346390919920 tank2 Then destroy it: # zpool destroy tank2 I wish we had a zpool destroy option like this: # zpool destroy -really_dead tank2 Cindy ----- Original Message ----- From: Kent Watsen <kent at watsen.net> Date: Saturday, June 20, 2009 3:02 pm Subject: [zfs-discuss] how to destroy a pool by id? To: zfs-discuss at opensolaris.org> Over the course of multiple OpenSolaris installs , I first created a > pool called "tank" and then, later and resusing some of the same > drives, I created another pool called tank.? I can `zpool export tank`, > but when I `zpool import tank`, I get: > > > > bash-3.2# zpool import tank > > cannot import ''tank'': more than one matching pool > > import by numeric ID instead > > > > > Then, using just `zpool import` I see the IDs: > > > > bash-3.2# zpool import > > ? pool: tank > > ??? id: 15608629750614119537 > > ?state: ONLINE > > action: The pool can be imported using its name or numeric > identifier. > > config: > > > > ??????? tank??????? ONLINE > > ????????? raidz2??? ONLINE > > ??????????? c3t0d0? ONLINE > > ??????????? c3t4d0? ONLINE > > ??????????? c4t0d0? ONLINE > > ??????????? c4t4d0? ONLINE > > ??????????? c5t0d0? ONLINE > > ??????????? c5t4d0? ONLINE > > ????????? raidz2??? ONLINE > > ??????????? c3t1d0? ONLINE > > ??????????? c3t5d0? ONLINE > > ??????????? c4t1d0? ONLINE > > ??????????? c4t5d0? ONLINE > > ??????????? c5t1d0? ONLINE > > ??????????? c5t5d0? ONLINE > > > > ? pool: tank > > ??? id: 3280066346390919920 > > ?state: ONLINE > > status: The pool was last accessed by another system. > > action: The pool can be imported using its name or numeric > identifier and > > ??????? the ''-f'' flag. > > ?? see: http://www.sun.com/msg/ZFS-8000-EY > > config: > > > > ??????? tank????????? ONLINE > > ????????? raidz2????? ONLINE > > ??????????? c4t1d0p0? ONLINE > > ??????????? c3t1d0p0? ONLINE > > ??????????? c4t4d0p0? ONLINE > > ??????????? c3t4d0p0? ONLINE > > ??????????? c3t5d0p0? ONLINE > > ??????????? c3t0d0p0? ONLINE > > > > > How can I destroy the pool 3280066346390919920 so I do have to > specify the ID to import tank in the future? > > > > Thanks, > > kent > > > > > > > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
On Sat, 20 Jun 2009, Cindy Swearingen wrote:> I wish we had a zpool destroy option like this: > > # zpool destroy -really_dead tank2Cindy, The moment we implemented such a thing, there would be a rash of requests saying: a) I just destroyed my pool with -really_dead - how can I get my data back??! b) I was able to recover my data from -really_dead - can we have -ultra-nuke please? -- Andre van Eyssen. mail: andre at purplecow.org jabber: andre at interact.purplecow.org purplecow.org: UNIX for the masses http://www2.purplecow.org purplecow.org: PCOWpix http://pix.purplecow.org
On Sun, 21 Jun 2009 13:56:52 +1000 (EST) Andre van Eyssen <andre at purplecow.org> wrote:> On Sat, 20 Jun 2009, Cindy Swearingen wrote: > > > I wish we had a zpool destroy option like this: > > > > # zpool destroy -really_dead tank2 > > Cindy, > > The moment we implemented such a thing, there would be a rash of > requests saying: > > a) I just destroyed my pool with -really_dead - how can I get my data > back??! > b) I was able to recover my data from -really_dead - can we have > -ultra-nuke please?Following your logic there shouldn''t have existed a "rm -f *" option too. -- Dick Hoogendijk -- PGP/GnuPG key: 01D2433D + http://nagual.nl/ | nevada / OpenSolaris 2009.06 release + All that''s really worth doing is what we do for others (Lewis Carrol)
Cindy Swearingen <Cindy.Swearingen at Sun.COM> writes:> I wish we had a zpool destroy option like this: > > # zpool destroy -really_dead tank2I think it would be clearer to call it zpool export --clear-name tank # or 3280066346390919920 or alternatively, zpool destroy --exported 3280066346390919920 I guess the reason you don''t want to allow operations on exported pools is that they can be residing on shared storage. -- Kjetil T. Homme Redpill Linpro AS - Changing the game
I have old pool skeletons with vdevs that no longer exist. Can''t import them, can''t destroy them, can''t even rename them to something obvious like junk1. What do I do to clean up? -- This message posted from opensolaris.org
Hi Chris, Yes, this is a known problem and a CR is filed. I haven''t tried these in a while, but consider one of the following workarounds below. #1 is most drastic and make sure you''ve got the right device name. No sanity checking is done by the dd command. Other experts can comment on a better dd command. Thanks, Cindy 1. Wipe the disk label with a dd command. For example: dd if=/dev/zero of=/dev/dsk/c1t0d0s0 count=100 bs=512k (The following two probably won''t work if you''re getting device in use messages.) 2. Force the creation of a new pool on the disk, like this: # zpool create -f pool ct1d0 Then, remove the new pool: # zpool destroy pool 3. Put the opposite label on the disk. If the disk has an SMI label, use format -e to force an EFI label. Or, vice versa. On 02/12/11 03:33, chris wrote:> I have old pool skeletons with vdevs that no longer exist. Can''t import them, can''t destroy them, can''t even rename them to something obvious like junk1. What do I do to clean up?