Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 295014 - Remounting remaining filesystems readonly failed when started openvz ve
Summary: Remounting remaining filesystems readonly failed when started openvz ve
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Peter Volkov (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-29 03:57 UTC by billy
Modified: 2010-02-01 08:32 UTC (History)
1 user (show)

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


Attachments
lsof result (2.txt,12.10 KB, text/plain)
2009-12-01 01:58 UTC, billy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description billy 2009-11-29 03:57:59 UTC
sys-cluster/vzctl-3.0.23-r2 with sys-kernel/openvz-sources-2.6.27.2.1-r4:
when I started any VE at anytime and reboot/shutdown the system, the / cannot be umounted due to system is busy. I tried to stop the VE manually and updated to basylayout from 1.12.13 to 2.0.1 but still cannot solve it.

Here are the steps to create the VE,
# cd /vz/template/cache
# wget http://bb.xnull.de/projects/gentoo/stages/i686/gentoo-i686-20091007/openvz/gentoo-openvz-i686-20091007.tar.gz
# vzctl create <vpsid> --ostemplate gentoo-openvz-i686-20091007
Note: Do not use vpsids <=100, they are reserved. 
# vzctl set <vpsid> --netif_add eth0,,veth<vpsid>,,br0 --hostname <hostname> --nameserver 192.168.1.4 --save
# nano /etc/vz/conf/<vpsid>.start
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
#!/bin/bash
IP="192.168.1.x"
GW="192.168.1.4"
ifconfig eth0 $IP && echo "Setting IP: $IP"
route add default gw $GW && echo "Setting Gateway: $GW"
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
# chmod 755 /etc/vz/conf/<vpsid>.start 
# vzctl start <vpsid>


Reproducible: Always

Steps to Reproduce:
1. start gentoo linux
2. start vz service
3. start any VE client
4. shutdown gentoo linux

Actual Results:  
Remounting / failed, system is busy


Expected Results:  
umount / clearly

 # emerge --info
Portage 2.1.6.13 (default/linux/x86/10.0/server, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.27-openvz-briullov.1-r4 i686)
=================================================================
System uname: Linux-2.6.27-openvz-briullov.1-r4-i686-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_3600+-with-gentoo-1.12.13
Timestamp of tree: Thu, 26 Nov 2009 11:00:23 +0000
app-shells/bash:     4.0_p28
dev-java/java-config: 2.1.9-r1
dev-lang/python:     2.6.2-r1
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.63-r1
sys-devel/automake:  1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
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/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=athlon64 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp.jaist.ac.jp/pub/Linux/Gentoo/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="apache2 berkdb bzip2 cjk cli cracklib crypt cups dri fortran gdbm gpm iconv imap maildir modules mudflap mysql ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection rmquota session smp snmp spl ssl symlink sysfs syslog tcpd threads truetype unicode urandom userlocales x86 xml xorg 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 asis auth_basic auth_digest authn_file authz_groupfile authz_host authz_user autoindex cache dav dav_lock dav_fs deflate dir env expires filter headers include info log_config logio mime negotiation rewrite setenvif speling status userdir usertrack" APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 1 Peter Volkov (RETIRED) gentoo-dev 2009-11-30 08:21:57 UTC
Why do you need to start networking from /etc/vz/conf/<vpsid>.start? It's possible to use vzctl to configure network.
Comment 2 Peter Volkov (RETIRED) gentoo-dev 2009-11-30 10:10:49 UTC
Ah, disregard previous message.

Nevertheless, I'm unable to reproduce this problem. What happens without .start script? Show me vzctl output with --verbose enabled. What's in dmesg? Is problem reproducible with venet configuration?
Comment 3 billy 2009-11-30 11:21:24 UTC
(In reply to comment #2)
> Ah, disregard previous message.
> 
> Nevertheless, I'm unable to reproduce this problem. What happens without .start
> script? Show me vzctl output with --verbose enabled. What's in dmesg? Is
> problem reproducible with venet configuration?
> 

server cache # vzctl start 101
Starting container ...
Mounted /usr/portage to /vz/root/101/usr/portage
Container is mounted
Setting CPU units: 1000
Configure meminfo: 65536
Set hostname: vz101gentoo
Running container script: /etc/vz/dists/scripts/gentoo-set_hostname.sh
Running container script: /etc/vz/dists/scripts/set_dns.sh
File resolv.conf was modified
Configure veth devices: veth101
Adding interface veth101 to bridge br0 on CT0 for CT101
Running container script: /etc/vz/conf/101.start
Setting IP: 192.168.1.234
Setting Gateway: 192.168.1.4
Container start in progress...

dmesg:
[589971.990960] CT: 101: started
[589972.293728] device veth101 entered promiscuous mode
[589972.293837] br0: port 5(veth101) entering listening state
[589987.288019] br0: port 5(veth101) entering learning state
[590002.288016] br0: topology change detected, propagating
[590002.288029] br0: port 5(veth101) entering forwarding state

101.conf:
ONBOOT="yes"
# UBC parameters (in form of barrier:limit)
KMEMSIZE="11055923:11377049"
LOCKEDPAGES="256:256"
PRIVVMPAGES="65536:69632"
SHMPAGES="21504:21504"
NUMPROC="240:240"
PHYSPAGES="0:2147483647"
VMGUARPAGES="33792:2147483647"
OOMGUARPAGES="26112:2147483647"
NUMTCPSOCK="360:360"
NUMFLOCK="188:206"
NUMPTY="16:16"
NUMSIGINFO="256:256"
TCPSNDBUF="1720320:2703360"
TCPRCVBUF="1720320:2703360"
OTHERSOCKBUF="1126080:2097152"
DGRAMRCVBUF="262144:262144"
NUMOTHERSOCK="360:360"
DCACHESIZE="3409920:3624960"
NUMFILE="9312:9312"
AVNUMPROC="180:180"
NUMIPTENT="128:128"
# Disk quota parameters (in form of softlimit:hardlimit)
DISKSPACE="1048576:1153024"
DISKINODES="200000:220000"
QUOTATIME="0"
# CPU fair sheduler parameter
CPUUNITS="1000"
VE_ROOT="/vz/root/$VEID"
VE_PRIVATE="/vz/private/$VEID"
OSTEMPLATE="gentoo-openvz-x86-2009.11.17"
ORIGIN_SAMPLE="vps.basic"
HOSTNAME="vz101gentoo"
NAMESERVER="192.168.1.4"
NETIF="ifname=eth0,bridge=br0,mac=00:18:51:A0:15:B4,host_ifname=veth101,host_mac=00:18:51:FA:52:42"
UUID: ceb1fc67-c7f9-13a8-bb76-ed31acc00656

I tried to remove the HOSTNAME,NAMESERVER,NETIF and 101.start, problem still here, here is the startup message:
gentoosrv cache # vzctl start 101
Starting container ...
Mounted /usr/portage to /vz/root/101/usr/portage
Container is mounted
Setting CPU units: 1000
Configure meminfo: 65536
Container start in progress...

Thanks,
shing

Comment 4 billy 2009-11-30 11:35:10 UTC
(In reply to comment #2)
> Ah, disregard previous message.
> 
> Nevertheless, I'm unable to reproduce this problem. What happens without .start
> script? Show me vzctl output with --verbose enabled. What's in dmesg? Is
> problem reproducible with venet configuration?
> 

sorry here is the vps.mount,
/etc/vz/conf/vps.mount
#!/bin/bash
# if one of these files does not exist then something is
# really broken
[ -f /etc/vz/vz.conf ] || exit 1
[ -f $VE_CONFFILE ] || exit 1
. /etc/vz/vz.conf
. $VE_CONFFILE
ISGENTOO=$(echo "$OSTEMPLATE" | grep ^gentoo)
if [ $ISGENTOO ]; then
    mkdir -p $VE_ROOT/usr/portage
    mount -n --bind /usr/portage $VE_ROOT/usr/portage && echo "Mounted /usr/portage to $VE_ROOT/usr/portage"
fi
exit ${?}

If I just start the vz service without starting any VE, the / umount successful, but when I start any VE template with any distro eg:gentoo,debian,centos downloaded from http://download.openvz.org/template/precreated/contrib/,  
the problem will appear.
Comment 5 Peter Volkov (RETIRED) gentoo-dev 2009-11-30 12:01:04 UTC
(In reply to comment #4)
> here is the vps.mount

What's the output of vzctl --verbose stop 101? And what's inside vps.umount (it's required to unmount everything there to make stop successful)?
Comment 6 billy 2009-12-01 01:58:52 UTC
Created attachment 211641 [details]
lsof result
Comment 7 billy 2009-12-01 01:59:16 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > here is the vps.mount
> 
> What's the output of vzctl --verbose stop 101? And what's inside vps.umount
> (it's required to unmount everything there to make stop successful)?
> 

ok now i make it simpler, i try to remove all the start/stop/mount/umount scripts,
here is the start and stop message:
server conf # vzctl start 102
Starting container ...
Container is mounted
Setting CPU units: 1000
Configure meminfo: 131072
Container start in progress...
server conf # vzctl stop 102
Stopping container ...
Container was stopped
Container is unmounted

102.conf
ONBOOT="no"
KMEMSIZE="11055923:11377049"
LOCKEDPAGES="256:256"
PRIVVMPAGES="131072:196608"
SHMPAGES="21504:21504"
NUMPROC="240:240"
PHYSPAGES="0:2147483647"
VMGUARPAGES="131072:2147483647"
OOMGUARPAGES="131072:2147483647"
NUMTCPSOCK="360:360"
NUMFLOCK="188:206"
NUMPTY="16:16"
NUMSIGINFO="256:256"
TCPSNDBUF="1720320:2703360"
TCPRCVBUF="1720320:2703360"
OTHERSOCKBUF="1126080:2097152"
DGRAMRCVBUF="262144:262144"
NUMOTHERSOCK="360:360"
DCACHESIZE="3409920:3624960"
NUMFILE="9312:9312"
AVNUMPROC="180:180"
NUMIPTENT="128:128"
DISKSPACE="1048576:1153024"
DISKINODES="200000:220000"
QUOTATIME="0"
CPUUNITS="1000"
VE_ROOT="/vz/root/$VEID"
VE_PRIVATE="/vz/private/$VEID"
OSTEMPLATE="centos-5-i386-default-5.4-20091116"
ORIGIN_SAMPLE="vps.basic"
#UUID: 2206f5c6-36a6-63a4-0a60-8144a53ebd5c

when I shutdown, still get an error, so I entered a root password and run umount -a, it shows:
umount: /dev device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
umount: / device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))

I attached the lsof result, hope that can give us some hints...

Thanks,
shing

Comment 8 billy 2009-12-02 09:22:33 UTC
problem solved
/etc/vz/vz.conf
DISK_QUOTA=no
Comment 9 Peter Volkov (RETIRED) gentoo-dev 2010-02-01 08:32:30 UTC
(In reply to comment #8)
> problem solved
> /etc/vz/vz.conf
> DISK_QUOTA=no

Actually this is workaround but not fix. But well, I'm unable to reproduce this problem, so I'll close it until somebody provides hints how to reproduce or finds what causes this issue.