[nylug-talk] fun with fstab, bind and unionfs
jh
jhlists at hirschman.net
Fri Feb 2 21:42:09 EST 2007
alex at pilosoft.com wrote:
> On Fri, 2 Feb 2007, jh wrote:
> I have
>> this entry in my fstab:
>>
>> /Sillyvendor /opt/Sillyvendor none rw,bind 0 0
>>
>> If I manually issue the command
>>
>> mount /opt/Sillyvendor
>>
>> it works fine. But it doesn't mount at boot time. Can someone shed some
>> light on this? I guess that I could put something in rc.local, but it
>> should work from fstab, no?
> Are you sure that line is *after* the line which causes /opt to be
> mounted? [if opt is on separate filesystem].
I'm totally sure, and yes, opt is on a separate file system. Here's line
3 in the fstab:
192.168.100.100:/opt /opt nfs ro,hard,intr 0 0
Here's line 9:
/Sillyvendor /opt/Sillyvendor none rw,bind 0 0
Check your distribution's rc
> scripts and see what exactly do they do on boot: mount -a -t ext2? mount
> -a? etc.
Found it, and it is obvious what the issue is...
mount -a -v -t noproc,nfs,nfs4,smbfs,cifs,ncp,ncpfs,coda,ocfs2,gfs
I've never seen mount used that way, but it appears that only certain
filesystem types are included.
> If it don't work, whats wrong with rc.local?
It works, but it is less manageable in my case.
>> Second issue: I have a very, very silly vendor that insists on having
>> write privs to /usr. Sadly, my diskless boxes don't allow this.
>>
>> I thought that unionfs might be the solution. Any suggestions on how to
>> do this, especially from fstab? I was thinking of something like this...
>> not sure how to do a unionfs entry in fstab...
>>
>> foo:/usr /usr_temp nfs ro,hard,intr 0 0
>> none /usr unionfs dirs=/usr_temp:/usr_write 0 0
>>
>> Any comments on whether this would work, or perhaps, on the fine points
>> of unionfs?
> unionfs is broken by design. you'll hit problems, later.
>
> i'm sure your vendor requires +w to something inside /usr - which you can
> mount from tmpfs - or it is really a file under /usr proper? If it is a
> specific file, symlink it to /tmp and it will be none the wiser.
>
First, why do you say that unionfs is broken by design? It has worked
extremely well for me in the past when I needed to "write" to a DVD to
fix an issue with a client's data without actually copying it. Saved me
a huge amount of time (it involved hundreds of thousands of tiny files).
/usr must be writable; the silly vendor actually writes to it for their
copy protection. Very ugly indeed. If I were to take my chances with
"broken" unionfs, does that fstab look right?
Anyone else using unionfs in a production situation?
jh
More information about the nylug-talk
mailing list