Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
It all depends on your partitioning scheme. Most people just have three partitions - / (root), /home, and swap. Except for /home, / contains all of those directories, and they don't have to be mounted - they're all grouped together and become available when / is mounted (usually at startup). Of course, you could have a separate partition for every one of those, but it isn't normally necessary or helpful.
So as for mounting, you'll generally only have two things to mount - / and /home, and both of which are typically automounted at system boot.
Any suggestion on the standard size of these partitions? I am just trying to get together a standard so if we decide to rebuild we rebuild them all the same exact way.
It depends on how much space is available. My computer has two harddrives of 500gb each, so I use one drive just for root and swap and the other just for /home.
But depending on you distro and what exactly will be done with the drive (and of course how much space is available), go with 30gb at a very minimum, and maybe 100gb for a reasonable workstation (unless you plan to have a lot of high space apps in root). Give all the rest of the drive to /home, which is where all of your user settings and personal files will be saved.
For your swap partition, size it to anywhere between half and double the amount of ram on the computer.
This is assuming a 3 partition setup like the one I described in my first post (root, /home, swap)
It depends on how much space is available. My computer has two harddrives of 500gb each, so I use one drive just for root and swap and the other just for /home.
But depending on you distro and what exactly will be done with the drive (and of course how much space is available), go with 30gb at a very minimum, and maybe 100gb for a reasonable workstation (unless you plan to have a lot of high space apps in root). Give all the rest of the drive to /home, which is where all of your user settings and personal files will be saved.
For your swap partition, size it to anywhere between half and double the amount of ram on the computer.
This is assuming a 3 partition setup like the one I described in my first post (root, /home, swap)
Available space is not an issue - we are working with 8tb of files being viewed by thousands of customers every hour.. the distro ranges from RHEL 5.2 - 5.5.
I understand what root and /home are - what is swap for?
Available space is not an issue - we are working with 8tb of files being viewed by thousands of customers every hour.. the distro ranges from RHEL 5.2 - 5.5.
I understand what root and /home are - what is swap for?
Swap is virtual memory. Its the space used to hold excess data from the ram, and where the ram content is stored when a computer is put into hibernation/sleep.
So would you say the website I posted is pretty accurate?
Yes, but it doesn't have anything to do with partitioning. The Linux filesystem is monolithic. It's one big filesystem, but it can be made up of many parts and partitions. If you want, you can mount a CD as a directory.
Swap isn't part of the filesystem, so it won't be in the hierarchy. The filesystem hierarchy and how you partition and mount drives are unrelated.
its accurate, but it isn't telling you the information you're looking for.
A linux install is, at its simplest level, a collection of folders each containing various directories and files. everything in a linux install is mounted at / (the root filesystem).
Where partitions and mounting come into play is just based on what actual harddrive and partition contain the individual directories.
To use the 3-partition setup I gave above, you would only actually mount / and /home. All of the directories in that webpage (/etc, /var, /usr, /sbin, and so forth) except for /home are located on the / partition, and so would automatically be there when / is mounted. The /home partition is mounted on its own alongside the / partition, but the /home directory will still appear where it needs to appear (in the root directory.
Its hard to explain in easy terms what I'm trying to say. My point is, all of the directories in the hierarchy are located in the same place in the install, but can be physically located on different partitions or drives, depending on how it was originally installed. No matter how many or how few partitions you have, the user will always see the filesystem hierarchy in the way it should be - root directory, containing /etc, /home, /var.
I think this is what you're asking for, anyway. I may have misunderstood your question.
Everything is under /.
But /home is partitioned out - yet still accessible through / because it is still apart of / even though /home is mounted "seperately"
Let me know if thats the basic understanding? That makes sense to me but then again imma noob!
Everything is under /.
But /home is partitioned out - yet still accessible through / because it is still apart of / even though /home is mounted "seperately"
Let me know if thats the basic understanding? That makes sense to me but then again imma noob!
The Root Directory / - separate partition mounted first that contains all directories with standard space available of 100GB unless you plan to have a lot of high space apps in the root directory.
1) /bin
2) /boot
3) /dev
4) /etc – contains all system related configuration files
5) /home – separate partition can get large and used for storing downloads, compiling, installing and running programs, your mail, images, sound files etc… size is dependent upon how many users.
6) /Initrd
7) /lib
8) /lost+found
9) /media
10) /opt
11) /proc
12) /root – home directory of system administrator
13) /sbin
14) /usr
15) /var
16) /srv
17) /tmp
is /swap the same as /var?
...
Does this look correct?
Your hierarchy is correct, but swap is not mounted in the hierarchy - its a separate partition that is only referenced by the system and is usually inaccessible to the user. /var is where system logs and such are stored (or anything that is changed by the system on a regular basis).
Everything is under /.
But /home is partitioned out - yet still accessible through / because it is still apart of / even though /home is mounted "seperately"
I think that the only thing that you have to do now is clean up the descriptions/language a little, but you have the basics:
Don't confuse the file system hierarchy and mount points.
The FSH describes a structure of what goes where (although there can be minor differences about what goes in certain directories) but says essentially nothing about mount points
If you have a partition, that could, potentially, be mounted at any point in the FSH; so, for example, you might want a separate /home partition, or you might not. If you have a separate /home partition, then that is a section of space on the disk that is dedicated to that use and is mounted on the mount point /home. If you don't, any space used for /home comes out of the space for the 'parent' area
Whatever separate partitions you do or do not have mounted on whatever mount points, at a simple user level, it doesn't make any difference to the structure; if you save a file to /home, it gets saved to /home, irrespective of whether that is a separate partition, or not, and everything looks the same to an average user. There can be considerations about partitions running out of disk space, or performance and so on, but to the typical user, these things should be more-or-less transparent
Quote:
Originally Posted by jorran
is /swap the same as /var?
No; they are unrelated. swap (not /swap...try to cd to /swap, and you'll get an error message about the directory not existing) is part of the virtual memory subsystem and is also used for suspend and resume, if you use those, and really doesn't contain 'files' in a useful sense (it contains fragments that have been swapped out, rather than whole files, with their accompanying permissions, modification times and other metadata). /var does contain files, with all the metadata stuff, but those files relate to the current the status of the system and its applications.
If I have 8TB of data/files being looked though each and every day by thousands of customers would best practice be to partition out /, /home and swap and only mount / and /home?
Should I have another partition for tmp? var? or anything besides those two? Or is it completely up to me?
I can have a home partition and mount it to /home - that way all data stays on that partition
I can have a / partition and mount it to / - that way all data stays there
etc...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.