LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 07-12-2009, 04:47 AM   #1
Grife
Member
 
Registered: Oct 2006
Location: Finland
Distribution: openSUSE
Posts: 89

Rep: Reputation: 15
How big partitions should I create?


I'm going to start using Linux as my only operating system for indefinite time now and going to do my transfer from virtual machine to bare hardware today, using openSUSE 11.1 AMD64 as it's finally capable of being upgraded without burning a new DVD every single time.

Question itself
Now users who have been running same installation of Linux for a long time, how big partitions would you recommend for the following?
/boot = considering 200 MB, enough?
/ = considering 50 GB, overkill or too little (remember, I'll be running this installation for a long time)?
swap = 2Gb (just for hibernation so should be enough as I have 4Gb RAM)
/home = the rest

Also, what long-term advantage would I gain if I'd make the system run as LVM-partitioned system instead of traditional partitioning?

Last edited by Grife; 07-12-2009 at 05:50 AM. Reason: clarification
 
Old 07-12-2009, 05:28 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,551
Blog Entries: 28

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Hello Grife

200 MB plenty for /boot unless you plan on experimenting with different kernels. The system I'm on is using ~85 MB for 4 kernels -- one current and three old ones for "backup".

Your question about / is unanswerable if it is for "everything" because only you know about your own data requirements including possible server roles. If you're running your local electricity utility's billing system then you'll need a tad more than 50 GB!

Here's a sample workstation (called CW8) disk layout using LVM, perhaps typical, but very few videos kept online
Code:
df --human-readable 
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/CW8-root  6.0G  2.6G  3.4G  43% /
/dev/mapper/CW8-home   50G   26G   22G  55% /home
/dev/mapper/CW8-opt  1016M  596M  390M  61% /opt
/dev/mapper/CW8-usr   8.0G  2.4G  5.2G  32% /usr
/dev/mapper/CW8-var    50G   32G   16G  67% /var
/dev/sda2             236M   81M  143M  37% /boot
Big advantage of a separate /home is being able to clean install the system and not have to re-load personal data and configurations.

An advantage of smaller file systems is it doesn't take so long to fsck one at boot time when it has been mounted too many times without checking.

The following remarks about LVM are for ext3 file systems (because I don't know about other's perhaps more dynamic capabilities) and when 24x7x365 is not a consideration.

The really big advantage of LVM is being able to snapshot a file system for backup and so avoid both files changing during backup and data-skew amongst coherent sets of files.

I cannot see any advantage of having swap under LVM (but am open to contrary arguments).

If / does not include dynamic files and is relatively small (that is /var and /home are on separate file systems) there is little advantage in having it on an LVM volume. You have to boot off something other than / if you want to re-size it anyway.

One difficulty of LVM is that you cannot (yet?) resize an HDD (or HDD array) partition holding LVM data. Bad news if it's taking up most of your only HDD and you unexpectedly need to find space for another partition. Workaround by fitting a temporary HDD and moving the LVM data to that and back again, resized.

Sorry -- I don't know about swap and hibernate.

Best

Charles
 
Old 07-12-2009, 05:29 AM   #3
karamarisan
Member
 
Registered: Jul 2009
Location: Illinois, US
Distribution: Fedora 11
Posts: 374

Rep: Reputation: 55
What I'd recommend for you:

/boot = 200MB is fine. I've never seen a /boot partition that needed more.
/ = if you're really that cramped, I'd say 20 GB should be more than fine. The machine I'm typing this from is a Fedora install that's around a year and a half old (based on: I think it was originally Fedora 8), and with no special maintenance / is only 15 GB right now. It will start much smaller and maintenance will keep it that way if you ever come anywhere near that limit.
/home (or /home/you) = all remaining available space. I highly recommend keeping your homedir on a separate partition. In the event that you want to do a reinstall - say, if you decide you like another distro more than openSUSE - your life will be MUCH easier if preserving your personal data is as simple as just mounting that partition as /home (or /home/you).
swap = If you've got 4 GB RAM, I feel like you're risking something if you don't have at least that much swap and you plan to hibernate. 2 GB more isn't really that much, so I'd err on the side of caution and go 4 GB swap if I were you.

As for LVM, I'd say skip it. Functionally, the main promise of LVM, as I understand it, is that you can add space to logical partitions very, very easily (new disks can literally just be added to your volumes), with the drawback that it adds a good deal of complexity over simple primary/extended partitions and that the live environments you will use to recover your system if it gets screwed up may not support it quite so well. If you're doing custom partitioning anyway and don't have a particular reason you want to use LVM, I suggest you don't.


Edit: Did not know LVM could do that. Guess I need to read up. : )

Last edited by karamarisan; 07-12-2009 at 05:30 AM.
 
Old 07-12-2009, 05:49 AM   #4
Grife
Member
 
Registered: Oct 2006
Location: Finland
Distribution: openSUSE
Posts: 89

Original Poster
Rep: Reputation: 15
This is what I've been thinking now:
/ = 40GB
/boot = 200MB
swap = 8GB (I see myself doubling RAM sooner or later)
/home = the rest

Now one huge problem arises if I don't use LVM: That is, if I add another HDD and want to expand my /home on it, it's impossible without LVM. Right?

Last edited by Grife; 07-12-2009 at 05:53 AM.
 
Old 07-12-2009, 06:29 AM   #5
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,551
Blog Entries: 28

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Hello Grife
Quote:
Originally Posted by Grife View Post
Now one huge problem arises if I don't use LVM: That is, if I add another HDD and want to expand my /home on it, it's impossible without LVM. Right?
AFAIK (forgetting arrays) there's no way without LVM for a file system to be on two HDDs but is that an issue? By the time you get there, you'll probably find most of your data is in one directory under /home -- perhaps for one user or, if you have only one user, one particular directory.

Let's say your running out of space in /home/ and /home/grife/videos/ is taking most of the space. So you get another HDD, create a file system on it, move all the /home/grife/videos/ files to it and have it mounted at boot on /home/grife/videos/

Alternatively you could switch to LVM at that time. So you get another HDD, create a partition for LVM data on it, create volume group, volume, file system and move all the /home/ files to the new file system which you then have mounted at boot on /home/. Then you could delete the old partition that had the /home/ file system in it and re-use it for LVM data.

Best

Charles
 
Old 07-12-2009, 06:35 AM   #6
Grife
Member
 
Registered: Oct 2006
Location: Finland
Distribution: openSUSE
Posts: 89

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by catkin View Post
Alternatively you could switch to LVM at that time. So you get another HDD, create a partition for LVM data on it, create volume group, volume, file system and move all the /home/ files to the new file system which you then have mounted at boot on /home/. Then you could delete the old partition that had the /home/ file system in it and re-use it for LVM data.
What about doing the following: upon creation of filesystem I make / and /boot as regular partitions but make /home as logical volume so it could be expanded easily? That way I'd eliminate hassle and dangers of LVM I've read about on system critical partitions but enable easy extension of most space-demanding partition. Possible?

EDIT: yes it is and I'm taking that approach for the most careful balance between robustness, expandability and future-proofing. Thank you all for your input!

Last edited by Grife; 07-12-2009 at 06:38 AM.
 
Old 07-12-2009, 07:02 AM   #7
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,551
Blog Entries: 28

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Hello Grife

Sounds like a good plan! Must be because that's pretty much what I'd do if I was starting over with the exception that I'd put /var (and maybe /usr) in separate LVM-based file systems for the benefits of snapshotting prior to backing up. Hey, Microsoft thought it was worth using Veritas' expertise to add snapshotting to Windows when they created XP!

You probably want swap on a regular partition too (you knew that already).

For maximum flexibility (in case you want to install something like Windows which needs a primary within the first 4 GB of the disk -- and depending on how big your HDD is) you could put /boot as the first primary, leave space for another primary or two and then use logical partitions for all the rest.

Best

Charles
 
Old 07-12-2009, 09:44 AM   #8
karamarisan
Member
 
Registered: Jul 2009
Location: Illinois, US
Distribution: Fedora 11
Posts: 374

Rep: Reputation: 55
Quote:
Originally Posted by Grife View Post
What about doing the following: upon creation of filesystem I make / and /boot as regular partitions but make /home as logical volume so it could be expanded easily? That way I'd eliminate hassle and dangers of LVM I've read about on system critical partitions but enable easy extension of most space-demanding partition. Possible?
It's probably better to just make it a normal partition and, if you buy a new drive, just transfer everything and then switch the entry in fstab. The way I'm seeing it, spreading your data among drives with LVM provides all the increased risk of any drive failure that comes with RAID (i.e., two disks are more likely to have a failure than one), without the redundancy benefit to make up for it. Up to you if that's a risk worth taking, though.
 
Old 07-12-2009, 09:59 AM   #9
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,551
Blog Entries: 28

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by karamarisan View Post
LVM provides all the increased risk of any drive failure that comes with RAID (i.e., two disks are more likely to have a failure than one), without the redundancy benefit to make up for it. Up to you if that's a risk worth taking, though.
Good point and a disadvantage of LVM I hadn't thought of, probably because I rely on backups rather than HDDs to protect the data. Even so, re-configuring LVM does create extra work when recovering from a failed HDD.
 
Old 07-12-2009, 10:04 AM   #10
karamarisan
Member
 
Registered: Jul 2009
Location: Illinois, US
Distribution: Fedora 11
Posts: 374

Rep: Reputation: 55
Oh, absolutely - he who claims RAID as his backup solution has a fool for a sysadmin. I suppose if you have good disk backups, the increased failure risk isn't a big deal, but you don't get the speed benefits, either. LVM just isn't that exciting, though I still haven't looked into that snapshotting thing.
 
  


Reply

Tags
lvm, partitioning


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
Making Partitions: How big, how many, what kind? Cinematography Linux - Newbie 17 05-13-2005 05:05 PM
How big should the partitions be? NomDeGuerre Linux - Newbie 3 09-19-2004 01:25 PM
Create software RAID partitions first, then create filesystem partitions on top of th stefanlasiewski Linux - Software 1 04-28-2004 04:12 PM
Two big fat32 partitions plus the linux ones... viccavazos LinuxQuestions.org Member Success Stories 7 08-08-2003 10:24 AM
How big should partitions be? bycoffe Linux - Software 3 07-09-2001 12:16 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration