LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Need Partition Suggestion (https://www.linuxquestions.org/questions/linux-desktop-74/need-partition-suggestion-686312/)

hosler 11-26-2008 06:59 AM

Need Partition Suggestion
 
I use gentoo, and I'm about to reinstall. This time, I would like to put my /home directories on a separate partition so I wont lose all that data whenever I want a clean install. Now I have a 160 gb hard drive on this laptop, and I would like to know what size you guys think I should have for my / partition. I don't want to end up it being too small to hold all my programs and stuff, but also not too large as it would take away space from /home. I would just be running a few dev software, games, and music.

Thanks!

Hangdog42 11-26-2008 07:20 AM

You probably don't need a ton of space for /. On my main laptop, I've got a 30g partition for / and it is only about a third full and I have a fair amount of software installed. On my sever, / is only 15G, but it still is only about half full. If you store most of your data and music on /home, my guess is that 20-30 gb should be great plenty. Of course make sure that things like /tmp get cleared out on a regular basis so it doesn't overwhelm /. I've got a cron job that runs daily and eliminates anything in /tmp over 30 days old and that hasn't caused any problems and kept /tmp in decent shape.

acid_kewpie 11-26-2008 07:20 AM

well if you're installing gentoo you should really have a more sophisticated scheme than that. where's your /usr, /var and /tmp partitions? you've not mentioned /boot either but I assume you'd certainlny have one of those. with a proper partitioning scheme, / itself would only be a few gigs, maybe up to 4 on a 160 drive, as it's really not going to contain much. totally depends how you use your system (more of a style / preference thing), as well as what you use it for (your apps) but i'd put 10 in /usr, 4 in /tmp, 10 in /var, 100mb in /boot (first partition on disk) and 4gb swap and the rest on /home

monsm 11-26-2008 07:55 AM

Not sure I agree with all that Chris says above. I certainly wouldn't bother about partitions for /usr, /var and /tmp on a desktop system. 10-20 Gb for / is probably enough though. The guide for swap is 1.5x memory size although I hear people saying that when you come up towards 4Gb memory, you don't really need swap at all. At least if you don't hibernate. I guess yours is somewhere between (3 Gb swap is probably enough). You could check the discussions on the Gentoo forum on that.
Yes, a small /boot partition is usually good too.

Mons

Acron_0248 11-26-2008 09:05 AM

Well, I don't see really a problem with using separate partitions for /var, /usr and /tmp, in any case, even if is a desktop system, it could be seen as a way to use different mount options (nodev, noexec, and so on...) for every partition thus increasing security, yes, it could make a little more sense to use a more complex scheme in server wise but isn't a bad option for desktops.

In anycase, my system (running gentoo aswell) use this:
Code:

/ = 5gb
/usr = 8gb
/var = 7gb
/home = 5gb
/tmp = 200 mb

I'm a minimalistic kind of guy but if you like to install a bunch of programs you might want /usr to be bigger (if you use /usr as a separate partition)

Finally, if you are going to have /var on a separate partition, be sure to give it enough space since there is where portage compile the image packages (/var/tmp) and things like openoffice take some space while compiling

AuroraCA 11-26-2008 09:23 AM

Everyone is minimizing the amount of disk space needed in the /var directory tree. /var is the default location for Mysql and Postgresql data files. /var/www is often used for the web root. If you plan to have large databases or if you plan to use /var/www as the primary web root then you should not mimimize the space in that directory.

Acron_0248 11-26-2008 09:32 AM

Quote:

Originally Posted by AuroraCA (Post 3355344)
Everyone is minimizing the amount of disk space needed in the /var directory tree. /var is the default location for Mysql and Postgresql data files. /var/www is often used for the web root. If you plan to have large databases or if you plan to use /var/www as the primary web root then you should not mimimize the space in that directory.

Indeed, you're right on that :)

Although you can move the webroot to other partition, unless you compile manually (not using emerge) or modify the ebuild, databases and some other webserver related software will be saved in /var so, in the case you're planning to host large webservers (don't think so, but don't know you either) then you need to make the /var partition bigger

I have a webserver on my system but is just for testing and project development so those 7gb in /var fits me well :)

Hangdog42 11-26-2008 11:49 AM

If space on /var is really an issue, MySQL at least will follow soft links, so you can move the database somewhere else and just have a link in /var. That said, if you're running a production server instead of just fooling around with databases, you probably do want a decent /var.

monsm 11-27-2008 05:01 AM

There are times when a separate partition is needed for things like /var. If you run things using /var that can in some situations grow unexpectedly, e.g. as has been mentioned, a database server. These might end up using a lot of disk space in the /var tree, so then it is worth it having a /var partition in order to avoid /var eating all the disk space from root and crashing the system.

So the trick is to think about the usage. If you don't run programs that make use of .e.g. /var extensively like this, you will just waste disk space by reserving too much space for /var. You will be better off in those cases keeping /var on the root partition (maybe keep an eye on it from time to time using du and other tools).

In this case the disk is only 160Gb, and it doesn't sound like it will be running big /var intensive servers, so I wouldn't bother wasting space on all these extra partitions.

Mons


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