openzfs / zfs

OpenZFS on Linux and FreeBSD
https://openzfs.github.io/openzfs-docs
Other
10.69k stars 1.76k forks source link

[0.6.5.9-5] Debian Jessie Native ZFS fails to load sub filesystems when rpool/ROOT/debian-8/var is set to canmount=off #6251

Closed azeemism closed 4 years ago

azeemism commented 7 years ago

System information

Linux skynet 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u1 (2017-06-18) x86_64 GNU/Linux
root@skynet:/# dpkg -l | grep zfs
ii  libzfs2linux                         0.6.5.9-5                            amd64        OpenZFS filesystem library for Linux
ii  zfs-dkms                             0.6.5.9-5                            all          OpenZFS filesystem kernel modules for Linux
ii  zfs-initramfs                        0.6.5.9-5                            all          OpenZFS root filesystem capabilities for Linux - initramfs
ii  zfs-zed                              0.6.5.9-5                            amd64        OpenZFS Event Daemon
ii  zfsutils-linux                       0.6.5.9-5                            amd64        command-line tools to manage OpenZFS filesystems
root@skynet:/# dpkg -l | grep spl
ii  spl                                  0.6.5.9-1                            amd64        Solaris Porting Layer user-space utilities for Linux
ii  spl-dkms                             0.6.5.9-1                            all          Solaris Porting Layer kernel modules for Linux
root@skynet:/boot# cat /etc/*-release
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
root@skynet:/boot# modinfo zfs | grep -iw version
version:        0.6.5.9-5
root@skynet:/boot# modinfo spl | grep -iw version
version:        0.6.5.9-1
root@skynet:/boot# zpool status
  pool: rpool
 state: ONLINE
  scan: none requested
config:

        NAME                                                STATE     READ WRITE CKSUM
        rpool                                               ONLINE       0     0     0
          mirror-0                                          ONLINE       0     0     0
            ata-Samsung_SSD_840_PRO_Series_S1ATNSAF520000X  ONLINE       0     0     0
            ata-Samsung_SSD_840_PRO_Series_S1ATNSAF520000D  ONLINE       0     0     0
          mirror-1                                          ONLINE       0     0     0
            ata-Samsung_SSD_840_PRO_Series_S1ATNSAF520000E  ONLINE       0     0     0
            ata-Samsung_SSD_840_PRO_Series_S1ATNSAF520000L  ONLINE       0     0     0

errors: No known data errors
root@skynet:/# mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=8258008,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,relatime,size=13216864k,mode=755)
rpool/ROOT/debian-8 on / type zfs (rw,relatime,xattr,noacl)
rpool/ROOT/debian-8/bck on /bck type zfs (rw,relatime,xattr,noacl)
rpool/ROOT/debian-8/home on /home type zfs (rw,relatime,xattr,noacl)
rpool/ROOT/debian-8/home/jails on /home/jails type zfs (rw,relatime,xattr,noacl)
rpool/ROOT/debian-8/root on /root type zfs (rw,relatime,xattr,noacl)
rpool/ROOT/debian-8/srv on /srv type zfs (rw,relatime,xattr,noacl)
rpool/ROOT/debian-8/tmp on /tmp type zfs (rw,relatime,xattr,noacl)
rpool/ROOT/debian-8/usr on /usr type zfs (rw,relatime,xattr,noacl)
rpool/ROOT/debian-8/usr/share on /usr/share type zfs (rw,relatime,xattr,noacl)
rpool/ROOT/debian-8/var on /var type zfs (rw,relatime,xattr,noacl)
rpool/ROOT/debian-8/var/backups on /var/backups type zfs (rw,relatime,xattr,noacl)
rpool/ROOT/debian-8/var/cache on /var/cache type zfs (rw,relatime,xattr,noacl)
rpool/ROOT/debian-8/var/lib on /var/lib type zfs (rw,relatime,xattr,noacl)
rpool/ROOT/debian-8/var/lib/nfs on /var/lib/nfs type zfs (rw,relatime,xattr,noacl)
rpool/ROOT/debian-8/var/log on /var/log type zfs (rw,relatime,xattr,noacl)
rpool/ROOT/debian-8/var/mail on /var/mail type zfs (rw,relatime,xattr,noacl)
rpool/ROOT/debian-8/var/pgdump on /var/pgdump type zfs (rw,relatime,xattr,noacl)
rpool/ROOT/debian-8/var/spool on /var/spool type zfs (rw,relatime,xattr,noacl)
rpool/ROOT/debian-8/var/tmp on /var/tmp type zfs (rw,relatime,xattr,noacl)
rpool/ROOT/debian-8/var/virusmails on /var/virusmails type zfs (rw,relatime,xattr,noacl)
rpool/ROOT/debian-8/var/vmail on /var/vmail type zfs (rw,relatime,xattr,noacl)
rpool/ROOT/debian-8/var/www on /var/www type zfs (rw,relatime,xattr,noacl)
rpool/ROOT/debian-8/var/www/example.com on /var/www/example.com type zfs (rw,relatime,xattr,noacl)
rpool/ROOT/debian-8/var/www/example.com/2.x_pub_static on /var/www/example.com/magento/2.x/2.x/pub/static type zfs (rw,relatime,xattr,noacl)
rpool/ROOT/debian-8/var/www/example.com/2.x_var on /var/www/example.com/magento/2.x/2.x/var type zfs (rw,relatime,xattr,noacl)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=23,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
tmpfs on /var/lib/varnish type tmpfs (rw,nosuid,noatime,nodiratime,size=512000k)
tmpfs on /var/cache/nginx/ngx_pagespeed/vws type tmpfs (rw,relatime,size=1048576k)
tmpfs on /var/cache/nginx/fastcgi/vws type tmpfs (rw,relatime,size=1048576k)
tmpfs on /var/cache/nginx/proxy/vws type tmpfs (rw,relatime,size=2097152k)
/dev/md0 on /boot type ext4 (rw,noatime,data=ordered)
/dev/sde1 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=utf8,shortname=mixed,errors=remount-ro)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=6608432k,mode=700)
root@skynet:~# lsblk
NAME    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda       8:0    0   204G  0 disk
├─sda1    8:1    0   204G  0 part
└─sda9    8:9    0     8M  0 part
sdb       8:16   0   204G  0 disk
├─sdb1    8:17   0   204G  0 part
└─sdb9    8:25   0     8M  0 part
sdc       8:32   0   204G  0 disk
├─sdc1    8:33   0   204G  0 part
└─sdc9    8:41   0     8M  0 part
sdd       8:48   0   204G  0 disk
├─sdd1    8:49   0   204G  0 part
└─sdd9    8:57   0     8M  0 part
sde       8:64   0   1.8T  0 disk
├─sde1    8:65   0   487M  0 part  /boot/efi
├─sde2    8:66   0   4.7G  0 part
│ └─md0   9:0    0   4.7G  0 raid1 /boot
├─sde3    8:67   0   3.7G  0 part
│ └─md1   9:1    0   3.7G  0 raid1
├─sde4    8:68   0   4.7G  0 part
│ └─md2   9:2    0   4.7G  0 raid1
├─sde5    8:69   0   3.7G  0 part
│ └─md3   9:3    0   3.7G  0 raid1
├─sde6    8:70   0 186.3G  0 part
│ └─md4   9:4    0 186.1G  0 raid1
└─sde7    8:71   0   1.6T  0 part
sdf       8:80   0   1.8T  0 disk
├─sdf1    8:81   0   487M  0 part
├─sdf2    8:82   0   4.7G  0 part
│ └─md0   9:0    0   4.7G  0 raid1 /boot
├─sdf3    8:83   0   3.7G  0 part
│ └─md1   9:1    0   3.7G  0 raid1
├─sdf4    8:84   0   4.7G  0 part
│ └─md2   9:2    0   4.7G  0 raid1
├─sdf5    8:85   0   3.7G  0 part
│ └─md3   9:3    0   3.7G  0 raid1
├─sdf6    8:86   0 186.3G  0 part
│ └─md4   9:4    0 186.1G  0 raid1
└─sdf7    8:87   0   1.6T  0 part
sdg       8:96   1  28.8G  0 disk
├─sdg1    8:97   1   487M  0 part
└─sdg2    8:98   1   4.7G  0 part
zd0     230:0    0     4G  0 disk  [SWAP]

Describe the problem you're observing

Debian Jessie Native ZFS fails to load sub filesystems under /var when rpool/ROOT/debian-8/var is set to canmount=off.

2017-06-19 14_22_45-2017-06-18 21_26_12-java ikvm viewer v1 69 21 00 00 00 00 - resolution 1024

Describe how to reproduce the problem

Follow zfs wiki to install with the exception of putting /boot an /boot/efi partitions on a different disk. https://github.com/zfsonlinux/zfs/wiki/Debian-Jessie-Root-on-ZFS

Include any warning/errors/backtraces from the system logs

Thanks!

azeemism commented 7 years ago

@kpande but to my knowledge the directory does exist. If I boot into my non-native ZFS OS and mount the pool zpool import -o cachefile=none -o altroot=/sysroot rpool, then only mount "/" zfs mount rpool/ROOT/debian-8, the /sysroot/var/backups folder exits. ...So I am not clear why then I am receiving the canonicalization error 2, that this directory does not exist. Additionally, when I am in the non-native ZFS OS, I have no trouble mounting rpool/ROOT/debian-8/var/backups.

Further, I have followed the Debian install wiki https://github.com/zfsonlinux/zfs/wiki/Debian-Jessie-Root-on-ZFS in setting canmount=off for rpool/ROOT/debian-8/var. I was able to overcome this issue by allowing rpool/ROOT/debian-8/var to mount during install. ...So to my eyes canmount=off cannot be used in Debian Jessie and that is basically the issue here. If the wiki is incorrect or missing some steps, please let me know so I can close this issue and follow your recommendation to use the zfs-discuss list. Thanks.

rlaager commented 4 years ago

Current versions of the HOWTOs set canmount=off on /var, so this presumably works now.