Hi,

I'm trying to set up a Linux system that will be able to have a rootfs essentially in a vfat filesystem. This means I don't have support for device files, links, etc. (permissions aren't a huge concern in this particular case). My idea was to use unionfs to combine a vfat, which provided the bulk of the files, with a tmpfs, which would only be used for files that used special features that vfat doesn't support. For example, after building the union, /dev would be generated dynamically on boot on the union, which would put all these files on the tmpfs rather than the vfat.

Here is what I've been able to do so far using unionfs:

# ls -l
total 5
drwxrwxrwt  2 root root  140 Jan  5 22:18 ram
drwxr-xr-x  2 root root 4096 Jan  5 21:22 union
drwxr-xr-x  2 root root  512 Jan  5 22:01 vfat
# mount |  grep '/root/cat'
/dev/loop0 on /root/cat/mnt/vfat type vfat (rw)
tmpfs on /root/cat/mnt/ram type tmpfs (rw)
# mount -t unionfs -o dirs=/root/cat/mnt/vfat=rw:/root/cat/mnt/ram=rw unionfs 
union
# touch union/test
# ls vfat/
test

Everything is fine so far. vfat has higher precedence than ram, so that's where the file creation goes first. Now, this is what happens when I try to create a device file:

# mknod union/tty c 5 0
mknod: `union/tty': Operation not permitted

This is probably expected to the unionfs developers, but I don't understand why this happens. I would expect unionfs to get an error while trying to create the file on the vfat branch, but to retry the operation in the ram branch. There, it should succeed because tmpfs supports device files just fine. Instead, it appears to me that it bails out on the first attempt.

Chances are that this behavious is as it is for a good reason. Perhaps some one could at least explain? Any workarounds?

Thanks in advance,

Catalin

-----------------------------------------
Catalin Patulea       VV Volunteer 2002,3
http://vv.carleton.ca/~cat/  VV HI 2004,5
[EMAIL PROTECTED]   VV Server Admin 2006
_______________________________________________
unionfs mailing list
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs

Reply via email to