Results 1 to 10 of 16
hi guys. i have posted a problem on mount before. I got good answers, but then, the more i try the more the questions i get.
I tried using a ...
- 04-10-2009 #1Just Joined!
- Join Date
- Apr 2009
- Posts
- 13
mount problem
hi guys. i have posted a problem on mount before. I got good answers, but then, the more i try the more the questions i get.
I tried using a mount with out using any options. like
mount /dev/hda9 /maindir
and i created a file called file1 in maindir . later on i unmounted the /maindir it had no files in it, when i checked the directory.
and then i mounted another directory (maindir1) onto hda9. now when i search the directoyr i get file1 in maindir1.
so its like the file is in hda9 and it gets shown whenever any directory is mounted on it. why is this? and could you guys please direct me to a link where i could read what happens during a mount, like what goes on between the hard-drive, the node numbers?
thanks
- 04-10-2009 #2Just Joined!
- Join Date
- Apr 2009
- Posts
- 13
and secondly could you just clarify this for me. The very purpose of mount is to
1) give a directory more room when you feel like its running out of space on the current partition
2) so that you could assign it acl's.
would that be it?
P.S: keep in mind im a newbie!
- 04-10-2009 #3
see mounting a hda on any directory is fine, but whatever you do in that dir will actually be stored in the hda.
Consider this that i mounted a flash drive in the folder flashdir.
Now whatever files i create are actually getting stored on the flash drive and as soon as i umount the flashdir directory all data in the flashdir will be lost but will remain intact on the flash dirve.
- 04-10-2009 #4Just Joined!
- Join Date
- Apr 2009
- Posts
- 13
well but when i mount other directories to the partition then all the files created by the first one are visible. isnt that not supposed to happen?
- 04-10-2009 #5
You don't mount a directory. You mount a disk or a partition.
If you mount the partition (say hda9) in maindir and create file1, hda9 will always have file1 unless you remove it.
So when you mount hda9 again you will see file1. The fact that you've mounted it as maindir1 rather than maindir makes no difference.Pete
- 04-10-2009 #6
yes as peteh said directory can not be mounted only partition can be mounted.
- 04-10-2009 #7Just Joined!
- Join Date
- Apr 2009
- Posts
- 13
ok! so you mount the partition not the directory, thanks! Then, in the redhat certified engineer linux study guide book . there are two points:
/lib -- Program libraries for the kernel and various command line utilities. Do not mount this directory on a separate partition.
/dev -- Hardware and software device drivers for everything from floppy drives to terminals. Do not mount this directory on a separate partition.
Does he mean that i should mount the partition that mounts '/' ? Im not sure if thats the case, because everything will be visible from every directory. What does he mean?
but you see he also mentions that we shouldnt mount the directory. Hence the confusion.
- 04-10-2009 #8
do not doesn't mean can not
that is right my frnd. You should not play with lib but it necessarily doesn't mean that you can not do it. You very well can mount them but it may cause system instability.
Also can you tell me what is the reason you want to mount one directory onto some other partition because mount is normally used to mount something removable. If you want to create a shortcut or hard copy then use the symblink .
- 04-10-2009 #9
You can create a separate partition for your /home / or /usr directories but although you can your manual is suggesting not to do this for /lib etc.
You have to remember that linux doesn't have drives labelled as C:/, D:/ etc/
You mount a partition and give it a name and it shows in the file manager just like another directory (or folder).
So you can mount /home if you have it on a separate partition but you don't mount /Documents (say) which is a directory (or folder) within /home.Pete
- 04-10-2009 #10Just Joined!
- Join Date
- Apr 2009
- Posts
- 13
thanks guys and sorry to keep bothering you like this. ONE thing though:
1) how do i keep two directories on the same partition without each reading the others files? im asking this because if /lib and / were to see each others files, wont that be confusing?
2) viky mentioned that mounting is temporary, then the partition on / is mounted right?
sory to be bugging you like this, but some things are confusing, partly because im from windows are recently hv moved over.
now in widows lets take the case of C and D partitions.
D: contains two folders folder1 and folder2
now folder1 and folder2 are comparable to the directories of linux, isnt it? then why in the case of windows dont I see the others files? like why dont i see folder2 files in folder1


Reply With Quote
