Results 1 to 3 of 3
Dear all,
I am trying to understand how ext2 filesystems work.
I have understood that in every filesystem the root inode is 2
what I cannot understand is how things ...
- 05-28-2010 #1Just Joined!
- Join Date
- Jan 2008
- Posts
- 4
Inodes and filesystems
Dear all,
I am trying to understand how ext2 filesystems work.
I have understood that in every filesystem the root inode is 2
what I cannot understand is how things are handled when I mount a new filesystem? does its inode change?what inode will be used to access the new filsystem's data, the inode of the old directory or the inode of the filesystem? how do they avoid duplicate inodes from different filesystems?
another question :
Icreate directory1 chown -R oracle:dba directory1
mkfs.ext3 /dev/fs1
mount /dev/fs1 directory1
now directory1 is not oracle:dba
can you explain why?
best regards and many thanks
- 05-29-2010 #2Just Joined!
- Join Date
- Nov 2006
- Posts
- 9
Filesystem and Mount Points
Hi, I will try to help.
First, you have a device, and in your device, you create a Filesystem, right ?
In your Filesystem, you have Folders and Files.
A Folder can be converted in a Mount Point, acting as link to the filesystem you are trying to use. When you mount, this link will assume the settings of your filesystem instead of the folder, in fact, this folder will act like a road of two ways. If you mount a filesystem over it, it will assume device settings (including permissions, folder structure, files, etc, etc) instead of the Local Folder Subtree structure ( It won't touch your local files at all ). Once ''Umounted'', he will work again as an usual folder again.
The best way to avoid confusion and problems, is always mount devices over an empty folder.
Then, mount you filesystem, (read about uuids used to mount devices in /etc/fstab, you will learn great tricks to avoid mount problems when mounting fileystems, depending on your distro) and create your DB specifying the directory that will be used under your filesystem in your DB software creator. Do not forget to chmod the root of your new filesystem, granting access to your (asuming that's already created ) User or Group, because when you create your filesystem, you are the ''root'', the ''root'' is the person that have to pass the ball to the users, and let them write to the fileystem.
Good Vibrations !
- 05-29-2010 #3
About the other question: with your first chown, you set ownership for the mountpoint only. When you unmount, the those permissions you set before will return.
To set permissions on the mounted filesystem, you have to chown/chmod it while it is mounted.
On linux I like to chown root:root; chmod 0 on my mount-point, so I cannot accidentally write into the directory tree while for some reason the filesystem wasn't mounted.
Once I mounted the filesystem I set the proper permissions and these will reside in the filesystem itself.
This trick works for Linux, but I'm told that there are Unices work differently (probably Solaris and/or HP-UX)


Reply With Quote