Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
unionfs problems - why does union become read-only?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
gentoo_bender
n00b
n00b


Joined: 19 May 2005
Posts: 1

PostPosted: Thu May 19, 2005 2:10 pm    Post subject: unionfs problems - why does union become read-only? Reply with quote

Hello,
I am currently trying to transparently mount a part of my filesystem in memory and use unionfs to merge it with the hdd filesystem.
The problem I'm facing is the following: I want the ram part of the filesystem to be read-only and the hdd part to be read-write - where files present in ram should overlap files on hdd. The union should be read-write, i.e. changes to files should be written directly to disk, not to ram.

So, for example if /hd is the part on disk and /ram is the ram-part, and I store the union in /union, I would use:
Code:
# mount -t unionfs -o dirs="/ram=ro:/hd" none /union

This does work (ram files overlap disc files), but /union is read-only this way.. (although mount says it"s rw) :?

If I do it the other way round:
Code:
# mount -t unionfs -o dirs="/hd:/ram=ro" none /union

then /union is read-write, but files in /ram do not overlap files in /hd (actually it's the other way round..)

So somehow the rw-setting of the first directory determines the rw-setting of the union in this case. I couldn't find any info in the manpages about this. Can this behaviour be changed?

What I mean with overlap: if there is a file /hd/afile and a file /ram/afile then /union/afile preferrably accesses /ram/afile (for read-access) and /hd/afile only for write-access.
Back to top
View user's profile Send private message
TrueDFX
Retired Dev
Retired Dev


Joined: 02 Jun 2004
Posts: 1348

PostPosted: Thu May 19, 2005 3:20 pm    Post subject: Re: unionfs problems - why does union become read-only? Reply with quote

Hi,
gentoo_bender wrote:
What I mean with overlap: if there is a file /hd/afile and a file /ram/afile then /union/afile preferrably accesses /ram/afile (for read-access) and /hd/afile only for write-access.
This would mean that if a file is read when opened for both reading and writing at once, you will see different results from when it is read when opened only for reading. Have you thought about the problems this may cause carefully?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum