You are not logged in.

#1 2009-08-08 17:34:09

Jeff91
Member
Registered: 2009-08-08
Posts: 5

Suggested Partition Layout?

So Arch is my first time manually setting up my own Linux partitions. I have a 320gig drive and 4 gigs of ram. What would be the best layout for my partitions? (How big should I make /, /home, and swap?)

~Jeff

Offline

#2 2009-08-08 17:40:36

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: Suggested Partition Layout?

fstab:

LABEL=SWAP              swap                    swap        defaults                    0 0                 4GB
LABEL=SATA-ROOT         /                       ext3        defaults,noatime            0 1                 10GB
LABEL=SATA-BOOT         /boot                   ext3        defaults,noatime            0 1                 50MB+ 
LABEL=SATA-VAR          /var                    ext3        defaults,noatime            0 2                 10GB+
LABEL=SATA-HOME         /home                   ext3        defaults,noatime            0 2                 REST/2    
LABEL=SATA-DATA         /home/data              ext4        defaults,nodelalloc,noatime 0 2                 REST/2

i made 2 partitions with half of the remaining space, because ext3 takes long for fscking. and i thing it's safer when partion gets corrupted somehow.

Offline

#3 2009-08-08 18:14:58

Nepherte
Member
From: Singapore
Registered: 2008-09-09
Posts: 427

Re: Suggested Partition Layout?

I suggest you have at least the following: /, /home and swap. the size of swap depends on whether you are going to hibernate/suspend or not. You should have at least your ram size + a safe margin as swap if you want to hibernate/suspend. Otherwise the beginner's guide gives some more advice on swap size in function of your ram. I have about 12gb for root, which is more than sufficient. The rest for /home.

Offline

#4 2009-08-08 18:20:37

Valok
Member
Registered: 2008-10-07
Posts: 43

Re: Suggested Partition Layout?

Nepherte wrote:

I suggest you have at least the following: /, /home and swap. the size of swap depends on whether you are going to hibernate/suspend or not. You should have at least your ram size + a safe margin as swap if you want to hibernate/suspend. Otherwise the beginner's guide gives some more advice on swap size in function of your ram. I have about 12gb for root, which is more than sufficient. The rest for /home.

In the beginner's guide it also has you set up a /var partition.  I thought his was necessary, and if not, then what is the advantage of having or no having a /var?

Offline

#5 2009-08-08 18:25:09

jdhore
Member
From: NYC
Registered: 2007-08-01
Posts: 156

Re: Suggested Partition Layout?

Valok wrote:
Nepherte wrote:

I suggest you have at least the following: /, /home and swap. the size of swap depends on whether you are going to hibernate/suspend or not. You should have at least your ram size + a safe margin as swap if you want to hibernate/suspend. Otherwise the beginner's guide gives some more advice on swap size in function of your ram. I have about 12gb for root, which is more than sufficient. The rest for /home.

In the beginner's guide it also has you set up a /var partition.  I thought his was necessary, and if not, then what is the advantage of having or no having a /var?

The big advantage is you can use a separate filesystem for /var. Since it's a lot of small files (examples: The ABS, logs and the pacman DB), ReiserFS will out-perform Ext3. Maybe not by much, but still. I personally only use /, /home and swap.

Offline

#6 2009-08-08 19:45:45

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: Suggested Partition Layout?

At a minimum you'll wanna have a separate /home partition which makes reinstalls a snap as well as multi booting different Linux distros and using the same /home.  Here is my system if you care:

/ (20 gigs) ext4
/home (60 gigs) ext4
/boot (110 megs) ext3
swap (2 gigs)

The rest of the drive is split up into backup and data partitions.  BTW, 20 gigs for root is way overkill.  I'm only @ 3.9 gigs full right now (gnome/openoffice/some av stuff).  Remember that ext3/4 likes to have at least 20 % freespace to avoid fragmentation...

I have a /boot partition that's 110 megs so I can have the gparted live CD on there as well as memtest86+,  I like manually managing my menu.lst since I have a windows  partition and another Linux distro on this machine.  It's just easier to chainload or use direct grub entries to whichever I wanna use.

Last edited by graysky (2009-08-08 19:48:26)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#7 2009-08-08 20:05:35

smurnjiff
Member
Registered: 2007-06-25
Posts: 211

Re: Suggested Partition Layout?

Use LVM and partition as follows:

100MiB /boot /dev/sda1
10GiB / /dev/sda2
1/4 of remaining drive /dev/sda3
3/4 of remaining drive /dev/sda4
1/4 of remaining drive /dev/sda5
1/4 of remaining drive /dev/sda6
1/4 of remaining drive /dev/sda7

Offline

#8 2009-08-08 21:33:26

theapodan
Member
From: Virginia, USA
Registered: 2008-10-21
Posts: 116

Re: Suggested Partition Layout?

I'd suggest what I did:
/ 20 GB jfs
/var 10 GB reiserfs
/home 100 GB jfs

I'd suggest that you don't create a swap partition, and instead create a swap file in /boot

With 4 GB of ram, you probably won't swap, and a swapfile is easier to manage if you do need to change the size.

Fill the rest of the drive with data partitions.  You might use ntfs if you need to share data with windows.  jfs or ext3 or whatever if you don't.

Offline

#9 2009-08-08 21:49:33

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: Suggested Partition Layout?

theapodan wrote:

I'd suggest that you don't create a swap partition, and instead create a swap file in /boot

Create a swap file in /boot?  Never heard of that before...


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#10 2009-08-08 21:58:13

jelly
Administrator
From: /dev/null
Registered: 2008-06-10
Posts: 714

Re: Suggested Partition Layout?

graysky wrote:
theapodan wrote:

I'd suggest that you don't create a swap partition, and instead create a swap file in /boot

Create a swap file in /boot?  Never heard of that before...

Sounds l33t but aint going to happen !

Just follow the rules in the wiki :
- boot 64 Mb should be enough
- root 10 Gb max
- home rest of your space
- /var if you wanna

Offline

#11 2009-08-09 01:40:06

theapodan
Member
From: Virginia, USA
Registered: 2008-10-21
Posts: 116

Re: Suggested Partition Layout?

graysky wrote:
theapodan wrote:

I'd suggest that you don't create a swap partition, and instead create a swap file in /boot

Create a swap file in /boot?  Never heard of that before...

Doesn't have to be in /boot.  That's just a convenient place that seems more appropriate than anywhere else.

Offline

#12 2009-08-09 04:13:16

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

Re: Suggested Partition Layout?

jdhore wrote:
Valok wrote:
Nepherte wrote:

I suggest you have at least the following: /, /home and swap. the size of swap depends on whether you are going to hibernate/suspend or not. You should have at least your ram size + a safe margin as swap if you want to hibernate/suspend. Otherwise the beginner's guide gives some more advice on swap size in function of your ram. I have about 12gb for root, which is more than sufficient. The rest for /home.

In the beginner's guide it also has you set up a /var partition.  I thought his was necessary, and if not, then what is the advantage of having or no having a /var?

The big advantage is you can use a separate filesystem for /var. Since it's a lot of small files (examples: The ABS, logs and the pacman DB), ReiserFS will out-perform Ext3. Maybe not by much, but still. I personally only use /, /home and swap.

It also prevents any processes that log to /var/log from going crazy and filling up /.

Offline

#13 2009-08-11 09:20:03

dezza
Member
From: Denmark
Registered: 2007-04-05
Posts: 126

Re: Suggested Partition Layout?

I'm surprised only one suggested LVM since that with partitioning /var, /home, /etc, resizing would be handy .. Or ?

Offline

#14 2009-08-11 19:34:37

Bestiapeluda
Member
From: Buenos Aires, Argentina
Registered: 2007-10-16
Posts: 181

Re: Suggested Partition Layout?

Well, LVM isn't for first timers, or is it ?

Offline

Board footer

Powered by FluxBB