Skip to content

mountall hangs if datasets have duplicate mountpoint properties #5

@nedbass

Description

@nedbass

I accidentally got my workstation into a state where the boot would hang after the "Running init-bottom...done". The cause turned out to be two datasets that had identical mountpoint properties. This seemed to prevent mountall from mounting either dataset and it would never emit the virtual-filesystems event, blocking udev and other services. If I start a shell on tty2 and mount one of the filesystems manually, mountall completes and the boot continues normally.

I need to verify this, but I think the first dataset with the duplicate mountpoint to show up in zfs list must be non-empty to reproduce this issue. However, as another test, I created a dataset with a non-empty underlying mountpoint, but this did not cause a boot problem. So the duplicate mountpoint properties seem to cause an issue beyond just the mountpoint being non-empty.

For example, this reproduces the issue:

zfs create tank/fish
touch /tank/fish/foo
zfs create -o mountpoint=/tank/fish frog

This does not reproduce it:

zfs create tank/fish
umount /tank/fish
touch /tank/fish/foo

This reproducer is admittedly a configuration error (I introduced it by receiving a replication stream into a test pool) but I thought we should evaluate the impact and how it could be handled better. I could collect more debug data, but I wanted to start by just reporting what happened since @dajhorn may have some insight about it.

$ apt-cache policy mountall ubuntu-zfs
mountall:
  Installed: 2.36.4-zfs1
  Candidate: 2.36.4-zfs1
  Version table:
 *** 2.36.4-zfs1 0
       1001 http://ppa.launchpad.net/zfs-native/daily/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
     2.36 0
        500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
ubuntu-zfs:
  Installed: 7~precise
  Candidate: 7~precise
  Version table:
 *** 7~precise 0
       1001 http://ppa.launchpad.net/zfs-native/daily/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status

$strings /sbin/mountall | grep ZFS
%s: parsing ZFS list

$ grep ZFS_MOUNT /etc/default/zfs
ZFS_MOUNT='no'

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions