2

I am using Ubuntu 12.04 & Zfs Native. I created a zpool using the /dev/disk/by-id method, but I can no longer import zpool. When I try zpool status command I get the error message " no such pool " when I try " zpool import " It finds the pool & shows that one disk is missing or unavailable.

pool: tank
    id: 14496103743076187609
 state: UNAVAIL
status: One or more devices are missing from the system.
action: The pool cannot be imported. Attach the missing
    devices and try again.
   see: http://zfsonlinux.org/msg/ZFS-8000-6X

config:

aNas6TB      UNAVAIL  missing device
  sdf        ONLINE
  sdh        ONLINE

Additional devices are known to be part of this pool, though their
exact configuration cannot be determined.

I have connected another drive of same size ( bad disk still in original place ) but I am having difficulty replacing bad disk with new one in zpool. I tried the following:

sudo zpool replace tank /dev/sdg /dev/sde

sudo zpool replace tank scsi-SATA_ST32000542AS_9XW04YRP scsi-SATA_ST2000DM001-9YN_S240FE7C

sudo zpool replace tank dev/sdg dev/sde

I get the same error message each time "cannot open 'tank': no such pool"

I am obviously doing something wrong and would be grateful for any help.

0

2 Answers 2

5

As far as I know the process to replace a damaged drive are:

  1. zpool offline pool_name device_name
  2. Shutdown and replace drive
  3. zpool replace pool_name device_name

The first one takes a device_name drive offline from a pool_name pool, you then replace the drive with a new one and tell Zfs to replace the drive device_name in in the pool pool_name.

device_name and pool_name are the names of your drive and pool shown in zpool status.

16
  • Hi, thanks for reply when I run zpool status I get no such pool
    – Asterlan
    Aug 6, 2012 at 14:19
  • kk, the broken disk is still in the system right? Aug 6, 2012 at 14:20
  • Hi Bruno yes the broken disk is still in the system
    – Asterlan
    Aug 6, 2012 at 14:23
  • Take it offline using zpool offline tank /devname and replace that drive with a new one on that position, then boot up and place it online with zpool online tank /devname. Aug 6, 2012 at 14:25
  • Hi Bruno, when I try Zpool offline command I get same no such pool error
    – Asterlan
    Aug 6, 2012 at 14:31
0

Your problem may have been the same as mine as I was getting the same message, "No such pool".

The problem for me was that I was unable to import the pool (same as you) because one drive had changed it's device name. Instead of doing a zpool import as a generic 'import all pools' specifying the pool name after the import command allowed the pool to be imported with one failed / missing drive.

So instead of typing 'zpool import' only, type 'zpool import your pool' and it will import.

This worked for me, then I was able to start with the drive replacement commands.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .