Author Topic: First attempt at partitioning  (Read 1841 times)

Offline wyzwyk

  • Full Member
  • ***
  • Posts: 93
First attempt at partitioning
« on: March 17, 2010, 01:55:55 PM »
PCLinuxOS 2010 will be my first installation of a Linux operating system and I have a number of questions about partitioning, specifically dealing with partition sizes, location on the disk, formatting, and mounting. So that you can help me easier I listed my computer's specs below.
          Gigabyte GA-P35-DS4 mother board, 4-1GB sticks of Corsair DDR2 800 RAM, Intel Core 2 Quad Q6600 2.4 GHz CPU, Corsair 620 watt modular power supply, EVGA GeForce   8800GTS Video card with 350MB on board DDR3 RAM, LiteOn SATA CD/DVD burner, 2- 250GB Western Digital Caviar Blue SATA hard drives, 1- 640GB Western Digital Caviar Black SATA hard drive, Klipsch THX 2.1 speakers, Windows XP Pro
     At the present time I have Windows XP Pro installed on one of the 250 GB hard drives.  The two others are empty.  It is my intention to install PCLinuxOS 2010 on the 640 GB HD and have it dual boot with Windows XP on the other drive.  I do not wish to share any data.  At a later date I will either uninstall Windows XP for a Linux Gnome distro (most likely), or just add Linux and have three operating systems.  Having never installed a Linux OS I need some feedback, so here is my preliminary idea for partitioning.  Much of this is a guesstimate. How does it look?

               Name                   Device          Mounting Point         Type of Partition       File System       Size of Partition
                                                                                                                                                GB  |  MB

               Boot                   /dev/sdb1           /boot                      Primary             ext2 or ext4                   150MB
               Root                   /dev/sdb2           /                            Primary                   ext4               5GB
               User                   /dev/sdb3           /usr                        Primary                   ext4              30GB
                                        /dev/sdb4            NA                         Extended                NA
               Optional              /dev/sdb5            /opt                       Logical                   ext4              10GB
               Variable Data       /dev/sdb6            /var                        Logical                   ext4               5GB
               Temporary           /dev/sdb7            /tmp                       Logical                   ext4               5GB
               Home                  /dev/sdb8            /home                     Logical                   ext4            500GB       
               Swap File             /dev/sdb9            swap                      Logical                    NA                2GB
               
               Unallocated                                                                                                           Whatever room is left on the drive (approx. 40GB)

     Questions:
     1.)   Would the older ext2 filesystem still be preferable to use over the newer ext4 journaling filesystem in the boot partition (/boot)?
     2.)    Is 150MB a proper size if I'm likely to have only a few kernels? (default, pae, and possibly one other should I ever like to try my hand at building one)
     3.)   Since I installed WindowsXP first where will the MBR be kept?  If it's in Windows can I move it easily to Linux?  Remember, someday I want to uninstall M$.
     4.)   Because I'm installing so many partitions is / (root) at 5GB too large?
     5.)   /opt, /var/, and /tmp were all rough guesses.  Too large?  Too small?
     6.)   At 500 GB /home is huge, but in it I will keep photos and music.  Should they have separate partitions too?
     7.)   Because I have 4 GB of RAM on my computer I thought 2MB of Swap would be enough.  Correct
     8.)   Can you have more than one swap file?  If so does it make much of a difference, and how do you set it up?
     9.)   Do backup files ever get their own partition?
 
     Forgive me for the number and type of questions I have but in my reading there were a number of conflicting opinions and ambiguities I would like clarified.  I'd really like to get this right BEFORE I install.  Lastly, and perhaps most importantly, I would VERY MUCH like to hear how the experienced users in this forum partition your hard drives.
Thank you,
Tom Wyker (aka wyzwyk)
   

Offline Joble

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6804
  • USA - Mountain Time
Re: First attempt at partitioning
« Reply #1 on: March 17, 2010, 02:04:56 PM »
From my experience you really don't need all that, unless you know what you're doing and really want it.  All I use is:
swap
/
/home

If you want expert advice, just hang on a bit, we have a few of those too.
« Last Edit: March 17, 2010, 03:58:29 PM by Joble »
Search First.
Forum Rules
Hero means I talk a lot, nothing more, nothing less!
Have an Awesome Day!
Healthy System

Offline Padma

  • Hero Member
  • *****
  • Posts: 1099
  • The Outbond
    • Civilization Fanatics Center
Re: First attempt at partitioning
« Reply #2 on: March 17, 2010, 02:09:14 PM »
FWIW, all three of my systems only have 160GB drives, so I don't have the "huge /home" issue that you do. ;)

Typically, I partition them thus:

sda1/20G
sda2swap2G
sda3/home20G
sda4
sda5/data100G
sda6/testremainder

I put my actual user data in the /data partition, and set up links to it in my /home partition.  The reason for this is that I can wipe my /home, if necessary, yet still not lose my data.  The /test partition is where I put test releases.
1st Lieutenant, USAFR (Retired)
Co-Administrator: Civilization Fanatics Center

Ramblings of a Professional Computer Geek


Offline wyzwyk

  • Full Member
  • ***
  • Posts: 93
Re: First attempt at partitioning
« Reply #3 on: March 20, 2010, 05:53:22 PM »
Quote
I put my actual user data in the /data partition, and set up links to it in my /home partition.  The reason for this is that I can wipe my /home, if necessary, yet still not lose my data.
Padma, a symlink?  That seems like a good idea.  I've heard others mention them.  When and how do you set up the link?  Can I assume it can be done for your music and photos too?

Online Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6371
  • I'm going South
Re: First attempt at partitioning
« Reply #4 on: March 21, 2010, 07:31:17 AM »
wyzwyk,

Your "preliminary idea" looks very much like a traditional Linux setup from very many years ago (apart from the fact that the partitions are bigger). As Joble pointed out it's all too complicated on a modern system.

There are three reasons for using lots of partitions: you may have to store different parts of your system on separate hard drives; some of the partitions must be writable when you run Linux (/etc, /var, /home) and some don't (/usr); and you may want to reinstall without overwriting your whole system.

Today all your partitions will typically be writable anyway, so this is not a reason to have /usr and /var on different partitions, unless they are also on separate drives.

Many years ago, the /boot directory had to be on a partition that was contained within the first 1024 cylinders of a drive, so when drives grew larger one needed a separate /boot partition. But that was long ago. Today you won't need a separate /boot partition. (If you compile your own kernels you may want to retain them when you reinstall, but that's what backups are for: not overwriting /boot won't be enough anyway.)

The applications in /opt are supposed to be more or less self-contained, so if /opt is on a partition of its own, you might in some cases get away with retaining them when you reinstall the rest of your system. They aren't likely to be very many though, and some of them may depend on data in /etc and /var. If you don't know exactly why you need a separate /opt partition, you don't.

On the other hand Padma's suggestion that you should create a separate data partition is an excellent one. You then have a choice of retaining your entire home directory when you reinstall, or overwriting the configuration files in /home/<you> while retaining your important data.

I have a data partition mounted as /home/<user>/data (which is more standards compliant than mounting it as /data), and /home/<user>/Pictures and /home/<user>/Movies are just symlinks to directories within /home/<user>/data. My emails are still intermixed with the configuration files in /home/<user> though, so I wouldn't let a reinstall overwrite my home directory without very good reasons.



But the greater number of partitions you have on the same drive, the less economically you utilize the space on that drive. This just means that having a separate data partition makes even more sense if it's on a different drive....

« Last Edit: March 21, 2010, 08:27:35 AM by blackbird »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline menotu

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 15281
  • ┌∩┐(◕_◕)┌∩┐
Re: First attempt at partitioning
« Reply #5 on: March 21, 2010, 07:56:37 AM »
From my experience you really don't need all that, unless you know what you're doing and really want it.  All I use is:
swap
/
/home

If you want expert advice, just hang on a bit, we have a few of those too.

Ditto! I would agree with Joble - I only use 3 partitions and regularly run data backups to ext. hdd's and DVD.

But in saying that,  padma's use of a /data partition is a very good one.

As its your first Linux install you may want to build up to a multi-partition setup, but of course that's wholly your choice.
PCLinuxOS 32bit KDE 4.10.1; kernel-3.4.11-pclos1.bfs & 64bit 3.2.18bfs; NVidia GeForce 8400GS 1GB 310.19 driver

Sony Vaio SVE1513A4ESI Laptop, Intel Core i5, 2.6GHz, 6GB RAM, 750GB, 15.6" Intel HD Graphics 4000

Online Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6371
  • I'm going South
Re: First attempt at partitioning
« Reply #6 on: March 21, 2010, 08:15:10 AM »
To return to your remaining questions:

You can have several swap partitions. Old swap partitions will all be recognized automatically when you install your system. (I've never used swap files, so I don't know if you can have several of those too. But you were talking about partitions, weren't you?)

Having /tmp on a partition of its own is particularly uneconomical. In certain cases /tmp needs lots of space; usually it needs very little. As you have 4GB of RAM, you might even consider keeping /tmp in RAM.
« Last Edit: March 21, 2010, 08:20:06 AM by blackbird »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline wyzwyk

  • Full Member
  • ***
  • Posts: 93
Re: First attempt at partitioning
« Reply #7 on: March 22, 2010, 09:40:53 AM »
Thanks to all who responded to my post.  It's appreciated.
Quote
Your "preliminary idea" looks very much like a traditional Linux setup from very many years ago
As a newbie anything and everything I know about partitioning is an idea of someone else, something I've read.  As for being a partitioning setup from many years ago, well, I wouldn't know about that.  The consensus of those who replied to my post is that fewer partitions is better.
Quote
There are three reasons for using lots of partitions: you may have to store different parts of your system on separate hard drives; some of the partitions must be writable when you run Linux (/etc, /var, /home) and some don't (/usr); and you may want to reinstall without overwriting your whole system.
Blackbird, of the reasons you listed to use lots of partitions the third one, wanting to reinstall without overwriting your whole system, was a concern for me.  I figured that as a total newbie I would eventually screw something up royally, and that having lots of partitions would mitigate the damage and make repair easier.  :o  Wouldn't I want to save my programs in /usr and /opt if I would have to reinstall? You make a good point that there may be dependency issues with /opt in data stored in /etc and /var.
Quote
Many years ago, the /boot directory had to be on a partition that was contained within the first 1024 cylinders of a drive, so when drives grew larger one needed a separate /boot partition. But that was long ago. Today you won't need a separate /boot partition. (If you compile your own kernels you may want to retain them when you reinstall, but that's what backups are for: not overwriting /boot won't be enough anyway.)
I see your point and this makes sense.
Quote
On the other hand Padma's suggestion that you should create a separate data partition is an excellent one. You then have a choice of retaining your entire home directory when you reinstall, or overwriting the configuration files in /home/<you> while retaining your important data.

I have a data partition mounted as /home/<user>/data (which is more standards compliant than mounting it as /data), and /home/<user>/Pictures and /home/<user>/Movies are just symlinks to directories within /home/<user>/data. My emails are still intermixed with the configuration files in /home/<user> though, so I wouldn't let a reinstall overwrite my home directory without very good reasons.
Yes, I definitely want to implement this idea.  As for swap I think I will have a 2GB partition somewhere on the main hard drive, but also have another swap partition on the outer edge of one of the 250GB hard drives too.  That drive will also be home to where I have some of the backup. CDs and DVDs will supplement this.  In my readings some people have had issues with the temp files filling up and causing a problem in /.  Wouldn't a separate /tmp partition help guard against this?  One thing that has been made clear to me as I prepare to partition is that I'm short on knowledge on this topic and that I need to do A LOT more reading.  From what all of you have said I will definitely reexamine this initial partitioning plan.  Perhaps a less "involved" scheme really would be in my best interest, at least until I have a better feel for Linux.  Thanks for your input.


Online Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6371
  • I'm going South
Re: First attempt at partitioning
« Reply #8 on: March 22, 2010, 12:00:06 PM »
Wouldn't I want to save my programs in /usr and /opt if I would have to reinstall?

Not really. The largest part of a reinstall goes into /usr. So if /usr is not empty you'll end up with a mix of updated packages and the packages you've just reinstalled, and a system that is certain to be broken.

In some distros /usr/local is a directory that you might want to retain, because that's where some apps that you compile yourself will go, but this isn't really relevant in PCLinuxOS, where you are discouraged from installing anything from outside the repos. (For the last year I've only had one application in /usr/local: a self-compiled version of GNU Backgammon, and recompiling it is less troublesome than moving /usr/local onto a partition of its own -- and certainly no reason to give all of /usr a separate partition.)

Quote
As for swap I think I will have a 2GB partition somewhere on the main hard drive, but also have another swap partition on the outer edge of one of the 250GB hard drives too.

That may be a good idea. Some people insist that having all your swap space on another drive makes swapping faster, unless that second drive is very much slower than your primary one. I've also read different theories as to whether it's better to have a swap partition at the beginning of the drive or at the end or smack in the middle, but in your case I don't think it really matters. With 4GB of RAM you won't see much swapping anyway.

Quote
In my readings some people have had issues with the temp files filling up and causing a problem in /.  Wouldn't a separate /tmp partition help guard against this?

Yes, it would. But it would also increase the chances of your /tmp partition filling up instead (which would be almost equally bad) -- while most of /tmp would be empty most of the time. If /tmp is just an ordinary directory under /, it will share the space on your disk with a large part of your system. If you run out of space you'll be in trouble, but that will happen slightly later if you haven't decreased the size of / with the size of /tmp. (But having /tmp in RAM is still worth considering.)
« Last Edit: March 22, 2010, 12:28:04 PM by blackbird »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline wyzwyk

  • Full Member
  • ***
  • Posts: 93
Re: First attempt at partitioning
« Reply #9 on: March 22, 2010, 02:50:11 PM »
     Blackbird, fast reply!  Excuse the pun but thanks for taking me under your wing!  The more I look at what you and others are saying the more it makes sense to me to simplify the partitioning scheme.   I can see that with my preliminary idea and the fact I'm a newbie I would be asking for trouble.  I'm now down to 5 partitions: / (root), 2-swap, /home, and /home/<user>/data (with links to pictures, music, and backup).  As a newbie I will want to look at A LOT of applications, so in light of this fact what would be a good size for the / (root) partition?
     I am intrigued with the idea of having /tmp in RAM.  Tell me more about it. What are its advantages and disadvantages to this arrangement?  How does it work, and how do you set it up?

Online Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6371
  • I'm going South
Re: First attempt at partitioning
« Reply #10 on: March 22, 2010, 06:34:54 PM »
As a newbie I will want to look at A LOT of applications, so in light of this fact what would be a good size for the / (root) partition?


That is a difficult question to answer. How many are "A LOT" of applications? And how large would they be?

For most people 20 GB would be enough, but as you seem to have enough disk space, you could double that. I wouldn't go above 40 GB though, as I'd find better use for the space storing films and pictures. Actually 30 GB would be enough for me, but then I wouldn't want to test every app in the repository....

Quote
I am intrigued with the idea of having /tmp in RAM.  Tell me more about it. What are its advantages and disadvantages to this arrangement?  How does it work, and how do you set it up?


The easiest way of setting it up is by ticking "Clean /tmp at each boot" during the install -- or in PCC (Boot->Set up boot system->Advanced->Clean /tmp at each boot).

There are any number of scripts on the net that will actually clean /tmp at boot, but ticking this alternative in PCC will do it in a roundabout way by moving /tmp into RAM. (A couple of years ago this was something you were strongly discouraged from doing, but at that time most people did not have 4 GB or more of RAM.)

For the details see:

http://www.ibm.com/developerworks/library/l-fs3.html
« Last Edit: March 22, 2010, 06:45:28 PM by blackbird »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline Xenaflux

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3834
Re: First attempt at partitioning
« Reply #11 on: March 22, 2010, 09:47:57 PM »
Quote
For most people 20 GB would be enough, but as you seem to have enough disk space, you could double that. I wouldn't go above 40 GB though, as I'd find better use for the space storing films and pictures. Actually 30 GB would be enough for me, but then I wouldn't want to test every app in the repository....

I once have installed ALL KDE3 applications in the repos available, including games and databases for games, plus a lot of Gnome apps and libs and I came to a total of 16.5Gb.

So why you will need 30 Gb goes beyond my understanding.

Use " KDiskFree " ( in monitoring ) and tell me how much you really have installed, and then I ask you the same question....why do you need all that free space in your / partition


However, start with 30 Gb if you feel more comfortable, and remember, there is always Gparted LiveCD that you can use to resize your partitions.
Like Partition Magic in Windows
« Last Edit: March 22, 2010, 10:00:41 PM by Xenaflux »
The great thing in this world is not so much where we stand,
as in what direction we are moving.
                                                    (Oliver Wendell Holmes )

Offline wyzwyk

  • Full Member
  • ***
  • Posts: 93
Re: First attempt at partitioning
« Reply #12 on: March 22, 2010, 10:26:17 PM »
Quote
I once have installed ALL KDE3 applications in the repos available, including games and databases for games, plus a lot of Gnome apps and libs and I came to a total of 16.5Gb.
Thanks Xenaflux.   Only 16.5 GB!  That's an interesting tidbit of information.  Until now I hadn't a clue on what my actual size requirement for applications might be.  This gives me a little better gauge on my needs.  While I would like to look at a lot of programs no way would I ever install every KDE application..... nowhere close to that!

Offline Xenaflux

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3834
Re: First attempt at partitioning
« Reply #13 on: March 23, 2010, 12:01:50 AM »
I simply did it as an experiment, as at the time there was a discussion going on as to what size should root ( / ) be.

Since you want to learn, experiment and therefore screw up your installs, may I advice you to install PCLINUXOS 2 times .
One time an install which you treat with love and care, and another one where you do your devellish experiments ( = Learn )

Remember, you only need ONE swap partition for X amount of installs.

Have fun
The great thing in this world is not so much where we stand,
as in what direction we are moving.
                                                    (Oliver Wendell Holmes )

Online Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6371
  • I'm going South
Re: First attempt at partitioning
« Reply #14 on: March 23, 2010, 06:19:11 AM »
I once have installed ALL KDE3 applications in the repos available, including games and databases for games, plus a lot of Gnome apps and libs and I came to a total of 16.5Gb.

A very realistic number. In my last install of 2009 the space used in / has grown to just under 16 GB in ten months. (In the 2010 beta I'm using right now it's still just 6.5 GB. But this is a very fresh install.)

Quote
So why you will need 30 Gb goes beyond my understanding.

Well, there's quite a number of applications that I might want to play with but hesitate to install because they are so large. In 2009 just FlightGear plus a minimum of data would have taken up half a gig. Blender with dependencies would take up more than 100 MB, the Gimp help files around 130 MB (more then twice as much as Gimp itself), and the newest kernel sources 290 MB. If one wishes to compare different desktop environments, just installing most of Gnome with the Gnome Office suite will easily eat up 800 MB, and so on.

Now, I couldn't say that I personally would really need more than 10 GB for /, and it's very unlikely that I'll actually fill up 20 GB during the next year.

But wyzwyk wrote: "I will want to look at A LOT of applications".

20 GB might still be more than enough for him. It probably would.

Or it might not. I know from experience that it isn't hard to fill up 30 GB if you test everything that just might be interesting. So wyzwyk's question wasn't an easy one.
« Last Edit: March 24, 2010, 08:43:04 AM by blackbird »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D