libnvpair.so.1 should be in /lib/, not /usr/lib/

Bug #1596835 reported by Lennart Karssen
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zfs-linux (Ubuntu)
Fix Released
Medium
Unassigned
Xenial
Fix Released
Medium
Colin Ian King
Zesty
Fix Released
Medium
Unassigned
Artful
Fix Released
Medium
Unassigned

Bug Description

[SRU JUSTIFICATION XENIAL]

Currently, in Ubuntu 16.04, the package libnvpair1linux puts libnvpair.so.1 in /usr/lib/, however, tools like zpool and zfs which are installed in /sbin/ need this library. According to the FHS this means the required libraries should be in /lib/ in order to allow the user to install /usr/ on a separate partition that is not immediately available after boot.

This turns out to be a problem indeed. On one of my systems I had /usr/ on a ZFS filesystem (and /, /lib/, /sbin/, /bin/ on a separate ext4 partition). However, the system failed to boot: it hung while mounting the ZFS partitions which failed because zpool import didn't work as it couldn't find libnvpair.so.1.

$ apt-cache policy libnvpair1linux
libnvpair1linux:
  Installed: 0.6.5.6-0ubuntu9
  Candidate: 0.6.5.6-0ubuntu9
  Version table:
 *** 0.6.5.6-0ubuntu9 500
        500 http://nl.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
        100 /var/lib/dpkg/status
     0.6.5.6-0ubuntu8 500
        500 http://nl.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

$ apt-cache policy zfsutils-linux
zfsutils-linux:
  Installed: 0.6.5.6-0ubuntu9
  Candidate: 0.6.5.6-0ubuntu9
  Version table:
 *** 0.6.5.6-0ubuntu9 500
        500 http://nl.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
        100 /var/lib/dpkg/status
     0.6.5.6-0ubuntu8 500
        500 http://nl.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

[FIX]
Correctly set path by modifying the debian install files for the specific libraries to match the correct settings found in releases after Xenial.

[TEST]
The path /usr/lib/ should no longer be populated with zfs libraries and instead they are located after the fix in /lib as expected.

[REGRESSION POTENTIAL]
There could be other applications that are relying on the location of the libraries and so moving them could break these. However, they should not be using hard coded paths, so this regression is limited to badly coded applications that I am not aware of.

The fix upgrade has been tested and double check with the ubuntu kernel team ZFS regression tests without issue.

-------------

Revision history for this message
Richard Laager (rlaager) wrote :

The same applies to libuutil1linux, libzfs2linux, and libzpool2linux. They are all required by the zfs and zpool commands.

Revision history for this message
Lennart Karssen (l.c.karssen) wrote :

Yes, that makes sense. I should have looked a bit further. Thank you for pointing this out.

Revision history for this message
Richard Laager (rlaager) wrote :

FWIW, these are fixed in Debian. So hopefully we'll see this fix in Ubuntu 17.04.

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

This is indeed fixed in 17.04 Zesty onwards. I'll SRU this sometime in the future for earlier releases

Changed in zfs-linux (Ubuntu Zesty):
status: New → Fix Released
importance: Undecided → Medium
Changed in zfs-linux (Ubuntu Xenial):
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Colin Ian King (colin-king)
Changed in zfs-linux (Ubuntu Artful):
status: New → Fix Committed
status: Fix Committed → Fix Released
importance: Undecided → Medium
description: updated
Changed in zfs-linux (Ubuntu Xenial):
status: Triaged → In Progress
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Lennart, or anyone else affected,

Accepted zfs-linux into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/zfs-linux/0.6.5.6-0ubuntu18 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in zfs-linux (Ubuntu Xenial):
status: In Progress → Fix Committed
Revision history for this message
Colin Ian King (colin-king) wrote :

Tested with zfs 0.6.5.6-0ubuntu18, libraries now in correct location. Also passes zfs smoke tests. Existing zfs file systems also work post upgrade. Looks good to me.

tags: added: verification-done-xenial
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package zfs-linux - 0.6.5.6-0ubuntu18

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

  * Improve cloning performance for large numbers of clones (LP: #1567557)
    Bump zcmd buffer from 16K to 256K.
  * Correctly install libraries such as libnvpair.so.1 to /lib and not /usr/lib,
    this also fixes boot issues (LP: #1596835)

 -- Colin Ian King <email address hidden> Fri, 11 Aug 2017 08:33:23 +0100

Changed in zfs-linux (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for zfs-linux has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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.