Subject: Re: tmpfs and union mounts
To: Steven M. Bellovin <smb@cs.columbia.edu>
From: Marcin Jessa <lists@yazzy.org>
List: current-users
Date: 10/15/2005 11:13:31
On Fri, 14 Oct 2005 23:15:51 -0400
"Steven M. Bellovin" <smb@cs.columbia.edu> wrote:

: I'm trying to do a union mount involving a tmpfs file system.  
: Unfortunately, I'm getting 'operation not supported'.  Is it supposed 
: to work?

Works on my test box:

root@mx1:~]# df -h
Filesystem    Size      Used     Avail Capacity  Mounted on
/dev/wd0a      18G      14G      3.0G    82%    /
kernfs        1.0K     1.0K        0B   100%    /kern
procfs        4.0K     4.0K        0B   100%    /proc
tmpfs          64M      20K       64M     0%    /tmp

[root@mx1:~]# mount_union -b /tmp /mnt/union
[root@mx1:~]# df -h
Filesystem     Size      Used     Avail Capacity  Mounted on
/dev/wd0a       18G      14G      3.0G    82%    /
kernfs         1.0K     1.0K        0B   100%    /kern
procfs         4.0K     4.0K        0B   100%    /proc
tmpfs           64M      20K       64M     0%    /tmp
<below>:/tmp    18G      14G      3.0G    82%    /mnt/union

[root@mx1:~]# ls -l /mnt/union/
total 0
srwxrwxrwx  1 mail   wheel  0 Oct 15 00:42 clamd
srwxrwxrwx  1 mysql  wheel  0 Oct 15 00:42 mysql.sock
[root@mx1:~]# ls -l /tmp/
total 0
srwxrwxrwx  1 mail   wheel  0 Oct 15 00:42 clamd
srwxrwxrwx  1 mysql  wheel  0 Oct 15 00:42 mysql.sock


Marcin