LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 12-19-2009, 02:04 AM   #1
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 704

Rep: Reputation: 55
File systems


Hi all..

which are the partitions ( /home, /proc etc ) that necessarily need separate partition in linux..?
 
Old 12-19-2009, 02:14 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
*need* ?

Depends on your mileage. There's no one size fits all here.
 
Old 12-19-2009, 02:46 AM   #3
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
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.

Last edited by evo2; 12-19-2009 at 02:46 AM. Reason: typo
 
Old 12-19-2009, 03:12 AM   #4
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 704

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by evo2 View Post
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 ?
 
Old 12-19-2009, 03:14 AM   #5
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
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.
 
Old 12-19-2009, 03:30 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
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.
 
Old 12-19-2009, 05:54 AM   #7
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Quote:
Originally Posted by vinaytp View Post
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.
 
Old 12-19-2009, 07:33 AM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
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?
 
Old 12-19-2009, 10:03 AM   #9
Smartpatrol
Member
 
Registered: Sep 2009
Posts: 196

Rep: Reputation: 38
...

Last edited by Smartpatrol; 03-11-2010 at 10:53 PM.
 
Old 12-20-2009, 05:48 AM   #10
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,052

Rep: Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881
Quote:
Originally Posted by pixellany View Post
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.
 
Old 12-20-2009, 04:14 PM   #11
Nivag
LQ Newbie
 
Registered: Dec 2009
Location: Auckland, New Zealand
Distribution: Fedora
Posts: 7

Rep: Reputation: 0
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.
 
Old 12-21-2009, 10:03 AM   #12
cola
Senior Member
 
Registered: Sep 2007
Location: Dhaka,Bangladesh
Distribution: Debian
Posts: 1,031

Rep: Reputation: 63
Quote:
Originally Posted by vinaytp View Post
Hi all..

which are the partitions ( /home, /proc etc ) that necessarily need separate partition in linux..?
Need one partition for / and different swap partition.
 
Old 12-22-2009, 07:14 AM   #13
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,052

Rep: Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881
Quote:
Originally Posted by cola View Post
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.
 
Old 12-22-2009, 11:04 AM   #14
Smartpatrol
Member
 
Registered: Sep 2009
Posts: 196

Rep: Reputation: 38
Myth

...

Last edited by Smartpatrol; 03-11-2010 at 10:54 PM.
 
Old 12-22-2009, 11:12 AM   #15
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Quote:
Originally Posted by Smartpatrol View Post
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use key file instead of password for LUKS encrypted file systems? lucmove Linux - Security 2 06-30-2009 10:17 AM
LXer: Kernel Log: What's coming in 2.6.30 - File systems: New and revamped file syste LXer Syndicated Linux News 0 04-28-2009 12:02 AM
Read only file systems, custom live CDs, and embedded systems coffeecoffee Linux - Newbie 2 02-25-2009 12:09 AM
LXer: Cluster File Systems Attains World Leadership Position In High Performance File System LXer Syndicated Linux News 0 07-14-2006 07:21 AM
Is arrangement of file systems will differ if we copy a file from FAT 32 to ext 3 ? anindyanuri Linux - Software 2 02-20-2005 12:39 PM


All times are GMT -5. The time now is 01:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration