Results 1 to 6 of 6
I am new to Linux, but I'm a fairly experienced Windows user. Despite trawling the internet for hours, buying three different books on Linux, and grilling two of my 'Linux ...
- 09-30-2006 #1Just Joined!
- Join Date
- May 2006
- Posts
- 13
getting my head around Linux file systems, partitions and mount points
I am new to Linux, but I'm a fairly experienced Windows user. Despite trawling the internet for hours, buying three different books on Linux, and grilling two of my 'Linux boffin' mates, I still feel I don't fully understand the way Linux partitions and mount points work!
To put this in perspective, I am a C++ programmer, so I have no difficulty getting my head around the idea things like symbolic links, by analogy to pointers in C, or the concept of all my drives/partitions being 'virtually' mounted on a single 'tree'.
So, here are some specific questions, which will hopefully highlight the areas I don't fully understand:
----------
1. In my Linux Administration book, the 'special directories' (boot, home, var etc) are referred to as 'partitions' in quite a few places. Is the writer using the word in a different sense to that of the "physical, low-level subdivisions of my hard disc"? Or is he just assuming that they have been installed on unique physical partitions, ergo he's using the word 'partition' and 'directory' interchangeably? I do understand that it is possible, at installation time, to allot each of these special directories its own (physical) disc partition; what I don't understand is whether there is a second meaning of the word 'partition' which means "one of these special directories, irrespective of whether it is just a directory within the root (/) partition, or a directory allocated to a physical partition all of its own".
2. When installing SuSE, and trying to set up the physical disc partitions and mounts, I can choose a mount point (e.g. "/" [root], "/home", or "/boot", or "/user") for each partition -- cool. So it seems there is a kind of one-to-one relationship, where each partition can be (optionally) allocated one of the 'special' directories. I have read lots of things about giving certain special directories, such as var, their own partition -- again, cool. E.g. I understand that this can prevent a DOS attack filling up the hard disc with log files. Just for absolute clarity, is there no other way to do this other than allocating var to its own physical partition? I.e. does Linux have no provision for the special 'virtual' directories to have 'virtual size limits', even if several such directories exist on the same disc partition? Or should I think of them as 'virtual directories' rather than 'virtual disc partitions'?
3. Is it normal practice to put other 'special' directories in their own partitions? E.g. on Windows people often put their Program Files on a separate hard disc from Windows itself (e.g. "C:\Windows", "E:\Program Files") for better performance. I can see that this is possible on Linux, by creating a dedicated partition on the second hard disc, and setting the mount point to "/usr" at installation time. Is this the orthodox way to go about it? I can't find any examples of people doing this on the internet, which makes me think maybe it's an odd thing to do in Linux!
4. Am I correct in my understanding that, should I *not* allocate a given 'special' directory to its own partition (e.g. if none of my partitions have the mount point set to "/home") it will instead just be placed within "whichever partition has the 'root' (/) mount point"? I.e. is the rule essentially "if a mount point is allocated to a specific partition, put it there, but if not, stick it in the same partition as all the other unspecified mount points"?
5. Assuming I'm understanding everything correctly so far, it seems as though every "special" directory is either (i) on a physical partition of its own, or (ii) in the same partition as all the other "unallocated" special directories. Does this mean it's impossible to have a truly arbitrary distribution of directories across partitions? E.g. it would seem logical (and more space-efficient) to put "/lib", which I understand means "program library files", on the same partition as "/usr" (as it were, "Program Files"). Is this impossible? (it doesn't seem to be possible using the SuSE installer)
6. If what I've just described ISN'T possible at installation time, is it possible to achieve the same effect by physically copying the directories to the partitions where I want them, then changing the boot-time "mountings" so that the special directory "pointers" are transparently linked to the physical directory locations? E.g. if "/var" was originally on partition 1 (say, within the root), but I wanted to move it to partition 2, could I copy var and all its contents to partition 2, then re-mount "/var" so that it pointed to the copy on partition 2? (and then delete the original, redundant directory.) Basically I'm checking my assumption that the mountings work like "pointers" that can be reassigned.
----------
Er, that should do for now! Sorry about the length of my post.
I wish my Linux books had more diagrams and more example scenarios showing what is and isn't possible! I know this isn't rocket science but I'm finding it rather frustrating to get my head around.
- 09-30-2006 #2
Hi !
you already answered most of stuff in questions only..
1-2-5. --- you can install filesystem in ONE partition under / (root) or install all these folders ( parts of File System ) in different partitions. e.g. /home as folder under root or a separate partition for Home. separate partitions acts as a folder under root. there is no size limit for folder or partition but you can assign 'quotas' for folders.
3. it depends... i usually create separate partition for home only....
4. again... its on you.. best option is... go with installer defaults.
6. its possible but setting all pointers is not easy task.
casperIt is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 09-30-2006 #3Just Joined!
- Join Date
- May 2006
- Posts
- 13
If you can assign quotas, why would anyone want to create a separate partition? Or is that 'dated' advice?
Originally Posted by devils_casper
What's so difficult? Is the problem that there are lots of 'hard links' everywhere that explicitly expect the files to be on the same physical disc?6. its possible but setting all pointers is not easy task.
Presumably 'soft links' (pointing to the moved folder) would not be affected by doing what I described? (because /var is /var, regardless of which disc it's on?)
- 09-30-2006 #4i already wrote "it depends on you". you can set quota for user's home or create new partition. Linux is full of choices.If you can assign quotas, why would anyone want to create a separate partition? Or is that 'dated' advice?
yes ! you have to assign new links.... soft links are not a problem...What's so difficult? Is the problem that there are lots of 'hard links' everywhere that explicitly expect the files to be on the same physical disc?
casperIt is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 09-30-2006 #5Just Joined!
- Join Date
- May 2006
- Posts
- 13
What I mean is: what are the pros and cons of quotas versus separate partitions, if both have the same effect of limiting space?
Originally Posted by devils_casper
I can only think of 'cons' of having separate partitions, which is why I asked "why would anybody do it that way rather than using quotas?"
- 09-30-2006 #6
if you have a separate Home partition then during Linux Upgrade, you wont have any problem. its safe to have Home on separate partition. you can recover data easily. in case, Home partition runs out of space, you can attach new disk and mount home on that.
casperIt is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First


Reply With Quote
