0

A few weeks ago I updated my ubuntu server from 14.04 to 16.04 and it messed up my zfs z1 pool (4x 3TB). I was able to bring the pool online again but some partitions are now not the same /dev/sd* device. That leads to this:

Device "12233750374993511418 was /dev/sdd1"

user@host:/etc# zpool status zfspool
pool: zfspool
state: DEGRADED
status: One or more devices could not be used because the label is missing or invalid.  Sufficient replicas exist for the pool to continue functioning in a degraded state.
action: Replace the device using 'zpool replace'.
see: http://zfsonlinux.org/msg/ZFS-8000-4J
scan: none requested

config:
NAME                      STATE     READ WRITE CKSUM
zfspool                   DEGRADED     0     0     0
  raidz1-0                DEGRADED     0     0     0
    sda                   ONLINE       0     0     0
    sdb                   ONLINE       0     0     0
    sdc                   ONLINE       0     0     0
    12233750374993511418  UNAVAIL      0     0     0  was /dev/sdd1
errors: No known data errors

Before the update the pool consisted of the 4 devices (sda, sdb, sdc and sdd) and the boot USB Stick was sde. Now the boot USB-Stick is sdd(1,2,5). Like the zpool status output already said: Device "12233750374993511418 was /dev/sdd1" And the old sdd from the zpool ist now sde.

Now:
user@host:/etc# lsblk 
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0  2,7T  0 disk 
├─sda1   8:1    0  2,7T  0 part 
└─sda9   8:9    0    8M  0 part 
sdb      8:16   0  2,7T  0 disk 
├─sdb1   8:17   0  2,7T  0 part 
└─sdb9   8:25   0    8M  0 part 
sdc      8:32   0  2,7T  0 disk 
├─sdc1   8:33   0  2,7T  0 part 
└─sdc9   8:41   0    8M  0 part 
sdd      8:48   1 57,9G  0 disk 
├─sdd1   8:49   1 53,9G  0 part /
├─sdd2   8:50   1    1K  0 part 
└─sdd5   8:53   1    4G  0 part [SWAP]
sde      8:64   0  2,7T  0 disk 
├─sde1   8:65   0  2,7T  0 part 
└─sde9   8:73   0    8M  0 part

Also the fstab tells me: "# / was on /dev/sde1 during installation"

user@host:/etc# cat /etc/fstab 
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sde1 during installation
UUID=48c56de3-90fb-4cf1-ac76-5e224fe29048 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sde5 during installation
UUID=a0c83bcc-711e-4830-a2b5-d514785d7939 none            swap    sw              0       0

Now my question is how can I switch my boot USB-Stick back to sde(1,2,5) and my 4.th HDD back to sdd so that the zpool status is not DEGRADED anymore. Or any other solution. Is it possible to export and import the pool with sda, sdb, sdc and sde again?

Im very grateful for every answer

1
  • You could try to zpool export zfspool and afterwards zpool import -d /dev/disk/by-id zfspool. This should also ensure that in future the zpool is detected by the ID of the disks and not the kernel naming. The filesystem will go offline during the steps, so ensure that nothing is accessing the filesystem.
    – Thomas
    Jul 1, 2017 at 15:23

1 Answer 1

0

To get back the devices of your zpool, you can export and then import the zpool again. During import you can use the /dev/disk/by-id path, which identifies the disks by serial number which makes the setup more robust than using /dev/sd* device naming.
During the export/import process the filesystem will go offline, so ensure that no processes are accessing files on the ZFS filesystem.

zpool export zfspool 
zpool import -d /dev/disk/by-id zfspool

You must log in to answer this question.

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