Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 257195 - sys-apps/openrc: Failed to umount loopback filessystem at halt if a bind mount in it
Summary: sys-apps/openrc: Failed to umount loopback filessystem at halt if a bind moun...
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: x86 Linux
: High normal with 1 vote (vote)
Assignee: OpenRC Team
Depends on: 219823
  Show dependency tree
Reported: 2009-02-01 10:35 UTC by Jens Meißner
Modified: 2017-03-30 18:58 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Jens Meißner 2009-02-01 10:35:13 UTC
I have a filessystem images for the portage tree mountet with /dev/loop. The distfiles directory is mounted with option bind from a other directory.

/dev/sda3              /                     ext3  noatime 0 1
/storage/data/portage /usr/portage           btrfs loop    0 0
/storage/distfiles    /usr/portage/distfiles none  bind    0 0

On shutdown the system can't umount local filessystems

Reproducible: Always

Steps to Reproduce:
1. Create a image file, create file system and mount it
2. Mount a directory to a directory below the directory as mounted image
3. shutdown system

Actual Results:  
* Unmounting loopback filesystems
* Failed to unmount filesystems                 [!!]
* Unmounting loopback filesystems (retry)
* Failed to unmount filesystems                 [!!]
* Unmounting loopback filesystems (retry)
* Failed to unmount filesystems                 [!!]

Expected Results:  
Unmounting loopback filesystems                 [OK]

Portage 2.2_rc23 (default/linux/x86/2008.0/desktop, gcc-4.3.2, glibc-2.7-r2, 2.6.27-gentoo-r8 i686)
System uname: Linux-2.6.27-gentoo-r8-i686-Genuine_Intel-R-_CPU_T2300_@_1.66GHz-with-glibc2.0
Timestamp of tree: Sun, 01 Feb 2009 08:30:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7-r1, 2.1.6-r1
dev-lang/python:     2.4.4-r14, 2.5.2-r7
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.4.8
sys-apps/baselayout: 1.12.12
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
CFLAGS="-march=native -O3 -pipe -fomit-frame-pointer"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/bind /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=native -O3 -pipe -fomit-frame-pointer"
FEATURES="ccache distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
LINGUAS="de en"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="X acl acpi alsa apache2 avahi bash-completion bluetooth branding bzip2 cairo cdr cli cracklib crypt cups curl dbus dri dvd dvdr dvdread eds emboss encode esd evo fam firefox fortran ftp gdbm gif gnome gnutls gpm gstreamer gtk hal iconv isdnlog java jpeg libnotify mad midi mikmod mp3 mpeg mudflap mysql nautilus ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl php png ppds pppd python qt3support quicktime readline reflection samba sasl sdl session spell spl ssl startup-notification svg sysfs tcpd tiff truetype unicode usb vorbis win32codecs x86 xml xorg xulrunner xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" USERLAND="GNU" VIDEO_CARDS="nvidia"
Comment 1 SpanKY gentoo-dev 2009-10-11 09:42:23 UTC
any sort of recursive mounting is pretty hard to undo
Comment 2 Eduardo García 2017-03-29 13:32:04 UTC
I'm test these and I think that it's solved.

My fstab extract:
/home/vagrant/test.iso   /mnt/iso                     auto loop    0 0
/mnt/iso/data/portage    /mnt/usr/portage             none bind    0 0
/mnt/iso/distfiles       /mnt/usr/portage/distfiles   none  bind   0 0

shutdown result:
* Unmounting loop devices
*   Remounting /mnt/usr/portage/distfiles read only ... [ ok ]
*   Remounting /mnt/usr/portage read only ...           [ ok ]
*   Remounting /mnt/iso read only ...                   [ ok ]

Just miss me one thing "Remounting", but it seems solved.

If more tests are needed I'm happy to do.
Comment 3 Eduardo García 2017-03-29 13:37:32 UTC
(In reply to Eduardo García from comment #2)
Sorry, I'm using the master branch on git, OpenRC version 0.25.51a292e