Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debian: pool is not imported/nothing is mounted upon reboot #2979

Closed
yarikoptic opened this issue Dec 19, 2014 · 2 comments
Closed

Debian: pool is not imported/nothing is mounted upon reboot #2979

yarikoptic opened this issue Dec 19, 2014 · 2 comments

Comments

@yarikoptic
Copy link

jessie installation of 0.6.3; pool contains some drives (interfaced from the system board, not the LSI HBA) which are not present among by-id which forbids import of the pool via by-id. But also upon reboot if I set USE_DISK_BY_ID='no' then it would not import since it tries to use zpool.cache which gets removed (somewhere in zfs-mount stop). So I have had following change done for the case when cache file doesn't exist -- just try to import:

diff --git a/init.d/zfs-mount b/init.d/zfs-mount
index e02c414..0b6ff68 100755
--- a/init.d/zfs-mount
+++ b/init.d/zfs-mount
@@ -33,7 +33,7 @@ servicename=zfs-mount
 do_import()
 {
        if [ "$USE_DISK_BY_ID" == 'yes' ]; then
-               $log_begin_msg "Importing ZFS pools"
+               $log_begin_msg "Importing ZFS pools (by-id)"
                "$ZPOOL" import -d /dev/disk/by-id -aN 2>/dev/null || true # stupid zpool will fail if all pools are already imported
                RET=$?

@@ -43,7 +43,7 @@ do_import()

                $log_end_msg $RET
        elif [ -f "$ZPOOL_CACHE" ] ; then
-               $log_begin_msg "Importing ZFS pools"
+               $log_begin_msg "Importing ZFS pools (from $ZPOOL_CACHE)"
                "$ZPOOL" import -c "$ZPOOL_CACHE" -aN 2>/dev/null || true # stupid zpool will fail if all pools are already imported
                RET=$?

@@ -52,6 +52,16 @@ do_import()
                fi

                $log_end_msg $ret
+       else
+               $log_begin_msg "Importing ZFS pools (-a)"
+               "$ZPOOL" import -aN 2>/dev/null || true # stupid zpool will fail if all pools are already imported
+               RET=$?
+
+               if [ "$RET" -eq 0 ]; then
+                       POOL_IMPORTED=1
+               fi
+
+               $log_end_msg $ret
        fi
 }

not sure against which repo to file this issue so here you are

@FransUrbo
Copy link
Contributor

    if [ "$USE_DISK_BY_ID" == 'yes' ]; then
  •           $log_begin_msg "Importing ZFS pools"
    
  •           $log_begin_msg "Importing ZFS pools (by-id)"
            "$ZPOOL" import -d /dev/disk/by-id -aN 2>/dev/null || true # stupid zpool will fail if all pools are already imported
            RET=$?
    
    This snippet looks like 0.6.3 (not dailies). In the dailies I've almost completely rewritten the initrd scripts.

The new version is also in PR #2087.

I will not back port any fixes to 0.6.3 that isn't "life threatening" (according to 'good' Debian GNU/Linux stable update rules), so could you please close this as "won't fix"?

BTW, since this is a packaging issue, it belong(ed) to the https://github.com/zfsonlinux/pkg-zfs repo, but if you just close it, I'm not going to make you move it :).

@yarikoptic
Copy link
Author

doh -- right -- forgot to state the version. yes -- 0.6.3

as for labeling -- I would not be able to do so. so one of the developers would need to. Meanwhile I consider it resolved by the #2087 which is marked for 0.6.4. Cool and thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants