From owner-freebsd-bugs Fri Jun 14 13:30:36 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id A362237B416 for ; Fri, 14 Jun 2002 13:30:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g5EKU1S51965; Fri, 14 Jun 2002 13:30:01 -0700 (PDT) (envelope-from gnats) Received: from nwww.freebsd.org (www.FreeBSD.org [216.136.204.117]) by hub.freebsd.org (Postfix) with ESMTP id 65A3C37B42F for ; Fri, 14 Jun 2002 13:23:12 -0700 (PDT) Received: from www.freebsd.org (localhost [127.0.0.1]) by nwww.freebsd.org (8.12.2/8.12.2) with ESMTP id g5EKNBhG083744 for ; Fri, 14 Jun 2002 13:23:11 -0700 (PDT) (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.2/8.12.2/Submit) id g5EKNBB7083743; Fri, 14 Jun 2002 13:23:11 -0700 (PDT) Message-Id: <200206142023.g5EKNBB7083743@www.freebsd.org> Date: Fri, 14 Jun 2002 13:23:11 -0700 (PDT) From: Paulo Fragoso To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: conf/39306: The /etc/rc file should know if is running on jail or host enviroment. Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 39306 >Category: conf >Synopsis: The /etc/rc file should know if is running on jail or host enviroment. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Jun 14 13:30:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Paulo Fragoso >Release: 4.5-RELEASE-p5 >Organization: Nlink ISP >Environment: FreeBSD fisica.df.ufpe.br 4.5-RELEASE-p5 FreeBSD 4.5-RELEASE-p5 #3: Fri May 24 17:10:23 BRT 2002 paulo@gateway.df.ufpe.br:/usr/src/sys/compile/KERNEL1 i386 >Description: We have a jail enviroment running fine. The host enviroment have mounted this partitions: Filesystem Size Used Avail Capacity Mounted on /dev/da0s1a 93M 40M 46M 46% / /dev/da0s2h 463M 17M 409M 4% /home /dev/da0s3e 98M 25M 66M 27% /j /dev/da0s4g 24G 3.2G 19G 15% /j/home /dev/da0s3f 252M 7.3M 224M 3% /j/tmp /dev/da0s3h 2.0G 1014M 841M 55% /j/usr /dev/da0s3a 1.4G 318M 981M 24% /j/usr/local /dev/da0s3g 252M 100M 132M 43% /j/var /dev/da0s4e 1008M 423M 504M 46% /j/var/qmail /dev/da0s4f 1008M 80M 847M 9% /j/var/spool /dev/da0s2e 252M 7.1M 225M 3% /tmp /dev/da0s2g 2.5G 1.0G 1.3G 45% /usr /dev/da0s2f 252M 16M 216M 7% /var procfs 4.0K 4.0K 0B 100% /proc which /j/... are for jail enviroment and /j/home have "userquota" option. All work fine, but in the jail enviroment we can't run repquota so we've decided to put one single line in the fstab in jail, after that we can run repquota command: jail's fstab: /dev/null /home ufs rw,userquota 2 2 Now we can run repquota fine on jail enviroment. The problem appear after reboot, /j/home is umounted when starting jail script. We discover that it's happen because there is an "umount" in the /etc/rc file. After commented out this line we can do everthing without problem. >How-To-Repeat: To create a jail enviroment ($D=/j) following "man jail", with several partition like this: / /home /j /j/home /j/tmp /j/usr /j/usr/local /j/var /j/var/qmail /j/var/spool /tmp /usr /var /proc If you put one line single line in the fstab for jail enviroment, like this: /dev/null /home ufs rw,userquota 2 2 /j/home is umounted, becuse it isn't busy for any process. >Fix: Our suggestion is to put something like this in the /etc/rc: case ${jail_fstab} in [Nn][Oo]) umount -a >/dev/null 2>&1 esac instead only "umount -a >/dev/null 2>&1" and in the /etc/default/rc.conf: jail_fstab="NO" # Set to YES if you are using fstab in the jail # enviroment >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message