LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Is this a good partition set-up? (http://www.linuxquestions.org/questions/linux-general-1/is-this-a-good-partition-set-up-726655/)

Smokey_Mtn Ron 05-17-2009 08:34 PM

Is this a good partition set-up?
 
I will soon be installing Linux Mint as my only OS on a new 500gb hard drive. Is this a good partition scheme to use? Any suggestions would sure help as this is the first time I have done this!

5gb primary for "/" ext3
4gb logical for "swap"
7gb logical for "/usr" ext3
2gb logical for "/tmp" ext3
1gb logical for "/var" ext3
rest of space for "/home" ext3

snowtigger 05-17-2009 08:50 PM

Looks pretty good, although you could add....

A little one at the beginning for /boot, say 128mb

And another which i tend to add is /opt, of say 4gb or more if you like (things like openoffice normally end up in /opt)


Once you installed run df -h and you see who much space you actually use in each one.

:)

FragInHell 05-18-2009 12:25 AM

I would make var a little bigger, in case you wish to keep your logs for a bit longer, or you generate a lot of logging. The best approach would be to use logical volumes then you can grow them as you need.

Smokey_Mtn Ron 05-18-2009 01:33 AM

Ok, thanks!! Is /boot and /opt both logical partitions? Where should /boot be at? Before or after /swap? Also I'll increase /var to 3gb. Should that be enough?

saikee 05-18-2009 02:22 AM

I only do one partition per Linux. First one needs a swap. All others are just subdirectories of a single mounting point of /.

Then again I am the single user and see no real benefit of setting up a home desktop like a server for multi users. The sizes of various subdirectories can then expand and contract freely without any worry. Haven't met a Linux installer that doesn't play ball with a single partition yet.

snowtigger 05-18-2009 01:48 PM

Put /boot at the very beginning of the drive, before anything else. It is not really necessary these days but i consider it good practice. Once upon a time systems could only see the first 1024mb of a drive. But i think just about all modern systems have over come that limitation.

:)

SlowCoder 05-18-2009 02:07 PM

Quote:

Originally Posted by saikee (Post 3544280)
I only do one partition per Linux. First one needs a swap. All others are just subdirectories of a single mounting point of /.

Then again I am the single user and see no real benefit of setting up a home desktop like a server for multi users. The sizes of various subdirectories can then expand and contract freely without any worry. Haven't met a Linux installer that doesn't play ball with a single partition yet.

This is the simplest solution, obviously. But there are benefits to creating multiple partitions, especially if disk space is an issue. If, for instance, your logs get too big in a single partition, they could begin to fill your space, and affect all parts of your system. If /var is on its own partition, the logs will only be able to fill that partition.

On that same note, I only use swap, /, and /home partitions. That way, if I need to reinstall the OS, I can keep my /home data intact, and only reformat the / partition.

moxieman99 05-18-2009 02:32 PM

Quote:

Originally Posted by Smokey_Mtn Ron (Post 3544076)
I will soon be installing Linux Mint as my only OS on a new 500gb hard drive. Is this a good partition scheme to use? Any suggestions would sure help as this is the first time I have done this!

5gb primary for "/" ext3
4gb logical for "swap"
7gb logical for "/usr" ext3
2gb logical for "/tmp" ext3
1gb logical for "/var" ext3
rest of space for "/home" ext3

My preference is to have specialized partitions. That way if I have to rescue or back up, I know exactly where to go.

As others have said, it's nice to have /boot as the first primary partition. Fedora and similar distributions like 200mb for boot, so if you ever change out of linux mint, you might want to have a /boot partition around 200mb.

/ as the second primary partition. 5 gig will do, but you might want to jack that up to 15 gig if you ever change distros or install oodles of stuff into /.

Personally, I like /home as my third primary partition. That's just me.

Four gig of swap is huge. Will you be doing enough of a load to justify it? By the way, I like putting /tmp and /swap at the very end of my hard disk. That way I can tweak them without having to furtz around with other partitions, and there's rarely anything I need on /tmp.

/usr, /var, and /opt should be on most people's lists. As others have said, applications like OpenOffice default into /opt.

Personally, I like saving my data files and personal files somewhere other than /home. That way if I ever have to add another user there is space for them, and if I ever change my settings, I am less likely to destroy my data.

Don't be afraid to experiment, and good luck.

jschiwal 05-18-2009 02:48 PM

You aren't allowing much space for some of the partition such as /var, and /usr. Given that you have a 500GB drive, you can be more generous. Much depends on the usage. If you are going to burn CDs & DVDs then add 1 GB to /tmp for CDs or 5 GB for DVD's. Your users temp space will be symbolically linked to a directory in /tmp so normal user programs make use of /tmp. Servers will use space in /var or /srv. For a workstation, /usr will fill up quickly as you add software over time. My /usr directory uses 12 GB. However, I do have a habit of installing the *-doc version of packages when possible. Whenever you install packages from your distro's package manager, almost all of the files will be installed under /usr. Unless you are running a dedicated mysql or web server, the /usr partition will be the second largest.

Having /boot as the first partition on the disk would allow you to easily create an image backup -- just in case. It is small and easy to backup & restore using dd.

Smokey_Mtn Ron 05-18-2009 05:28 PM

Hey, you guys are really helping me!! Thanks!! How does this look?

/boot 500mb 1st primary
/ 15gb 2nd primary
/swap 4gb logical
/usr 20gb logical
/tmp 7gb logical
/var 7gb logical
/opt 7gb logical
/home rest of space logical

lumak 05-18-2009 09:47 PM

@ /opt partition

It takes a bit more set up, but to me /opt should really be /usr/opt. To avoid changing build scripts or mucking around with packages, you can put a bind mount in your /etc/fstab.

Code:

mkdir /usr/opt
vim /etc/fstab
  # Add in the following to /etc/fstab after /usr mount point
  /usr/opt  /opt  none  bind

I don't store enough in /opt to consider making it a partition but yet I don't want it on my root partition... BUT!!!!! if your Distro installs some packages to /opt wait till after the main install and this fix before installing the package. Or just move it afterward then set up the mount. At least with open office, I haven't seen issues with this setup. BTW I believe a package meant to install into /opt will overwrite a symbolic link called /opt and actually make it a directory. This is why I used a bind mount.


I believe you also use this trick for simplifying sharing files when hosting an ftp with your computer. Symbolic links generally arn't respected and hard links can't cross partitions. So you just bind mound a directory to another directory.

moxieman99 05-19-2009 06:57 AM

Quote:

Originally Posted by Smokey_Mtn Ron (Post 3545116)
Hey, you guys are really helping me!! Thanks!! How does this look?

/boot 500mb 1st primary
/ 15gb 2nd primary
/swap 4gb logical
/usr 20gb logical
/tmp 7gb logical
/var 7gb logical
/opt 7gb logical
/home rest of space logical

500mb for /boot is way too much in my opinion, and I would like to know how much RAM you have and why you think you need so much swap. Also, what about putting /tmp and swap at the end of the disc? (suggestion).

If you're happy with it, we're happy with it.

sycamorex 05-19-2009 07:06 AM

Quote:

Originally Posted by moxieman99 (Post 3545654)
500mb for /boot is way too much in my opinion, and I would like to know how much RAM you have and why you think you need so much swap. Also, what about putting /tmp and swap at the end of the disc? (suggestion).

If you're happy with it, we're happy with it.

Yeah, the swap partition seems slightly too big for me as well (I never exceed 2GB), however, with 500GB of drive space you can afford to be generous:)

Smokey_Mtn Ron 05-19-2009 06:14 PM

Ok, I think I'm starting to understand (I think). How does this look? This is only a home computer that I use to surf the web and do normal things like that. Also use it for storing some pictures and video's. Also storage for bank statments and other documents. Is there any thing I need to increase?

Primary /boot 200mb ext2
primary / 15gb ext3
logical /home 40gb ext3
logical /usr 20gb ext3
logical /var 7gb ext3
logical /opt 7gb ext3
logical /tmp 2gb ext3
logical /swap 2gb swap (I have 2gb of RAM)

FragInHell 05-19-2009 06:41 PM

The sizes look really good but I think you will end up with a lot of wasted space. Remember that it is very easy to grow a logical volume and file systems, but fairly hard to shrink it. So with that in mind I would start with slightly smaller logical volume sizes, then you can grow them as you need. That way your not wasting so much space. I very much doubt that you will ever use all the space you have allocated.

Primary /boot 200mb ext3
logical / 10gb ext3
logical /home 40gb ext3
logical /usr 5 gb ext3
logical /var 3 gb ext3
logical /opt 2 gb ext3
logical /tmp 2 gb ext3
logical /swap 2gb swap (I have 2gb of RAM)

This way you have plenty of space to grow into where you need it.
Being a home user, music, photos, etc etc most of the space is going to go into your /home
Even a standard installation, openoffice etc etc is not likly to use all this space.

/var is only going to fill up if you have a lot of logs, and package updates etc, so 3 GB should be enough, but of course if you find yourself running out of space you can grow it.
/tmp is always a good one to keep seperate, it stops processes running away and filling up / as causing system problems. 2GB is going to plenty.
If you going to be doing a lot of video editing etc then 2GB of swap is fine.
Also the best part of using logical volumes is flexability, if your example you are running an apache webserver and its taking alot of space, its not problem to drum up some more logical volumes for the websites and logs etc.
So if you have a 500G disk, I would create it with the /boot as the primary partition and then assign the rest of the disk to a logical volume. You use about 55Gb's of that to start with and that gives you over 450GB to grow as you need.
Thats more than enough :)


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