LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 04-08-2009, 12:33 PM   #1
sleeper0110
LQ Newbie
 
Registered: Oct 2008
Posts: 15

Rep: Reputation: 0
TMPFS, RAMFS and BSDs MFS


In *BSD they have something called MFS, memory file system. As far as I can tell, Tmpfs and RAMfs in linux are very similar in concept, however there is one option in MFS that I don't see in tmpfs/ramfs.

MFS give the option to mount some ram to a directory based off of an existing directory (see -P option). So you can mount the contents of /home/user/dir to /mnt/dir as an MFS partition. Any changes you make in /mnt/dir don't propagate to /home/usr/dir, you have to do that copy manually.


Is there a similar feature in tmpfs/ramfs? I know you can probably do the copy manually, but would be nice if I could specify the contents when I mount the ram based partition.

Thoughts?
 
Old 04-08-2009, 12:50 PM   #2
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,075

Rep: Reputation: 1110Reputation: 1110Reputation: 1110Reputation: 1110Reputation: 1110Reputation: 1110Reputation: 1110Reputation: 1110Reputation: 1110
I'm not quite sure what you're describing, but I think it is a combination of aufs and tmpfs.

I'd need some retesting to rediscover the details (I can't explain from memory) but the general concept is:

You mount an aufs that represents parallel directory trees between an ordinary already mounted directory tree and a new (initially empty) tmpfs.

On every file lookup or read, the aufs will look in the tmpfs first, but if the file isn't there it would read from the other directory tree.

On every file write, the aufs will write only to the tmpfs. If you write to only part of a file, the rest of the file is copied from the other fs to the tmpfs.

So the aufs represents a modified copy of the underlying directory tree, with the tmpfs holding only the files that are different.

Last edited by johnsfine; 04-08-2009 at 12:55 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using inotify with ramfs Shreyasdm Linux - General 1 09-28-2008 04:28 AM
ramfs & tmpfs hadyy Linux - General 2 12-25-2007 02:16 PM
ramfs anyone? alaios Linux - General 0 10-21-2004 02:18 PM
ramfs alaios Linux - General 0 10-12-2004 12:53 PM
tmpfs and ramfs jatho Linux - General 0 06-23-2004 04:11 AM


All times are GMT -5. The time now is 04:43 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration