You are not logged in.

#1 2010-04-22 06:43:13

Alpinweis
Member
Registered: 2010-04-14
Posts: 5

[SOLVED] Partitioning scheme for a notebook with a 500GB hard drive

I am going to install Arch on my laptop with a 500 GB hard drive and wanted to check if the partitioning scheme I am thinking of will make sense, potentially saving me some troubles later on. I intend to use it mainly as desktop and development machine.

Here is the scheme:

/dev/sda1 - primary, for Arch itself - 50 GB - LVM with the following partitions:

/ (including /boot) - 500 MB
/swap - 2 GB (equal to 2 GB RAM to make hibernate to disk possible)
/tmp - 2 GB
/usr - 8 GB
/var - 8 GB
/home - the remaining ~30 GB

2 more primary partitions for trying out other OS-es (FreeBSD, Windows7 or some other Linux distro) some time in the future, maybe...
/dev/sda2 - primary - 50 GB
/dev/sda3 - primary - 50 GB

/dev/sda4 - the remaining 250 GB (to be mounted as /data) for movies, music, books and other stuff, that might be potentially shared between Arch and maybe Windows if I decide to install it on one of the spare primary partitions. Not sure if this should be a primary or extended one, although with an extended one I could have more logical partitions in case I need them).

GRUB2 as bootloader

Does this look ok? What are the risks of using LVM as described above? Would you suggest a better/safer scheme?

Last edited by Alpinweis (2010-04-24 04:19:51)

Offline

#2 2010-04-22 07:15:34

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: [SOLVED] Partitioning scheme for a notebook with a 500GB hard drive

Hm, tmp might be a bit small should you ever rip DVDs. You can of course stipulate another partition, but just something to bear in mind...


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#3 2010-04-22 07:43:46

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: [SOLVED] Partitioning scheme for a notebook with a 500GB hard drive

I'd be tempted to give some more space to /var as there are plenty of threads with folks complaining theirs is full due to the pacman cache.


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#4 2010-04-22 09:47:48

Ultraman
Member
Registered: 2009-12-24
Posts: 242

Re: [SOLVED] Partitioning scheme for a notebook with a 500GB hard drive

Installed my system in December 2009 and this is the current status of my disks:
My scheme on 320GB:

/dev/mapper/vg0-root   30G  4.5G   24G  16% /
udev                   10M  288K  9.8M   3% /dev
shm                   2.0G  524K  2.0G   1% /dev/shm
/dev/mapper/vg0-var    20G  5.6G   14G  30% /var
/dev/md0               61M   14M   44M  25% /boot
/dev/mapper/vg0-home  197G   75G  123G  38% /home

And a 4GB swap. I have 4GB RAM and do use hibernate sometimes. But 2G of swap would also have been enough for that, but I have the space anyway, so let's be safe.
And my opinion about it:
- Works fine, I haven't had any space issues.
- I could have made my / 15G smaller or more, as soon as I need the space I can redistribute it with LVM but for the moment it will remain like this, but for now I don't miss it, so it's fine.
- /var could have been smaller, but again: I don't miss the space so having some to spare there is fine.
- Could have made a separate /tmp

It's not all that critical! Just make sure you don't give your partitions too little space and you will be fine.
I would shrink down your /boot a lot. If you just use the Arch stock kernel, even 64MB is overkill, 32MB will do. If you test kernels and keep up to 3 on your system 64MB would be a fine number. And simply add 16MB per kernel after that.

Offline

#5 2010-04-22 10:58:46

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [SOLVED] Partitioning scheme for a notebook with a 500GB hard drive

Here is my take on it:
100Mib /boot
20Gib /
100% /home

Alternativly put /var on a seperate partion. There really isn't any reason to make a seperate /usr partion.

Bonus points if you use lvm2 + a fully resizable filesystem, since you then don't have to worry about partioning at all, since you can always resize, create, merge, split and delete partions to your hearth content.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#6 2010-04-22 11:50:41

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [SOLVED] Partitioning scheme for a notebook with a 500GB hard drive

/ (including /boot) - 500 MB
/swap - 2 GB (equal to 2 GB RAM to make hibernate to disk possible)
/tmp - 2 GB
/usr - 8 GB
/var - 8 GB
/home - the remaining ~30 GB

Make tmp bigger and var smaller... 4gb for var should be ample, and 8gb for tmp is good... And I'd increase / to 1gb at least... My /usr is 4.3gb with a full Gnome desktop, and / is ~600mb with a separate /var, /tmp, /boot and /home.

Just MHO.

Last edited by fukawi2 (2010-04-22 11:50:57)

Offline

#7 2010-04-22 13:55:39

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: [SOLVED] Partitioning scheme for a notebook with a 500GB hard drive

Being an ardent distro-hopper, I never like to to split up a distro - so the root filesystem gets it all - 20 gigs for each distro.
Because of the proliferation of dot-files (many of which are not portable), I do not have a common /home, but use one large partition for common stuff - instead of my /home. The advantage - I dont carry dot-files around, only files I care about.
In addition, my first - 30 mega - partition is a 'grub' partition where my menu.lst only chainloads to the different distros ... it all works a treat!

Offline

#8 2010-04-23 02:33:58

Raws
Member
From: Campo Grande - Brazil
Registered: 2009-08-19
Posts: 47

Re: [SOLVED] Partitioning scheme for a notebook with a 500GB hard drive

To your "main" system (arch, in the case) 50Gbs is enough, but I woudnt put it on so many separate partitions... 20Gbs for "root" and "30Gbs" for home (or everything together) would seem more simple and "flexible" (for example: what if in the future 8GBs isnt enought for /var but its much more than needed for "/usr").

I tend to think that separate partitions for /var, /usr, etc are more useful/needed in servers or specifical hardware specs (solid disks and HDs together, for instance)... For a normal personal computer, I dont think the benefits are worth the loss of flexibility with your space.

For other distros, that you just want to test/play I believe 5 to 15 Gbs are plenty... Most of then come in live CDs or DVDs... with 15GBs you can, for example, install ALL the packages of the openSUSE DVD, and still have aditional 10GBs to spare "toying" with the distro... You won't duplicate your emails/docs/music/etc in all these "play distro partitions", will you?

I dont use BSDs... but I imagine it has similar space needs to linux distros...

For Windows, it depends on what you intend to do with it. I usually leave 30GBs for windows in my notebooks... Its enought for the basic windows/office install plus one or two games and some spare space for other things. your 50GBs are plenty for most uses.

Finally, I NEVER format the main data partition on my machines in NTFS, for the following reasons:

1. I mainly use linux, and - despite the great work of the guys in NTFS-3G and other projects - its speed/confiability under linux is suboptimal when compared with EXT3/4.

2. I dont want windows to access all of my HDs... I prefer to minimize the risk of "damage" with virus/trojan/crashes and other problems typical of that platform.

These are my "two cents".

Offline

#9 2010-04-23 08:15:09

Alpinweis
Member
Registered: 2010-04-14
Posts: 5

Re: [SOLVED] Partitioning scheme for a notebook with a 500GB hard drive

Raws wrote:

To your "main" system (arch, in the case) 50Gbs is enough, but I woudnt put it on so many separate partitions... 20Gbs for "root" and "30Gbs" for home (or everything together) would seem more simple and "flexible" (for example: what if in the future 8GBs isnt enought for /var but its much more than needed for "/usr").

What about /swap and /tmp ? Are you keeping them under root too?

Then, for a Desktop machine, it all comes down to the following scheme:

/ (with /boot, /usr, /opt, /var) - 16 GB - ext3
/swap - 2 GB - ext3
/tmp - 4 GB - ext3 or tmpfs
/home - 28 GB - ext3

/data - 250 GB - ext3

What are really the advantages/disadvantages of such a scheme compared to the one from the original posting?

Offline

#10 2010-04-23 14:40:44

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: [SOLVED] Partitioning scheme for a notebook with a 500GB hard drive

/tmp can be voluminous at times (depends what you are doing) - big downloads can end up in /tmp before you realize it - and bang!!
If /tmp is under / - then you have more 'scope' ...

As for advantages/disadvantages - I suggest you read the suggestions you have allready been given - there is a lot of experience behind most of it!
In short - if you split it all up _and_ you want several distros you will have an almost impossible task of keeping them all apart. Hence my advice of "one-distro, one partition".
swap can/should be a common partition, no logic in having several swap's as you only boot one distro at a time.

If you lump most of it together under root _and_ you give root enough scope (space), you will not end up in the quandry of having more than sufficient disk-space, but the particular partition you are working on (be it /tmp or /var or whatever) is running out of space - seems silly to restrict oneself at such an early stage.
When/if you are an 'old hand' and loads of experience under your belt - then by all means go back and make it suit better.

Offline

#11 2010-04-23 19:19:44

Raws
Member
From: Campo Grande - Brazil
Registered: 2009-08-19
Posts: 47

Re: [SOLVED] Partitioning scheme for a notebook with a 500GB hard drive

I agree with EVERYTHING perbh said.

I use swap in a separate partition. /tmp, /var and /usr on the other hand, are examples of folders that may have "dynamical needs" in personal computers, so I would put all of then together with /root... (In some of my computers, specially when I want to have multiple OSs I even put /home together with root).

For example: One day you may need 8GBs in /tmp to copy that full double-layer DVD you just bought and want to backup... (And we are not speaking of Full HD medias, just a 2 layer DVD), On the next week you may want to keep pacman cache with all the packages for Gnome, AND the core, AND wathever else, because there was a recent update that broke many people's systems and you may want to preserve your drop back to the old versions in case of any problems, THEN you may want to download the latest DVD with openSUSE AND the free Betas of Windoze-8 and MS OFFICE 2020... Grab the pattern?

You see... In servers you can statisticaly know how much size you need for each directory... You can even LIMIT the users for that sizes with little worry (user 1000, you have only 20MBs for your emails and 10MBs for your personal/work files in the server... CLEAN YOUR TRASH big_smile).

You also receive meaningful advantages in the split on servers. Maximum benefit from different hardware specs (Solid State Disks, for instance), backup simplicity, increased security in multiuser environments, etc.

In some home desktops that applies to.

But the system you described on your original post dont seem to be this case. It will be in continual change... You said that you will be developing in that system, that you will be installing and removing other OSs, that you may want to share data with windows, etc...

In this type of system (IMHO) the least amount of "burdens" to reassign the space, the better...

Even the "home" folder, could be subject to that... Depending on your use (for instance, if you will just put your personal config files there, and some documents, the rest staying in the "shared" partition with other OSs), 30 GBs could be a REAL waste of space... On the other hand, if you install many games/apps in wine, and leave ALL of your emails in your client folder you could easily use about 15GBs just with ".evolution" and ".wine" (In one of my machines I use about 20Gbs on "/home" just in that folders alone).

Thats why I "voted" for flexibility... 50GBs to arch, be it separated in 18GBs "root", 30GBs "home" 2GBs swap OR 48GBs root and 2Gbs swap, whatever you feel is best...

I dont see any meaningful benefit in spliting the partitions in the system you described... And I know, for self-experience, that some GBs less in some partitions can become a big nuisance in the future, especialy it you have that space elsewhere without use.

Together with that, I also point that I always prefer to not use "unecessary complexity" in my system... Its just another thing to "crash" some day...

I never installed LVM on my systems because every kernel upgrade you need to manually intervene or mess your system. I dont want to think about the headaches of forgetting to run mkinitcpio everytime I upgrade the kernel.

But... in the end... Its your call offcourse... I just expressed my oppinion. Dont take it in a bad way...

Hey, If you want to, you may split even "/etc" and "/lost+found" to its own partitions big_smile

Cheers!

Last edited by Raws (2010-04-23 19:32:45)

Offline

#12 2010-04-23 21:45:37

Raws
Member
From: Campo Grande - Brazil
Registered: 2009-08-19
Posts: 47

Re: [SOLVED] Partitioning scheme for a notebook with a 500GB hard drive

I decided to post the partition division in some of my machines to ilustrate what I've said before:

Desktop 1 (download/internet/work server => stays on 24h/7d).
SDA1 15GB => arch (everything, includind var/tmp/usr/home)
SDA2 4GB => swap (the memory)
SDA3 15GBs => Test other distros...
SDA5 (extended) about 466GBs "data" (movies, music, download, dropbox, etc)
SDB (external HD) 1TB => "data2" backups and movable archives

Desktop 2 (game/hobbie/"old archive" machine, stays on only when in use)
SDA1 290GBs => Windows (with lots of games always installed)
SDA2 210GBs => data.
SDB1 20GBs => arch (same as above)
SDB2 20GBs => testing distros (same as above)
SDB3 2GBs => swap.
SDB4 458GBs => data.
SDC1 1.5TB => data

Laptops 1 and 2.
SDA1 => 30GBs windows
SDA2 => 30GBs (root)
SDA3 => 257GBs (home).
SDA4 => 3GBs (swap)
Before you ask why the laptops have such big "/home" directories and the desktops dont, the notebooks are "one user, one use" machines. I dont need to leave "data" separate for other users/systems to see... On the desktops, if a movie/book/music is on my home folder, my wife cant see it...

except windows partitions (NTFS) everything is in EXT3 or EXT4.

I've experienced a lot with other divisions and partition types (FAT/NTFS/etc)...

This is the division that works better for ME. For you, it may seem rubbish... But I just wanted to share the "filosofy" big_smile

Cheers!

Last edited by Raws (2010-04-23 21:53:28)

Offline

#13 2010-04-23 23:26:09

Alpinweis
Member
Registered: 2010-04-14
Posts: 5

Re: [SOLVED] Partitioning scheme for a notebook with a 500GB hard drive

Raws, thanks for your comments.

One last concern. I wonder whether it makes more sense to put all base Arch partitions (e.g. /,  /home, /swap) into an extended partition instead of allocating each one of them a primary partition? I see it as a waste of primary partitions. As you know some OSes require a primary partition to be installed on (like FreeBSD or Win), so having as many spare primary partitions as possible might be really helpful in some cases.

I understand that only the root partition needs to be a primary one (assuming I go with the old GRUB). The extended partition then will host the other parts of Arch (/home. /swap) and perhaps /data. That leaves us with 2 spare primary partitions that might be used for some other OSes that explicitly require a primary partition.

Offline

#14 2010-04-24 01:50:40

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: [SOLVED] Partitioning scheme for a notebook with a 500GB hard drive

My .02 is simply to recommend a separate ReiserFS /var partition, since it significantly speeds up pacman.

Offline

#15 2010-04-24 01:52:54

Raws
Member
From: Campo Grande - Brazil
Registered: 2009-08-19
Posts: 47

Re: [SOLVED] Partitioning scheme for a notebook with a 500GB hard drive

Yes, it would be interesting to leave "root" on a primary partition. Most of times I installed the "root" in an extended partition everything went ok... But one time, in one of my computers grub would accuse "error 18" cylinder outside BIOS support, or something alike... Since then... Root stays in primary.

The others ("/data" "/home" "/swap") may be extended, without any problems (at least, none that I know of).

Offline

#16 2010-04-24 04:16:28

Alpinweis
Member
Registered: 2010-04-14
Posts: 5

Re: [SOLVED] Partitioning scheme for a notebook with a 500GB hard drive

OK, as a recap, it looks like for a Desktop/Laptop system with just 1 user one of the following partitioning schemes may be considered as good enough:

-- 1 --
/ (everything)
/swap

-- 2 --
/ (everything except /home)
/home
/swap

-- 3 --
/ (everything except /var)
/var (ReiserFS - recommended)
/swap

-- 4 --
/ (everything except /home, /var)
/home
/var (ReiserFS - recommended)
/swap

with ROOT always on a primary partition (recommended), and others (/swap with /home and /var if used) on an extended partition (just to save the primary partitions for some other naughty OSes ).

The last one seems to be exactly the one used as an example in the Arch Beginner's Guide.

Offline

#17 2010-04-24 04:18:40

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Partitioning scheme for a notebook with a 500GB hard drive

Alpinweis wrote:

The last one seems to be exactly the one used as an example in the Arch Beginner's Guide.

Which should tell you that it is the winning entry...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB