Trying to reinstall ZFS on Xenial. Cannot mount existing zpool with identifier from /mnt/disk/by-id/xxxx

Bug #1654708 reported by Peter Goodall
118
This bug affects 21 people
Affects Status Importance Assigned to Milestone
zfs-linux (Ubuntu)
Fix Released
High
Colin Ian King

Bug Description

Description: Ubuntu 16.04.1 LTS
Release: 16.04

zfs-dkms 0.6.5.6-0ubuntu15

I cant mount/install my zpool. so i tried reinstalling zfslinux-utils, which gives me three error messages like this: "zfs-mount.service is a disabled" or a static unit, not starting it."...

If something doesn't work I try googling error messages. most answers not totally like my problem but related to dkms, so I tried loading zfs-dkms and reinstalling zfslinux-utils.

I created the zpool with id from /mnt/disk/by-id/ - which is zfs good-practice. This may be causing problems with the mount. I dont know...

Cheers.

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: zfs-dkms 0.6.5.6-0ubuntu15
ProcVersionSignature: Ubuntu 4.4.0-58.79-generic 4.4.35
Uname: Linux 4.4.0-58-generic x86_64
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl
ApportVersion: 2.20.1-0ubuntu2.4
Architecture: amd64
DKMSKernelVersion: 4.4.0-58-generic
Date: Sat Jan 7 15:58:15 2017
DuplicateSignature: dkms:zfs-dkms:0.6.5.6-0ubuntu15:/var/lib/dkms/zfs/0.6.5.6/build/module/zfs/zpl_xattr.c:1284:12: error: too few arguments to function ‘posix_acl_valid’
InstallationDate: Installed on 2016-12-26 (12 days ago)
InstallationMedia: Ubuntu 16.04.1 LTS "Xenial Xerus" - Beta amd64 (20161225)
PackageVersion: 0.6.5.6-0ubuntu15
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.1
 apt 1.2.18
SourcePackage: zfs-linux
Title: zfs-dkms 0.6.5.6-0ubuntu15: zfs kernel module failed to build
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Peter Goodall (pjgoodall) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in zfs-linux (Ubuntu):
status: New → Confirmed
Changed in zfs-linux (Ubuntu):
importance: Undecided → High
Revision history for this message
Michael T. (p-ubuntu-one) wrote :
Download full text (4.4 KiB)

zfs is killed with kernel update in xenial similar as with 14.04:
https://github.com/zfsonlinux/zfs/issues/5408
https://github.com/zfsonlinux/pkg-zfs/issues/219

The 14.04 issue fixed.

when i try to compile
dkms install -m zfs -v 0.6.5.6 -k 4.4.0-59-generic

then get:
....
   CC [M] /var/lib/dkms/zfs/0.6.5.6/build/module/zfs/zpl_xattr.o
 /var/lib/dkms/zfs/0.6.5.6/build/module/zfs/zpl_xattr.c: In function '__zpl_xattr_acl_set_access':
 /var/lib/dkms/zfs/0.6.5.6/build/module/zfs/zpl_xattr.c:1284:28: warning: passing argument 1 of 'posix_acl_valid' from incompatible pointer type [-Wincompatible-pointer-types]
     error = posix_acl_valid(acl);
                             ^
 In file included from /var/lib/dkms/zfs/0.6.5.6/build/include/linux/vfs_compat.h:204:0,
                  from /var/lib/dkms/zfs/0.6.5.6/build/include/sys/zpl.h:37,
                  from /var/lib/dkms/zfs/0.6.5.6/build/include/sys/zfs_vnops.h:34,
                  from /var/lib/dkms/zfs/0.6.5.6/build/module/zfs/zpl_xattr.c:81:
 include/linux/posix_acl.h:84:12: note: expected 'struct user_namespace *' but argument is of type 'struct posix_acl *'
  extern int posix_acl_valid(struct user_namespace *, const struct posix_acl *);
             ^
 /var/lib/dkms/zfs/0.6.5.6/build/module/zfs/zpl_xattr.c:1284:12: error: too few arguments to function 'posix_acl_valid'
     error = posix_acl_valid(acl);
             ^
 In file included from /var/lib/dkms/zfs/0.6.5.6/build/include/linux/vfs_compat.h:204:0,
                  from /var/lib/dkms/zfs/0.6.5.6/build/include/sys/zpl.h:37,
                  from /var/lib/dkms/zfs/0.6.5.6/build/include/sys/zfs_vnops.h:34,
                  from /var/lib/dkms/zfs/0.6.5.6/build/module/zfs/zpl_xattr.c:81:
 include/linux/posix_acl.h:84:12: note: declared here
  extern int posix_acl_valid(struct user_namespace *, const struct posix_acl *);
             ^
 /var/lib/dkms/zfs/0.6.5.6/build/module/zfs/zpl_xattr.c: In function '__zpl_xattr_acl_set_default':
 /var/lib/dkms/zfs/0.6.5.6/build/module/zfs/zpl_xattr.c:1323:28: warning: passing argument 1 of 'posix_acl_valid' from incompatible pointer type [-Wincompatible-pointer-types]
     error = posix_acl_valid(acl);
                             ^
 In file included from /var/lib/dkms/zfs/0.6.5.6/build/include/linux/vfs_compat.h:204:0,
                  from /var/lib/dkms/zfs/0.6.5.6/build/include/sys/zpl.h:37,
                  from /var/lib/dkms/zfs/0.6.5.6/build/include/sys/zfs_vnops.h:34,
                  from /var/lib/dkms/zfs/0.6.5.6/build/module/zfs/zpl_xattr.c:81:
 include/linux/posix_acl.h:84:12: note: expected 'struct user_namespace *' but argument is of type 'struct posix_acl *'
  extern int posix_acl_valid(struct user_namespace *, const struct posix_acl *);
             ^
 /var/lib/dkms/zfs/0.6.5.6/build/module/zfs/zpl_xattr.c:1323:12: error: too few arguments to function 'posix_acl_valid'
     error = posix_acl_valid(acl);
             ^
 In file included from /var/lib/dkms/zfs/0.6.5.6/build/include/linux/vfs_compat.h:204:0,
                  from /var/lib/dkms/zfs/0.6.5.6/build/include/sys/zpl.h:37,
                  from /var/lib/dkms/zfs/0.6.5.6/build/include/sys/zfs_vnops.h:34,
           ...

Read more...

Revision history for this message
Peter Goodall (pjgoodall) wrote : Re: [Bug 1654708] Re: Trying to reinstall ZFS on Xenial. Cannot mount existing zpool with identifier from /mnt/disk/by-id/xxxx
Download full text (7.2 KiB)

Hi Michael,

Looks like this email was direct from you. I'm just a user that reported
the bug using the reporting system in Xenia. No hope in hell of me fixing
it :-)
I'm not even really sure how you should add your feedback to the bug
reporting system.

Cheers,
--Peter Goodall

On Sun, 22 Jan 2017 at 11:55, Michael T. <email address hidden> wrote:

> zfs is killed with kernel update in xenial similar as with 14.04:
> https://github.com/zfsonlinux/zfs/issues/5408
> https://github.com/zfsonlinux/pkg-zfs/issues/219
>
> The 14.04 issue fixed.
>
> when i try to compile
> dkms install -m zfs -v 0.6.5.6 -k 4.4.0-59-generic
>
> then get:
> ....
> CC [M] /var/lib/dkms/zfs/0.6.5.6/build/module/zfs/zpl_xattr.o
> /var/lib/dkms/zfs/0.6.5.6/build/module/zfs/zpl_xattr.c: In function
> '__zpl_xattr_acl_set_access':
> /var/lib/dkms/zfs/0.6.5.6/build/module/zfs/zpl_xattr.c:1284:28: warning:
> passing argument 1 of 'posix_acl_valid' from incompatible pointer type
> [-Wincompatible-pointer-types]
> error = posix_acl_valid(acl);
> ^
> In file included from /var/lib/dkms/zfs/
> 0.6.5.6/build/include/linux/vfs_compat.h:204:0,
> from /var/lib/dkms/zfs/
> 0.6.5.6/build/include/sys/zpl.h:37,
> from /var/lib/dkms/zfs/
> 0.6.5.6/build/include/sys/zfs_vnops.h:34,
> from /var/lib/dkms/zfs/
> 0.6.5.6/build/module/zfs/zpl_xattr.c:81:
> include/linux/posix_acl.h:84:12: note: expected 'struct user_namespace *'
> but argument is of type 'struct posix_acl *'
> extern int posix_acl_valid(struct user_namespace *, const struct
> posix_acl *);
> ^
> /var/lib/dkms/zfs/0.6.5.6/build/module/zfs/zpl_xattr.c:1284:12: error:
> too few arguments to function 'posix_acl_valid'
> error = posix_acl_valid(acl);
> ^
> In file included from /var/lib/dkms/zfs/
> 0.6.5.6/build/include/linux/vfs_compat.h:204:0,
> from /var/lib/dkms/zfs/
> 0.6.5.6/build/include/sys/zpl.h:37,
> from /var/lib/dkms/zfs/
> 0.6.5.6/build/include/sys/zfs_vnops.h:34,
> from /var/lib/dkms/zfs/
> 0.6.5.6/build/module/zfs/zpl_xattr.c:81:
> include/linux/posix_acl.h:84:12: note: declared here
> extern int posix_acl_valid(struct user_namespace *, const struct
> posix_acl *);
> ^
> /var/lib/dkms/zfs/0.6.5.6/build/module/zfs/zpl_xattr.c: In function
> '__zpl_xattr_acl_set_default':
> /var/lib/dkms/zfs/0.6.5.6/build/module/zfs/zpl_xattr.c:1323:28: warning:
> passing argument 1 of 'posix_acl_valid' from incompatible pointer type
> [-Wincompatible-pointer-types]
> error = posix_acl_valid(acl);
> ^
> In file included from /var/lib/dkms/zfs/
> 0.6.5.6/build/include/linux/vfs_compat.h:204:0,
> from /var/lib/dkms/zfs/
> 0.6.5.6/build/include/sys/zpl.h:37,
> from /var/lib/dkms/zfs/
> 0.6.5.6/build/include/sys/zfs_vnops.h:34,
> from /var/lib/dkms/zfs/
> 0.6.5.6/build/module/zfs/zpl_xattr.c:81:
> include/linux/posix_acl.h:84:12: note: expected 'struct user_namespace *'
> but argument is of type 'struct posix_acl *'
> extern int posix_acl_valid(st...

Read more...

Revision history for this message
Milos Leskanic (emel) wrote :

Problem persists with kernel 4.4.0-62. Looks like the only hope left is to wait for 16.04.2 point release (currently pushed out to Feb 9) and see how things go with (HWE) kernel 4.8. Did anyone give it a chance earlier by trying out hwe-16.04-edge kernel package?

negre (raymond-negre46)
Changed in zfs-linux (Ubuntu):
status: Confirmed → Incomplete
status: Incomplete → Confirmed
Revision history for this message
Michael T. (p-ubuntu-one) wrote :

Some more details....

A posix function in kernel has changed between 4.4.0-57 and 4.4.0-59

./linux-headers-4.4.0-53/include/linux/posix_acl.h:extern int posix_acl_valid(const struct posix_acl *);
./linux-headers-4.4.0-57/include/linux/posix_acl.h:extern int posix_acl_valid(const struct posix_acl *);
./linux-headers-4.4.0-59/include/linux/posix_acl.h:extern int posix_acl_valid(struct user_namespace *, const struct posix_acl *);
./linux-headers-4.4.0-62/include/linux/posix_acl.h:extern int posix_acl_valid(struct user_namespace *, const struct posix_acl *);

The zfs kernel modul is not updated to match these changes.
see: https://fossies.org/diffs/zfs/0.6.5.7_vs_0.6.5.8/module/zfs/zpl_xattr.c-diff.html

I have tried the following:

Replaced all occurrences
   error = posix_acl_valid(acl);
with
   error = posix_acl_valid(ip, acl);
in file:
    /usr/src/zfs-0.6.5.6/module/zfs/zpl_xattr.c

 dkms remove -m zfs -v 0.6.5.6 -k 4.4.0-62-generic
 dkms install --force -m zfs -v 0.6.5.6 -k 4.4.0-62-generic
does compiles now.

System seems to work.

Revision history for this message
Milos Leskanic (emel) wrote :

Perfect, thank you very much - this did the trick, for me too.

Revision history for this message
Peter Goodall (pjgoodall) wrote :

Hello all,

I believe a fix was just delivered to my workstation. It failed to build on my machine. I have attached the log at:
/var/lib/dkms/zfs/0.6.5.6/build/make.log

An automated error report should appear attached to this topic as well. Not sure how that error report gets delivered. If i need to submit any more files - please let me know.

Cheers...

Revision history for this message
David Martinka (mainmachine) wrote :

I ran into this same problem today on an update.

The above fix in #6 worked for me on:

Ubuntu 16.04.2 LTS

4.4.0-62-generic

The DKMS modules now compile after editing /usr/src/zfs-0.6.5.6/module/zfs/zpl_xattr.c

Revision history for this message
K1773R (k1773r) wrote :

Now wait 1 year till they MAYBE will fix it...

Revision history for this message
Frits Jalvingh (fjalvingh) wrote :

Thanks a lot, Michael T; Your solution in #6 worked like a charm!

Revision history for this message
Alan B. Clements (alan-clements) wrote :

#6 Worked on 4.4.0-63-generic as well

Revision history for this message
Sam Bouwer (sambouwer-14) wrote :

Had the same issue. I was unable to import my zpools after a clean install (I did a zpool export before the reinstall).

I'm running the following version of Ubuntu:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial

I'm running the following kernel version:

$ uname -a
Linux UniServer 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:09:55 UTC 2017 i686 i686 i686 GNU/Linux

I've edited the file mentioned in post #6, rebooted, ran the commands and tried to check the status of the zpools. They were already imported! Issue solved.

Thank you Michael T. for your post!

Revision history for this message
Sam Bouwer (sambouwer-14) wrote :

Just did a fresh install with an dist-upgrade to 4.4.0-64, and

apt-get install zfs

worked just fine:). After reboot the exported zpools were automatically imported.

Revision history for this message
John Bridges (john.bridges) wrote :

I just upgraded from 14.04 to 16.04 4.4.0-64-generic

At first the modprobe zfs seemed to work if done manually after boot.
Once I removed zfsutils-linux, and re-installed it would no longer work.
I tried multiple variations of removing and re-adding ZFS, and did purge all old ZFS versions from Trusty install.

The only fix I could get to function was to modify the source for zpl_xattr.c
There were two calls to posix_acl_valid, one in __zpl_xattr_acl_set_access, and one in __zpl_xattr_acl_set_default.
I changed them as described above, and did dpkg-reconfigure zfs-dkms

The ZFS kernel module would not load until I rebooted, then it all came up and mounted my ZFS pools automatically.

It appears this fix is already in the master ZFS on Linux source:
https://github.com/zfsonlinux/zfs/blob/master/module/zfs/zpl_xattr.c

Hopefully this will end up in Ubuntu soon?

Revision history for this message
Colin Ian King (colin-king) wrote :

This was fixed with:

zfs-linux (0.6.5.6-0ubuntu16) xenial; urgency=medium

  * Enable zfs to respect RSIZE_LIMIT limits (LP: #1656259)
    - backport of zfs upstream commit 4b908d32200b6e5c7b5115322b6c8d25e770daa0
      ("Linux 4.8 compat: posix_acl_valid()") to facilitate changes in posix_acl_valid.
      1015-Linux-4.8-compat-posix_acl_valid.patch
    - backport of upstream commit 933ec999511f3d29de005bfa8966ae007b161c0f
      ("Retire .write/.read file operations")
      1016-Retire-.write-.read-file-operations.patch

with upstream commit:

commit 4b908d32200b6e5c7b5115322b6c8d25e770daa0
Author: Brian Behlendorf <email address hidden>
Date: Tue Aug 2 11:11:45 2016 -0700

    Linux 4.8 compat: posix_acl_valid()

    The posix_acl_valid() function has been updated to require a
    user namespace. Filesystem callers should normally provide the
    user_ns from the super block associcated with the ACL; the
    zpl_posix_acl_valid() wrapper has been added for this purpose.
    See https://github.com/torvalds/linux/commit/0d4d717f for
    complete details.

    Signed-off-by: Brian Behlendorf <email address hidden>
    Signed-off-by: Nikolay Borisov <email address hidden>
    Signed-off-by: Chunwei Chen <email address hidden>
    Closes #4922

https://github.com/zfsonlinux/zfs/pull/4922

Changed in zfs-linux (Ubuntu):
status: Confirmed → Fix Released
assignee: nobody → Colin Ian King (colin-king)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.