LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   File systems (https://www.linuxquestions.org/questions/linux-newbie-8/file-systems-776820/)

vinaytp 12-19-2009 01:04 AM

File systems
 
Hi all..

which are the partitions ( /home, /proc etc ) that necessarily need separate partition in linux..?

Tinkster 12-19-2009 01:14 AM

*need* ?

Depends on your mileage. There's no one size fits all here.

evo2 12-19-2009 01:46 AM

You can get by with everything in one partion: / however it is almost always best to have some swap too (unless worried about lifetime of an SSD).

Cheers,

Evo2.

vinaytp 12-19-2009 02:12 AM

Quote:

Originally Posted by evo2 (Post 3797605)
You can get by with everything in one partion: / however it is almost always best to have some swap too (unless worried about lifetime of an SSD).

Cheers,

Evo2.

My question is, it is always better to have /boot as separate partition, what are the other filesystems that need separate partition ?

linuxlover.chaitanya 12-19-2009 02:14 AM

It depends on your size of the drive. If you have a big enough drive you could have different partitions /, /boot, /var, /usr and all. But it all depends on your use as well.
I have installed server without different partitions and everything on / and just boot and swap as different.

jschiwal 12-19-2009 02:30 AM

If you will be using LVM or RAID, you want to have a separate partition for /boot. If you will be installing more than one distro, you can use the same /boot partition and edit the grub.conf file to boot each distro. Being small it is easy to create a image backup copy of your boot partition.

Having the /home directory on it's own partition will make it easy to change distro's or add another distro and not have to reformat it. IMHO, for laptop installs, fewer partitions are more common than on a desktop. You are usually more limited in disk space, and having system directories on the same partition is more flexible. For example you don't have to worry as much that /usr will fill up when you install more software.

A server will be more likely to have separate partitions. Having /tmp on it's own partition allows mounting it with mount options such as noexec, nodev and nosuid. A separate /var/ partition will prevent a server from crashing because someone fills up free space with logs. An installation won't touch /usr/local. This is where programs you compile yourself are likely to go. Mounting /usr/local on it's own partition would allow you to reinstall and keep these programs, if you opt not to format the partition.

evo2 12-19-2009 04:54 AM

Quote:

Originally Posted by vinaytp (Post 3797617)
My question is, it is always better to have /boot as separate partition,

No, it is not *always* better to have /boot on a separate partition. For laptops with only a small mount of disk space I usually put everything in one partition (+ swap), it just makes things easier when you are running low on space. However, for desktops and servers (where it is easy to replace/add disks) I always break it down into separate /var, /tmp, /boot, /usr, /home.
Quote:

what are the other filesystems that need separate partition ?
None need it, except if you count virtual file systems like /dev, but the os looks after this for you: it does not use a physical partition.

Cheers,

Evo2.

pixellany 12-19-2009 06:33 AM

You only need one partition (+ swap).

There are lots of arguments for having more partitions, but I don't know if any of them apply to your situation. Do you have a specific problem you are trying to solve?

Smartpatrol 12-19-2009 09:03 AM

...

salasi 12-20-2009 04:48 AM

Quote:

Originally Posted by pixellany (Post 3797788)
You only need one partition (+ swap).

You don't even need swap, so the original question could have been answered with a single character

/


There you go. A complete answer to the question that you asked. However, the question 'what partitions is it desirable to have? is more complex and depends on the circumstances. How about telling us something about the circumstances, so we cabn have a go at answering that one too, without writing a 100 page manual.

Nivag 12-20-2009 03:14 PM

If you want to hibernate your machine, then you need a swap partition at least the size of your RAM. So for hibernation, the recommendation I use is RAM size + 2GB.

I have 8GB of RAM, so I set up a swap partition with 10GB. I found that sometimes I'm using swap within an hour of starting up - but then, at othertimes, it might take several days.

If you are using RAID, then /boot should be on a separate partition outside of RAID. Have at least 2 RAID partitions, one of which should be swap.

cola 12-21-2009 09:03 AM

Quote:

Originally Posted by vinaytp (Post 3797574)
Hi all..

which are the partitions ( /home, /proc etc ) that necessarily need separate partition in linux..?

Need one partition for / and different swap partition.

salasi 12-22-2009 06:14 AM

Quote:

Originally Posted by cola (Post 3799938)
Need one partition for / and different swap partition.

you don't need a swap partition, if
  • you have enough ram and you are not hibernating
  • if you use a swap file instead of a swap partition

and where do you think that embedded Linux devices put their swap partition? Deeply embedded devices don't have anywhere useful to put a swap partition, so, given that they can't have one, they don't need the swap partition.

Smartpatrol 12-22-2009 10:04 AM

Myth
 
...

catkin 12-22-2009 10:12 AM

Quote:

Originally Posted by Smartpatrol (Post 3801313)
I wouldn't recommend running without a swap partition(for any OS) some applications use swap to store memory pages (for various reasons) no matter how much RAM you have.

That's useful to know. I have some desktop systems that run without swap, apparently without problem, so (at risk of stating the obvious) it does depend on which apps are being run. Is there any pattern to the types of apps that use swap? Perhaps database systems use swap as "scratch space" ... ? All the same, it would be quicker to use memory ... ? Now I'm intrigued -- what sort of reasons might an app use swap for?

salasi 12-23-2009 06:05 AM

Quote:

Originally Posted by Smartpatrol (Post 3801313)
I wouldn't recommend running without a swap partition(for any OS) some applications use swap to store memory pages (for various reasons) no matter how much RAM you have.

No, I wouldn't recommend operation without swap space of some form (swap partition or swap file) for a desktop or server application, but the question was not what is recommended but what is necessary.

Smartpatrol 12-23-2009 07:58 AM

...


All times are GMT -5. The time now is 02:30 AM.