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

ZFS Linux boot issues #6700

Closed
alaraun opened this issue Oct 1, 2017 · 2 comments
Closed

ZFS Linux boot issues #6700

alaraun opened this issue Oct 1, 2017 · 2 comments

Comments

@alaraun
Copy link
Contributor

alaraun commented Oct 1, 2017

System information

Type Version/Name
Distribution Name Debian
Distribution Version unstable
Linux Kernel 4.12.13
Architecture x86_64
ZFS Version 0.7.2
SPL Version 0.7.0-12_g9df9692

Describe the problem you're observing

  • Can'tt get snapshot selection list as '-r' is missing when listing snapshots.
  • quiet boot displays "lvm is not available"

Describe how to reproduce the problem

  • Boot from snapshot without giving snapshot name ie rpool/ROOT/debian@

Fixes

diff --git a/contrib/initramfs/scripts/zfs b/contrib/initramfs/scripts/zfs
index 68373d2f2..4650c9646 100644
--- a/contrib/initramfs/scripts/zfs
+++ b/contrib/initramfs/scripts/zfs
@@ -579,10 +579,10 @@ ask_user_snap()
            eval `echo SNAP_$i=$snap`
            i=$((i + 1))
        done <<EOT
-$("${ZFS}" list -H -oname -tsnapshot "${fs}")
+$("${ZFS}" list -H -oname -tsnapshot -r "${fs}")
 EOT
 
-       echo -n "  Snap nr [0-$((i-1))]? " > /dev/stderr
+       echo -n "  Snap nr [1-$((i-1))]? " > /dev/stderr
        read snapnr
 
        # Re-enable debugging.
diff --git a/contrib/initramfs/scripts/local-top/zfs b/contrib/initramfs/scripts/local-top/zfs
index f09b2c81b..e8e5cd264 100755
--- a/contrib/initramfs/scripts/local-top/zfs
+++ b/contrib/initramfs/scripts/local-top/zfs
@@ -44,7 +44,7 @@ activate_vg()
 {
         # Sanity checks
         if [ ! -x /sbin/lvm ]; then
-                message "lvm is not available"
+                [ "$quiet" != "y" ] && message "lvm is not available"
                 return 1
         fi

@behlendorf
Copy link
Contributor

Thanks, can you open a PR with the proposed fix.

@alaraun
Copy link
Contributor Author

alaraun commented Oct 10, 2017

PR #6747

@alaraun alaraun closed this as completed Oct 10, 2017
behlendorf pushed a commit that referenced this issue Oct 11, 2017
* Correct ZFS snapshot listing
* Disable "lvm is not available" message on quiet boot

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alar Aun <spamtoaun@gmail.com>
Closes #6700 
Closes #6747
aerusso pushed a commit to aerusso/zfs that referenced this issue Oct 11, 2017
* Correct ZFS snapshot listing
* Disable "lvm is not available" message on quiet boot

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alar Aun <spamtoaun@gmail.com>
Closes openzfs#6700 
Closes openzfs#6747
aerusso pushed a commit to aerusso/zfs that referenced this issue Oct 12, 2017
* Correct ZFS snapshot listing
* Disable "lvm is not available" message on quiet boot

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alar Aun <spamtoaun@gmail.com>
Closes openzfs#6700 
Closes openzfs#6747
tonyhutter pushed a commit that referenced this issue Oct 16, 2017
* Correct ZFS snapshot listing
* Disable "lvm is not available" message on quiet boot

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alar Aun <spamtoaun@gmail.com>
Closes #6700
Closes #6747
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