Giter VIP home page Giter VIP logo

mountall's People

Contributors

dajhorn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mountall's Issues

mountall hangs if datasets have duplicate mountpoint properties

I accidentally got my workstation into a state where the boot would hang after the "Running init-bottom...done". The cause turned out to be two datasets that had identical mountpoint properties. This seemed to prevent mountall from mounting either dataset and it would never emit the virtual-filesystems event, blocking udev and other services. If I start a shell on tty2 and mount one of the filesystems manually, mountall completes and the boot continues normally.

I need to verify this, but I think the first dataset with the duplicate mountpoint to show up in zfs list must be non-empty to reproduce this issue. However, as another test, I created a dataset with a non-empty underlying mountpoint, but this did not cause a boot problem. So the duplicate mountpoint properties seem to cause an issue beyond just the mountpoint being non-empty.

For example, this reproduces the issue:

zfs create tank/fish
touch /tank/fish/foo
zfs create -o mountpoint=/tank/fish frog

This does not reproduce it:

zfs create tank/fish
umount /tank/fish
touch /tank/fish/foo

This reproducer is admittedly a configuration error (I introduced it by receiving a replication stream into a test pool) but I thought we should evaluate the impact and how it could be handled better. I could collect more debug data, but I wanted to start by just reporting what happened since @dajhorn may have some insight about it.

$ apt-cache policy mountall ubuntu-zfs
mountall:
  Installed: 2.36.4-zfs1
  Candidate: 2.36.4-zfs1
  Version table:
 *** 2.36.4-zfs1 0
       1001 http://ppa.launchpad.net/zfs-native/daily/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
     2.36 0
        500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
ubuntu-zfs:
  Installed: 7~precise
  Candidate: 7~precise
  Version table:
 *** 7~precise 0
       1001 http://ppa.launchpad.net/zfs-native/daily/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status

$strings /sbin/mountall | grep ZFS
%s: parsing ZFS list

$ grep ZFS_MOUNT /etc/default/zfs
ZFS_MOUNT='no'

configure does not require nih-dbus-tool but should

Building zfsonlinux/mountall saucy branch on Ubuntu 14.04, configure is okay with nih-dbus-tool not being installed, but make fails with /bin/bash: line 2: --package=mountall: command not found when it isn't. Installing nih-dbus-tool fixes the build. If nih-dbus-tool is required, configure shouldn't allow it to be missing.

zfsbuild@ubuntu:~/builds/zfs-spl-auto/mountall$ fakeroot ./debian/rules binary
dh binary
   dh_testdir
   debian/rules override_dh_auto_configure
make[1]: Entering directory `/home/zfsbuild/builds/zfs-spl-auto/mountall'
dh_auto_configure -- --exec-prefix= --libdir=/lib
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking whether make supports nested variables... yes
checking dependency style of gcc... none
checking whether make supports nested variables... (cached) yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 3458764513820540925
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether NLS is requested... yes
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking whether we are using the GNU C Library 2 or newer... yes
checking for ranlib... (cached) ranlib
checking for simple visibility declarations... yes
checking for inline... inline
checking for size_t... yes
checking for stdint.h... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for getpagesize... yes
checking for working mmap... yes
checking whether integer division by zero raises SIGFPE... yes
checking for inttypes.h... yes
checking for unsigned long long int... yes
checking for inttypes.h... (cached) yes
checking whether the inttypes.h PRIxNN macros are broken... no
checking for ld used by GCC... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking for shared library run path origin... done
checking whether imported symbols can be declared weak... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for pthread_kill in -lpthread... yes
checking for pthread_rwlock_t... yes
checking for multithread API to use... posix
checking argz.h usability... yes
checking argz.h presence... yes
checking for argz.h... yes
checking for inttypes.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for unistd.h... (cached) yes
checking for sys/param.h... (cached) yes
checking for getcwd... yes
checking for getegid... yes
checking for geteuid... yes
checking for getgid... yes
checking for getuid... yes
checking for mempcpy... yes
checking for munmap... yes
checking for stpcpy... yes
checking for strcasecmp... yes
checking for strdup... yes
checking for strtoul... yes
checking for tsearch... yes
checking for argz_count... yes
checking for argz_stringify... yes
checking for argz_next... yes
checking for __fsetlocking... yes
checking whether feof_unlocked is declared... yes
checking whether fgets_unlocked is declared... yes
checking for iconv... yes
checking for working iconv... yes
checking for iconv declaration... 
         extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking for NL_LOCALE_NAME macro... yes
checking for bison... no
checking for long long int... yes
checking for wchar_t... yes
checking for wint_t... yes
checking for intmax_t... yes
checking whether printf() supports POSIX/XSI format strings... yes
checking whether we are using the GNU C Library 2.1 or newer... yes
checking for stdint.h... (cached) yes
checking for SIZE_MAX... yes
checking for stdint.h... (cached) yes
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for ptrdiff_t... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for asprintf... yes
checking for fwprintf... yes
checking for putenv... yes
checking for setenv... yes
checking for setlocale... yes
checking for snprintf... yes
checking for wcslen... yes
checking whether _snprintf is declared... no
checking whether _snwprintf is declared... no
checking whether getc_unlocked is declared... yes
checking for nl_langinfo and CODESET... yes
checking for LC_MESSAGES... yes
checking for CFPreferencesCopyAppValue... (cached) no
checking for CFLocaleCopyCurrent... (cached) no
checking whether included gettext is requested... no
checking for GNU gettext in libc... yes
checking whether to use NLS... yes
checking where the gettext function comes from... libc
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc and cc understand -c and -o together... yes
checking for nih-dbus-tool... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for NIH... yes
checking for NIH_DBUS... yes
checking for DBUS... yes
checking for UDEV... yes
checking for PLYMOUTH... yes
checking for gcc option to accept ISO C99... -std=gnu99
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating intl/Makefile
config.status: creating apport/Makefile
config.status: creating dbus/Makefile
config.status: creating src/Makefile
config.status: creating conf/Makefile
config.status: creating util/Makefile
config.status: creating man/Makefile
config.status: creating po/Makefile.in
config.status: creating debian/initramfs/Makefile
config.status: creating debian/initramfs/upstart-jobs/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing po-directories commands
config.status: creating po/POTFILES
config.status: creating po/Makefile
make -C po update-po
make[2]: Entering directory `/home/zfsbuild/builds/zfs-spl-auto/mountall/po'
make mountall.pot-update
make[3]: Entering directory `/home/zfsbuild/builds/zfs-spl-auto/mountall/po'
sed -e '/^#/d' remove-potcdate.sin > t-remove-potcdate.sed
mv t-remove-potcdate.sed remove-potcdate.sed
if LC_ALL=C grep 'GNU mountall' ../* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \
          package_gnu='GNU '; \
        else \
          package_gnu=''; \
        fi; \
        if test -n '' || test '[email protected]' = '@'PACKAGE_BUGREPORT'@'; then \
          msgid_bugs_address=''; \
        else \
          msgid_bugs_address='[email protected]'; \
        fi; \
        case `/usr/bin/xgettext --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
          '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
            /usr/bin/xgettext --default-domain=mountall --directory=.. \
              --add-comments=TRANSLATORS: --keyword=_ --keyword=N_  \
              --files-from=./POTFILES.in \
              --copyright-holder='Free Software Foundation, Inc.' \
              --msgid-bugs-address="$msgid_bugs_address" \
            ;; \
          *) \
            /usr/bin/xgettext --default-domain=mountall --directory=.. \
              --add-comments=TRANSLATORS: --keyword=_ --keyword=N_  \
              --files-from=./POTFILES.in \
              --copyright-holder='Free Software Foundation, Inc.' \
              --package-name="${package_gnu}mountall" \
              --package-version='2.49' \
              --msgid-bugs-address="$msgid_bugs_address" \
            ;; \
        esac
test ! -f mountall.po || { \
          if test -f ./mountall.pot; then \
            sed -f remove-potcdate.sed < ./mountall.pot > mountall.1po && \
            sed -f remove-potcdate.sed < mountall.po > mountall.2po && \
            if cmp mountall.1po mountall.2po >/dev/null 2>&1; then \
              rm -f mountall.1po mountall.2po mountall.po; \
            else \
              rm -f mountall.1po mountall.2po ./mountall.pot && \
              mv mountall.po ./mountall.pot; \
            fi; \
          else \
            mv mountall.po ./mountall.pot; \
          fi; \
        }
make[3]: Leaving directory `/home/zfsbuild/builds/zfs-spl-auto/mountall/po'
test -z "" || make 
make update-gmo
make[3]: Entering directory `/home/zfsbuild/builds/zfs-spl-auto/mountall/po'
make[3]: Leaving directory `/home/zfsbuild/builds/zfs-spl-auto/mountall/po'
make[2]: Leaving directory `/home/zfsbuild/builds/zfs-spl-auto/mountall/po'
make[1]: Leaving directory `/home/zfsbuild/builds/zfs-spl-auto/mountall'
   dh_auto_build
make[1]: Entering directory `/home/zfsbuild/builds/zfs-spl-auto/mountall'
make  all-recursive
make[2]: Entering directory `/home/zfsbuild/builds/zfs-spl-auto/mountall'
Making all in intl
make[3]: Entering directory `/home/zfsbuild/builds/zfs-spl-auto/mountall/intl'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/zfsbuild/builds/zfs-spl-auto/mountall/intl'
Making all in dbus
make[3]: Entering directory `/home/zfsbuild/builds/zfs-spl-auto/mountall/dbus'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/zfsbuild/builds/zfs-spl-auto/mountall/dbus'
Making all in util
make[3]: Entering directory `/home/zfsbuild/builds/zfs-spl-auto/mountall/util'
  GEN      com.ubuntu.Mountall.Server.c
/bin/bash: line 2: --package=mountall: command not found
make[3]: *** [com.ubuntu.Mountall.Server.c] Error 127
make[3]: Leaving directory `/home/zfsbuild/builds/zfs-spl-auto/mountall/util'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/zfsbuild/builds/zfs-spl-auto/mountall'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/zfsbuild/builds/zfs-spl-auto/mountall'
dh_auto_build: make -j1 returned exit code 2
make: *** [binary] Error 2

Using ZFS root, mountall fails to mount /var soon enough

Full description of the problem is here:

https://groups.google.com/a/zfsonlinux.org/forum/?fromgroups=#!topic/zfs-discuss/bmDxY24xrIg

When using a ZFS root file system with / located in rpool/ROOT/ubuntu-1 and /var located in rpool/var, /var is not available when upstart is beginning to start all daemons. This prevents many daemons from starting properly. It seems that /var is only mounted at a later stage.

The reason is unknown to me, as a workaround rpool/var can be moved to rpool/ROOT/ubuntu-1/var (so that it is a descendant of the root file system's data set). This seems to make /var immediately available at boot.

Note: the problem started to appear with ZoL RC12 (or rather, the Ubuntu packages of RC12), RC11 did not show this problem.

stale zpool.cache in initrd

/etc/zfs/zpool.cache gets built into the initrd. This can become problematic and prevent your zfs filesystems from mounting at boot and require them to be forcibly re-imported. As a workaround, you can run 'update-initramfs -k all -u' and that will fix the problem short term.

This became a problem for me because I create a pool using the /dev/sd? names from disks that were attached via USB. While I have this pool attached via USB, there was an update which triggered my initrd to be rebuilt. I them moved these disk onto my sata controller and off of the usb device and then imported it with 'zpool import -d /dev/disk/by-id [pool]'. Everything was working and then I rebooted and none of my zpools mounted (except for my root zpool). A zpool status showed that the pool was unavailable because the /dev/sd? devices were missing. So I exported the pool, did an import as mentioned above and that failed until I added -f to the import which was successful. I checked the contents of zpool.cache and it correctly had the device paths using by-id.

At this point I rebooted and the whole process started over again. The zpool.cache had the correct information, but zpool status showed the wrong device paths. I get everything back into working order and rebuilt my initrd. Finally I rebooted and all was well.

Really, the zpool.cache file should not be in the initrd. But clearly it is and it is being used and causing a problem. Perhaps updating the code to ensure that the zpool.cache file is ignored prior to the real / is mounted?

zfs starts with /home mounted as readonly=on temporray

I have had this happen on 2 machines both running 12.04 ubuntu . I have tried several things to fix it to no avail please see my issue here for more details: openzfs/zfs#2133

it would be great if there were some way I could mount my home directory without having to mandaid shell every time I boot.

please help

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.