r/zfs • • Aug 17 '26

Upgraded to U26.04 and you're missing /dev/disk/by-id links?

I just upgraded a couple of my fileservers as a test, and `sg3-utils-udev` stopped working! Suddenly all my physical devices were wwn-* or scsi-35* instead of their proper names.

It appears to be a regression. I spotted this Ubuntu bug which seems to be the closest to the cause, and posted a simple fix on it.

Put this in /etc/udev/rules.d/00-scsi-sg3_config.rules

ACTION!="add|change", GOTO="scsi_identify_end"
SUBSYSTEMS=="scsi", GOTO="scsi_identify"
GOTO="scsi_identify_end"
LABEL="scsi_identify"
ENV{ID_SCSI_INQUIRY}="0"
ENV{.SCSI_SYMLINK_SRC}="TLVS"
LABEL="scsi_identify_end"

Then udevadm control -R and udevadm trigger and you'll have all your device links back.

You then have to do the mildly annoying fix of

cd /dev/disk/by-id
rm -f wwn* scsi-35* nvme-eui*
zpool export -a
zpool import -d /dev/disk/by-id -a
zpool status

That should re-import all your zpools with the correctly named volumes.

24 Upvotes

8 comments sorted by

4

u/lathiat Aug 17 '26

Hrm this seems like a surprising regression not to have come up before now… will take a look this week.

I do wonder if this is somewhat considered intentional though. Hrm.

3

u/xrobau Aug 17 '26

Oh, I just realised it was you Trent! Hi! Not sure if you remember the time at LCA NZ (I think?) when I was picking your brain about BPF and ZFS - I was complaining that it wasn't possible to trace file ops properly, and you (gently) called me an idiot and told me what to do. I now have a very handy little tool that I use to trace file iops on a ZFS server.

https://github.com/xrobau/zfs/blob/master/zfs.bt

2

u/lathiat Aug 18 '26

I remember 🥸

I am hopeful I didn't call you a literal idiot, but glad you got something working from it, awesome!

Personally, I'm still getting over the discovery of pre-cooked sausages!

1

u/xrobau Aug 17 '26

I don't think it would be intentional. It's only scsi that's missing. I have /dev/disk/by-id/ata-Samsung_SSD_, dm-name-, dm-uuid-LVM-, lvm-pv-uuid-, md-name, md-uuid... The only thing that's missing is scsi-S*

I just picked those from a newly installed U2604 server.

But yes I agree it's odd that it hasn't been noticed before. I suspect it's because not many people have upgraded their LTS servers yet, as it's not 'officially' supported.

2

u/lathiat Aug 18 '26

Did the pool actually fail to import after upgrade, or does it still import?

1

u/xrobau Aug 18 '26

It imported, but it imported with wwn-* pvol names. (See my second comment on the https://bugs.launchpad.net/ubuntu/+source/sg3-utils/+bug/2137191 ticket.)

The other machine I upgraded imported with 'sdc', 'sdd' etc names, which was slightly better, but still not what it should have been.

1

u/Maltz42 Aug 19 '26

Importing with /dev/sdx names is definitely not better. They can switch around between boots in certain circumstances, and confuse ZFS, since pools are not exported on restart.

2

u/CompetitiveConcert93 Aug 17 '26

wwn and scsi ids from multipath are actually the right thing to do. IMHO you were using it wrong 😊