I've tried to reproduce this problem running the following commands:
ubuntu@focal:~$ fallocate -l 8G /home/ubuntu/disk.img
ubuntu@focal:~$ sudo zpool create pool1 /home/ubuntu/disk.img
ubuntu@focal:~$ sudo zfs create -o encryption=on -o keyformat=passphrase
pool1/pool1
Enter passphrase: <pass1>
Re-enter passphrase: <pass1>
ubuntu@focal:~$ sudo mkdir /pool1/pool1/a
ubuntu@focal:~$ sudo zfs create -o encryption=on -o keyformat=passphrase
pool1/pool1/a
Enter passphrase: <pass2>
Re-enter passphrase: <pass2>
ubuntu@focal:~$ sudo zfs umount -a
ubuntu@focal:~$ sudo zfs mount
ubuntu@focal:~$ sudo zfs mount pool1/pool1/a
ubuntu@focal:~$ sudo zfs mount pool1/pool1
cannot mount '/pool1/pool1': directory is not empty
ubuntu@focal:~$
I'm getting the "directory not empty" error, but I'm not able to
reproduce the segfault.
I think we can close this one for now.
@hadmut if you are able to reproduce this problem again, please let us
know and we'll keep investigating at it.
** Changed in: zfs-linux (Ubuntu)
Status: Incomplete => Invalid
--
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to zfs-linux in Ubuntu.
https://bugs.launchpad.net/bugs/1901417
Title:
zfs mount segmentation fault when target directory is non empty
Status in zfs-linux package in Ubuntu:
Invalid
Bug description:
Hi,
I just had made some mistake in a mounting order, thus producing non-
empty target directory.
Imagine a pool name pool1 and zfs filesystems pool1 and pool1/a which
are (due to different encryption keys) to be mounted as
/pool1/a
one in another. (Because of encryption not automatically mounted)
I made a simple mistake and mounted /pool1/a before /pool1, but noticed and
unmounted /pool1/a before mounting /pool1, but forget to rmdir /pool1/a, so
/pool1 was not empty when mounting /pool1.
# zfs mount -a
cannot mount '/pool1': directory is not empty
zsh: segmentation fault (core dumped) zfs mount -a
Segmentation faults should not happen.
after rmdir /pool1/a (i.e. make the target empty), things work as normal.
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: zfsutils-linux 0.8.3-1ubuntu12.4
ProcVersionSignature: Ubuntu 5.4.0-48.52-generic 5.4.60
Uname: Linux 5.4.0-48-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu27.10
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: LXQt
Date: Sun Oct 25 15:28:45 2020
InstallationDate: Installed on 2018-04-30 (909 days ago)
InstallationMedia: Lubuntu 18.04 LTS "Bionic Beaver" - Release amd64
(20180426)
SourcePackage: zfs-linux
UpgradeStatus: Upgraded to focal on 2020-10-02 (23 days ago)
modified.conffile..etc.sudoers.d.zfs: [inaccessible: [Errno 13] Keine
Berechtigung: '/etc/sudoers.d/zfs']
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1901417/+subscriptions
--
Mailing list: https://launchpad.net/~kernel-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~kernel-packages
More help : https://help.launchpad.net/ListHelp