- Package:
- zfs-initramfs
- Source:
- zfs-initramfs
- Submitter:
- Richard van den Berg
- Date:
- 2024-04-14 04:03:02 UTC
- Severity:
- normal
- Tags:
I have ZFS setup with rootfs which is mounted at boot in /root by initramfs. This causes the ZFS snapshots to be mounted in /root/.zfs/snapshot instead of /.zfs/snapshot Accessing any snapshot in /.zfs/snapshot gives this error: Too many levels of symbolic links The root cause is explained at https://github.com/openzfs/zfs/issues/9461#issuecomment-1376162949
It looks like this has been fixed in 2.1.12: https://github.com/openzfs/zfs/pull/14920 2.1.12-1 is already in unstable. Please consider including this fix in Debian stable (bookworm) as well.
I can confirm this issue is resolve with zfs-dkms 2.1.12-2~bpo12+1 from bookworm-backports. Kind regards, Richard
Thanks Shengqi Chen
Also fixed in bookworm-backports by 2.1.12-2~bpo12+1 and confirmed by submitter. Thanks, Shengqi Chen
The upstream issue referenced in the OP is still open, and you can still repro this error on 2.2.2-3 and 6.6.9-amd64: nabijaczleweli@chrust:~$ ls .zfs/snapshot/pre-keymap/ ls: cannot access '/home/nabijaczleweli/.zfs/snapshot/pre-keymap/': Too many levels of symbolic links nabijaczleweli@chrust:~$ ls /.zfs/snapshot/pre-keymap/ audio-script.tar cros-keyboard-map foreign.nabijaczleweli.xyz typescript xev.log nabijaczleweli@chrust:~/code/babfig/i3status.rs$ findmnt TARGET SOURCE FSTYPE OPTIONS / chrust-zoot zfs rw,relatime,xattr,posixacl,casesensitive ├─/home chrust-zoot/home zfs rw,relatime,xattr,posixacl,casesensitive │ └─/home/nabijaczleweli chrust-zoot/home/nabijaczleweli zfs rw,relatime,xattr,posixacl,casesensitive └─/.zfs/snapshot/pre-keymap chrust-zoot/home/nabijaczleweli@pre-keymap zfs ro,relatime,xattr,posixacl,casesensitive $ uname -a Linux chrust 6.6.9-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.6.9-1 (2024-01-01) x86_64 GNU/Linux $ zfs --version zfs-2.2.2-3 zfs-kmod-2.2.2-3 with the added spice of c-z/h/n@p-k instead of c-z@p-k being mounted.
Hi, Thanks for testing. The fix actually got merged into 2.2.12 and master, but not released with 2.2.0 till now. We will keep tracking it, and (probably) backport the patch in the next debian release. Thanks, Shengqi Chen
Hi, Sorry for the confusion. The fixes has landed in 2.1.12 and remains in all later versions. I tested on my 2.2.2-3 and cannot reproduce your problem. Seems .zfs/ of you home dataset goes wrongly to /.zfs, which is really weird, since they are mounted in the different stage of booting sequence. I don’t think it is the same problem as this report. You might want to create a new report (and to upstream). Thanks, Shengqi Chen
Forwarded to https://github.com/openzfs/zfs/issues/15766.