[comp.sys.sun] Loopback mounting from rc script

bob@omni.com (Bob Weissman) (04/10/90)

I'd like to loopback mount /var/tmp/tmp on /tmp, because my workstation's
/var partition has more space than its root partition.  But I'm having
trouble getting the mount to succeed.  (My previous method, having /tmp be
a symlink to /var/tmp/tmp, fails when /var is unmounted.)

I've built my kernel with the LOFS option.

I've tried both of the obvious methods, i.e., putting

	/var/tmp/tmp	/tmp	lo	rw	0	0

in my /etc/fstab after all mounts of type 4.2, and

	mount -v -t lo /var/tmp/tmp /tmp > /dev/console 2>&1

in my /etc/rc, but these both fail with the message "unknown file
system type: lo".

BUT if I wait for a reboot to complete, login as root, and manually type
the above mount command, the mount succeeds!  (I've verified that
/sbin/mount and /usr/etc/mount are identical, just in case.)

I've placed the mount as the last command in rc, but it still fails.  This
is most perplexing; can anyone help?

System:	Sun 4/110 color
OS:	SunOS 4.0.3
Disk:	one SCSI disk attached

Filesystem            kbytes    used   avail capacity  Mounted on
/dev/sd0a               7548    3933    2860    58%    /
/dev/sd0g              50415   42924    2449    95%    /usr
/dev/sd0h              11500    1101    9249    11%    /var

Bob Weissman
Internet:	bob@omni.com
UUCP:		...!{apple,pyramid,sgi,tekbspa,uunet}!omni!bob

marka@dmssyd.syd.dms.csiro.au (Mark Andrews) (04/10/90)

In article <6503@brazos.Rice.edu> bob@omni.com (Bob Weissman) writes:
|X-Sun-Spots-Digest: Volume 9, Issue 111, message 10
|
|I'd like to loopback mount /var/tmp/tmp on /tmp...
|
|I've tried both of the obvious methods, i.e., putting
|
|	/var/tmp/tmp	/tmp	lo	rw	0	0
|
|in my /etc/fstab after all mounts of type 4.2, and
|
|	mount -v -t lo /var/tmp/tmp /tmp > /dev/console 2>&1

The problem is that the default path when mount is run does NOT include
/etc or /usr/etc. To make sure mount is run with the correct PATH in it's
envirionment execute ther following.

PATH=$PATH	mount -v -t lo /var/tmp/tmp /tmp > /dev/console 2>&1

You can put loopback filesystems in /etc/fstab and mount them by

PATH=$PATH mount -vat lo 

Mark.