You are not logged in.

#1 2008-06-11 01:18:09

Berticus
Member
Registered: 2008-06-11
Posts: 731

Suggested Partitioning Scheme

So my partitioning scheme is as follows:

/
/boot
/usr
/var
/tmp
/home

Here's the issue, since I'm migrating from Gentoo, I don't know how large my /usr partition should be.  Gentoo requires a fairly large /usr directory due to all the packages and sources taking up additional space.  Currently I have 10 GB for /usr, which isn't enough.  However, I plan to use more lightweight programs.  For example instead of using GNOME as my desktop environment, I plan to simply use xmonad or awesome window manager.  I'm sort of debating whether I should still have GNOME or XFCE along with Compiz Fusion to have a wow factor in case people get curious.  That's how I got some people to switch to Linux.  So just because of that I'd like it, even though I'll probably never use it.  Which is the reason why I'm not definitely installing it, also because I hate how eye-candy is required to attract users.  Portage alone takes 3 GB!

A 2 GB root partition was a LOT more than sufficient, so I might bring that down to 1 GB.

A 125 MB boot was more than sufficient, might even bring it down to 32 MB even, unless for some reason Arch requires a larger boot partition.

For /var, 10 GB was fine, except I had an issue with my logging system, which eventually grew too large.  Probably will keep it as is though.

My 10 GB /tmp was excellent, so I think I'll keep that unless someone has a suggestion for it to be something else.  While I'm at the university, I always keep my computer going, unless I want to game, then I reboot into Windows.

And /home of course gets the rest, which will turn out to be almost 2 TB, after I get my files squared away.

/home, /usr, /tmp and /var will be in an LVM, so they will be extendable when I get another hard drive, which won't be for another year.

The main concern really is just /usr.

Offline

#2 2008-06-11 04:44:47

dwi
Member
Registered: 2008-01-27
Posts: 27

Re: Suggested Partitioning Scheme

My setup is as follows:

/boot   250MB. I store kernels, ramdisks, and some custom bootable stuff not related to Arch in there.
/         2GB. Way more than I really need.  Only using 173MB. I could probably resize it down, but not really worth the effort at this point.
swap = reasonable size for ram amount.

Rest of disk is throw into a single disk LVM volume group. 
The following are logical volumes:

/usr   5GB with 1.8G  used
/var   2GB with 1.2G used  
/tmp  2GB, no exec mount =)
/home constantly grows :)
/opt  512MB 
/srv  512MB

I've used this setup on my last machine and my current one. On my last machine, there was a noticeable overhead for LVM, mainly due to fragmentation of the volume group caused by my constant growing of the logical volumes by tiny amounts.  On my current machine, it's less obvious..and I also add in large chunks. I expand home by 10-20GB at a time, versus what 512MB->1024MB here and there.

If I had it todo over again I'd probably make the root smaller, and also invest in a setup that allows data protection.  But.. if you detect possibly drive failures, you can always use LVM to move critical data to another physical volume. You'd still have to manually migrate non-LVM data though.. that's assuming you detected the imminent failure, as it isn't always detectable depending on the nature of the failure.

I run a 'heavy' desktop compared to what you are describing going to. I run gnome + bunch of other crap. smile

Offline

#3 2008-06-11 12:57:04

Berticus
Member
Registered: 2008-06-11
Posts: 731

Re: Suggested Partitioning Scheme

Oh wow, if I can keep /usr under 10 GB, that would be amazing!  Same with /var and /tmp.  Currently the only thing I've thought aboud doing is an encrypted LVM.

Do you use only binaries?  Or do you build some or all of your programs from source?

I might have a "heavy" desktop as well, but it would only be to showoff to potential switchers.  The last person I help convert was attracted to the cube, when I had beryl.  Someone's been asking me for over a year to put Linux on his desktop.  A person before the last two mentioned converted, and one of the reasons was beryl (the other major reason was because he hated all the viruses and stuff he kept getting).  So just because of that, I might have a desktop environment, but it'd be lightweight, using either cream or xfce along with compiz-fusion.  Haven't put too much thought into that part yet...

Offline

#4 2008-06-11 14:43:20

dwi
Member
Registered: 2008-01-27
Posts: 27

Re: Suggested Partitioning Scheme

I have abs sync up community/core/extra. I do have quite a bit of packages I've compiled, but that process is done from my home directory. Then I just use a pacman -U to install it. I'm also fairly quick to clean out the pacman download cache as well, that can eat through space in /var fairly quickly depending on what all is going on in extra. smile

Offline

#5 2008-06-11 15:35:58

Zepp
Member
From: Ontario, Canada
Registered: 2006-03-25
Posts: 334
Website

Re: Suggested Partitioning Scheme

Why do you have such a massive /tmp? 10GB is huge...

Offline

#6 2008-06-11 17:09:36

Berticus
Member
Registered: 2008-06-11
Posts: 731

Re: Suggested Partitioning Scheme

I don't really remember, I made this partition scheme 2 years ago while I was working with Gentoo.  I think I saw a bunch of people have fairly large /tmp's as well.  I think I made it that size because I was anticipating on keeping my Linux box on almost all the time, so it wouldn't be able to dump the contents.  I don't know, but I'll change it to about 1GB or so.

I mean on Gentoo's partition scheme thread, there are a bunch of people with 3 GB and 4 GB /tmp's.  Not as big as mine, but still fairly large.

I always compiled my programs in /usr/local, and use make install for it to put the binaries where it needed to go.

Yeah, I'm planning on making /tmp, /var and /home noexec; /usr read only.  I'm debating whether I should make /sbin its own partition.  I would mount that as read-only, just as /usr is.  I just read /proc should be partitioned and mounted with nosuid and noexec.  It would seem in 2006, it was being targetted.

Offline

#7 2008-06-11 19:14:54

iBertus
Member
From: Greenville, NC
Registered: 2004-11-04
Posts: 2,228

Re: Suggested Partitioning Scheme

I use a separate partition for /, /usr, /opt, /var, and /home. I keep my boot files, obviously, in the root partition. I have fairly large discs and so my partitions are pretty huge. 2GB for /, 30GB for /usr, 12GB for both /var and /opt, rest for /home.  Not a real need for swap on my system currently, but I still keep a RAM sized partition around for good measure Oh, and /tmp is in tmpfs with size=2048 in fstab. I set nosuid for /opt, /var, /tmp and /home. Also set noexec for /var, /tmp. I leave /home without noexec so that my packages can be built in the home directory of my user.

Offline

#8 2008-06-11 19:28:49

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Suggested Partitioning Scheme

Some programs go into /opt. So, either dump the separate /usr or make a separate /opt as well. I recommend the former. Anyway, here's my sheme:

swap   - 2.5 GB
/boot   - 500 MB
/         - 11 GB
/tmp    - 4.5 GB
/var     - 2.3 GB
/home  - 8.5 GB
/data    - 130 GB

The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#9 2008-06-11 19:57:07

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: Suggested Partitioning Scheme

I have a stupid partition scheme, with only /boot separate. Too late to fix it now...

Currently, my /usr is 1.5GB and /tmp 1MB. I don't think I ever have a big /tmp even after weeks up.

Offline

#10 2008-06-11 20:06:40

Zepp
Member
From: Ontario, Canada
Registered: 2006-03-25
Posts: 334
Website

Re: Suggested Partitioning Scheme

Ya, I don't know if I have ever really used more than 1GB in /tmp.

Offline

#11 2008-06-12 03:14:26

Berticus
Member
Registered: 2008-06-11
Posts: 731

Re: Suggested Partitioning Scheme

Okay, so I guess so far it's:

swap - 512 MB
/ - 1 GB
/boot - 32 MB
/usr - 5 GB
/opt - 1 GB
/tmp - 1 GB
/var - 3 GB
/sbin - 128 MB
/home ~ 2 TB

I'm just worried about /usr being too small, but I guess it's fine since I'll have LVM, and will be able to size it whenever.  I mean currently I'm at full capacity with 10 GB for /usr...

Out of curiosity, what is /data for?  I've never seen it before.

Offline

#12 2008-06-12 04:20:50

Zepp
Member
From: Ontario, Canada
Registered: 2006-03-25
Posts: 334
Website

Re: Suggested Partitioning Scheme

Berticus wrote:

Okay, so I guess so far it's:

swap - 512 MB
/ - 1 GB
/boot - 32 MB
/usr - 5 GB
/opt - 1 GB
/tmp - 1 GB
/var - 3 GB
/sbin - 128 MB
/home ~ 2 TB

I'm just worried about /usr being too small, but I guess it's fine since I'll have LVM, and will be able to size it whenever.  I mean currently I'm at full capacity with 10 GB for /usr...

Out of curiosity, what is /data for?  I've never seen it before.

I have a /data that I created to hold my music and stuff, mostly large files.

Offline

#13 2008-06-12 05:08:12

tam1138
Member
Registered: 2007-09-10
Posts: 238

Re: Suggested Partitioning Scheme

What benefit do you see in having multiple partitions?  Do you have such arcane security requirements that you have to individually tweak mount perms?  Do you expect things like /usr to potentially grow out of control and render your system unusable due to lack of space?  I mean, I can theoretically see separating /var and possibly /tmp for these reasons, but I think even that isn't worth the effort.  I've got three: /, /boot, and swap, and I'm happy.

Offline

#14 2008-06-12 11:12:34

Berticus
Member
Registered: 2008-06-11
Posts: 731

Re: Suggested Partitioning Scheme

No significant added effort, but a major boost in security, so why not just do it?

/home is to just keep so if something goes wrong, all of my data is protected.  The only reason why I'm redoing /home is because I'm change my filesystem from ext3 to xfs.

/usr, /opt, and /sbin are there for the same reason: when you're established in your system, you shouldn't really need to install more.  The only times you'll need to write to them is when you update.  You get added security in two ways:

1. No one can install anything, not even root.
2. In the event of a system failure for whatever reason, you won't lose all of your data, programs, or anything like that.

It's more for servers, but regular users may do this as well, and like I said, you don't really need to put all that much effort into it.  The only thing you need to do is predict how big the partitions will be, and that's not too hard, unless you're going between distros.  Even then, it really isn't that hard.

Last edited by Berticus (2008-06-12 11:12:46)

Offline

#15 2008-06-12 15:09:35

Zepp
Member
From: Ontario, Canada
Registered: 2006-03-25
Posts: 334
Website

Re: Suggested Partitioning Scheme

Berticus wrote:

No significant added effort, but a major boost in security, so why not just do it?

/home is to just keep so if something goes wrong, all of my data is protected.  The only reason why I'm redoing /home is because I'm change my filesystem from ext3 to xfs.

/usr, /opt, and /sbin are there for the same reason: when you're established in your system, you shouldn't really need to install more.  The only times you'll need to write to them is when you update.  You get added security in two ways:

1. No one can install anything, not even root.
2. In the event of a system failure for whatever reason, you won't lose all of your data, programs, or anything like that.

It's more for servers, but regular users may do this as well, and like I said, you don't really need to put all that much effort into it.  The only thing you need to do is predict how big the partitions will be, and that's not too hard, unless you're going between distros.  Even then, it really isn't that hard.

The added security is really minor, root can just remount your read only partitions as RW and there are ways to exec stuff on a noexec partition. You can probably stop some retarded script kiddies and automated attacks but you can do that by just keep your ports closed/secured and if you want getting into something like SELinux for real security.

I found partition to much on a desktop either leads to wasted space and/or you running out of space and having to resize. It really isn't worth the trouble to have more than than the standard 3 partition + /home.

Offline

#16 2008-06-12 15:39:22

JeremyTheWicked
Member
From: Poland
Registered: 2008-05-23
Posts: 193

Re: Suggested Partitioning Scheme

Zepp wrote:

I found partition to much on a desktop either leads to wasted space and/or you running out of space and having to resize. It really isn't worth the trouble to have more than than the standard 3 partition + /home.

That's what I'm thinking as well. I have a laptop with limited disk space (it's more like 100GB than your TB thingy) so that wasted disk space is a more real danger than network attacks or whatnot.

I keep a swap partition slightly larger than my RAM to allow hibernation. I got a separate /boot partition and that's it.

I also have a pretty large FAT formatted partition where I store the stuff that I want to be accessible from both Arch and Windows (music etc.)

I used to make a lot of partitions in the past but then I figured it's overkill for a normal PC.

Last edited by JeremyTheWicked (2008-06-12 15:40:10)


arch(3) adj amused because you think you understand something better than other people ;P

Offline

#17 2008-06-12 15:45:31

Zepp
Member
From: Ontario, Canada
Registered: 2006-03-25
Posts: 334
Website

Re: Suggested Partitioning Scheme

JeremyTheWicked wrote:
Zepp wrote:

I found partition to much on a desktop either leads to wasted space and/or you running out of space and having to resize. It really isn't worth the trouble to have more than than the standard 3 partition + /home.

That's what I'm thinking as well. I have a laptop with limited disk space (it's more like 100GB than your TB thingy) so that wasted disk space is a more real danger than network attacks or whatnot.

I keep a swap partition slightly larger than my RAM to allow hibernation. I got a separate /boot partition and that's it.

I also have a pretty large FAT formatted partition where I store the stuff that I want to be accessible from both Arch and Windows (music etc.)

I used to make a lot of partitions in the past but then I figured it's overkill for a normal PC.

Agreed, I like the idea of /home separate as well but really that is just personal preference and I have done just the 3 many times in the past and it works good.

When I did the whole like 6-7 partitions thing in the past I found some of my partitions would start to get low on diskspace while others I had grossly over estimated. It's hard to tell what exactly your usage will be with a desktop, especially when you like to tinker with lots of different software packages over the years tongue.

Offline

#18 2008-06-12 16:20:10

Berticus
Member
Registered: 2008-06-11
Posts: 731

Re: Suggested Partitioning Scheme

I did more tinkering when I was new to Linux.  Now that I've established more of what I would like, I do a whole lot less.  Back then I had a spare hard drive just to manage all the tinkering, so it wouldn't affect my set-up.  In that one I did a very basic swap, home, root partition.

Offline

#19 2008-06-12 16:35:55

Zepp
Member
From: Ontario, Canada
Registered: 2006-03-25
Posts: 334
Website

Re: Suggested Partitioning Scheme

Berticus wrote:

I did more tinkering when I was new to Linux.  Now that I've established more of what I would like, I do a whole lot less.  Back then I had a spare hard drive just to manage all the tinkering, so it wouldn't affect my set-up.  In that one I did a very basic swap, home, root partition.

Ya that's true too, I know I pretty much know exactly what I want these days and my install is pretty small.

Offline

#20 2008-06-12 16:53:28

Zer0
Member
From: Windsor, ON, Canada
Registered: 2006-08-25
Posts: 299

Re: Suggested Partitioning Scheme

JeremyTheWicked wrote:

I also have a pretty large FAT formatted partition where I store the stuff that I want to be accessible from both Arch and Windows (music etc.)

Why even make a separate fat?  If you use ext3 then install extfs driver under windows to access your Linux drives. Then you can use ntfs-3g under Linux to go the other way.  Of course you need to use ext2/ext3 drives for this. I've been doing it this way for a little over a year now without issues.

Last edited by Zer0 (2008-06-12 16:53:52)

Offline

#21 2008-06-12 17:14:22

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Suggested Partitioning Scheme

I really don't see why people make their /home partition so huge and store everything there. I don't want to mix hundreds of config files with my data. That's why i have a separate /data partition.

Oh, and for distro-hopping storing everything in /home is a bad idea.

For example, something that happened to me:

You have a 100GB /home partition and keep all your data there
You then decide to try out Fedora and reuse your /home
You have to make a new user (if you make the name the same as your old one you're in for a lot of trouble)
You then realize your permissions are all wrong because with fedora, user IDs (UID) begin with 500 (by default, you can change it during install but it's easy to overlook) instead of 1000.

And then after fixing permissions you have to move everything from /home/username1 to /home/username2 and delete /home/username1

Boy, that's a drag....


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#22 2008-06-12 17:15:00

sniffles
Member
Registered: 2008-01-23
Posts: 275

Re: Suggested Partitioning Scheme

You have quite a disk going on there. Anyway, here's my setup:

/ - 512 MB (84 MB used)
/boot - 64 MB (13 MB used)
/tmp - 256 MB (6.1 MB used)
/usr - 1.5 GB (667 MB used)
/var - 1 GB (362 MB used)
/home - rest

Offline

#23 2008-06-12 17:46:53

JeremyTheWicked
Member
From: Poland
Registered: 2008-05-23
Posts: 193

Re: Suggested Partitioning Scheme

Zer0 wrote:
JeremyTheWicked wrote:

I also have a pretty large FAT formatted partition where I store the stuff that I want to be accessible from both Arch and Windows (music etc.)

Why even make a separate fat?  If you use ext3 then install extfs driver under windows to access your Linux drives. Then you can use ntfs-3g under Linux to go the other way.  Of course you need to use ext2/ext3 drives for this. I've been doing it this way for a little over a year now without issues.

That's true. I'm doing that as well wink I made this FAT drive out of old habit I guess. It's more or less the same idea like moljac024's /data partition.

Edit: Now I remember that my rationale back then was that I don't want Windows to be able to mess with my Linux installation and it was safer to make a separate partition to share data. Later on I gave up on that but I kept the FAT partition.

With regards to distro hopping and reusing /home: I am just using symlinks. E.g. I don't even have a separate /home partition on my Ubuntu. When I'm using Arch I mount my Ubuntu partition on /mnt/Ubuntu and I have symlinks in my home directory on Arch to all relevant subdirectories (like Documents, Downloads, .VirtualBox, etc.) No mix ups this way.

Last edited by JeremyTheWicked (2008-06-12 17:50:11)


arch(3) adj amused because you think you understand something better than other people ;P

Offline

#24 2008-06-12 18:11:04

tam1138
Member
Registered: 2007-09-10
Posts: 238

Re: Suggested Partitioning Scheme

Berticus wrote:

No significant added effort, but a major boost in security, so why not just do it?

To be honest, I don't find your arguments supportive of your assertion that this is a "major" boost in security.  The minor security benefit is offset, in my mind, by the unpredictability of filesystem use (eg, some distros put a lot in /opt, some don't).  The up-front planning isn't justified in my mind.

moljac024 wrote:

I really don't see why people make their /home partition so huge and store everything there. I don't want to mix hundreds of config files with my data. That's why i have a separate /data partition.

It depends what you mean by "everything".  I keep all my personal documents and whatnot in my home directory, and obviously all settings and dotfiles are there, but general stuff like music, videos, etc (ie, non-personal data files) are on the fileserver.  I have never had a problem re-using my home directory between distros, and there are many ways to make sure UIDs are set correctly.  (You can always just remove the user and re-create it if you mess up on install, because the only files that user should own are in the extant home directory.  Or you can recursively chown it.  Or you can hack /etc/passwd and /etc/shadow directly. tongue )

Offline

#25 2008-06-12 18:46:36

Berticus
Member
Registered: 2008-06-11
Posts: 731

Re: Suggested Partitioning Scheme

security doesn't necesarily mean little script kiddies going around and doing malicious things.  http://tldp.org/LDP/lame/LAME/linux-adm … oning.html
http://bbs.archlinux.org/viewtopic.php?id=42862

Well for my PC, I have only one user and I don't do enough distro hopping that it's really necessary for me to have stuff like music, movies, and all that in a separate /data partition.  In fact I would actually say I don't do any distro hopping anymore.  The only reason I have this migration is because of the direction Gentoo is going in, it seems like the packages in portage work less and less together with each update.  The last update I did yielded a whole branch uncompilable!  I forget what the exact problem was, but when I tried to look for a solution, I was told to just stay with the old one, which was an issue because it was a very common library used by a lot of programs.  Another reason for the switch is because I never found Gentoo to be all that great to 64-bit users, and someone suggested Arch to me for that very reason.

At some point, I will get a fileserver to for all of my stuff, especially if I have a family or something.  Hmm...  I don't know, maybe I will make a separate /data partition to share common stuff like music, movies and eBooks.  /home would definitely be left to personal stuff like school work, and later possibly work-related files.

Last edited by Berticus (2008-06-12 18:47:15)

Offline

Board footer

Powered by FluxBB