You are not logged in.

#1 2008-07-31 14:11:14

albinoloverats
Member
From: London
Registered: 2007-12-18
Posts: 25
Website

Partitions and File Systems

I was wondering: Given a 140GB HDD, what would be an ideal partition setup? And which file systems to use on each partition?

The machine is an all-round-everything machine - users working locally or remotely; mail/file/media server.

Offline

#2 2008-07-31 14:49:49

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

Re: Partitions and File Systems

50mb /boot
10gb /
n gb for wherever you keep the mail spool (with tweaks like noatime etc) Size depending on usage.
and the rest for /home, asuming that you serv the media/file stuff from /home

Edit: oh, and 1.5x swap

Last edited by Mr.Elendig (2008-07-31 14:52:10)


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

Offline

#3 2008-07-31 15:03:26

dr.cranium
Member
Registered: 2008-01-25
Posts: 65

Re: Partitions and File Systems

From what I've gleaned.

/boot 50-100MB Ext2
/var  3-4GB ReiserFS
/      Rest   Ext3 or JFS
[Maybe a seperate home too]

Offline

#4 2008-07-31 15:03:31

albinoloverats
Member
From: London
Registered: 2007-12-18
Posts: 25
Website

Re: Partitions and File Systems

It's currently setup as follows, and there is much free space in /opt but very little in /var. Obviously this is due, in-part, to /var/cache/pacman.

/dev/sda2     ext3    2.0G  358M  1.6G  19% /
/dev/sda1     ext2     69M  9.7M   56M  15% /boot
/dev/sda4      xfs    122G   47G   76G  39% /home
/dev/sda5 reiserfs    8.1G  4.2G  3.9G  52% /usr
/dev/sda6 reiserfs    5.1G  1.4G  3.7G  28% /opt
/dev/sda7 reiserfs    3.0G  1.9G  1.2G  63% /var

Also, are the file systems appropriate?

Offline

#5 2008-07-31 15:35:01

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: Partitions and File Systems

My advice:

swap:  2*RAM if you require hibernation/suspend
ext3 on / using whatever free space is remaining after swap

If you want to be extra careful, toss a 100MB ext2 into the mix for /boot

Elaborate partition schemes are far overrated for general use.


thayer williams ~ cinderwick.ca

Offline

#6 2008-07-31 16:08:47

catwell
Member
From: Bretagne, France
Registered: 2008-02-20
Posts: 207
Website

Re: Partitions and File Systems

I almost always do :

/ - 12 GB
swap - RAM + min(RAM, 512 MB)
/dcs - the rest

I use /dcs to store all of my documents. I don't like /home for that since it's already crowded with dotfiles and such.

Offline

#7 2008-07-31 22:41:22

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: Partitions and File Systems

I have 2GB of ram so I decided not to use a swap at all. When I did have one it never got used.


neutral

Offline

#8 2008-07-31 23:17:33

vogt
Member
From: Toronto, Canada
Registered: 2006-11-25
Posts: 389

Re: Partitions and File Systems

lvm guys?

That way, if you made a mistake, adjusting your partitions is way easier. It's usually better to use a tool that's more powerful than you need, especially if it doesn't complicate things, which lvm does only a little IMHO.

@catwell: to keep those dotfiles where they don't get in the way, for reasonably standards-compliant software, how about setting XDG_CONFIG_HOME and XDG_DATA_HOME http://standards.freedesktop.org/basedi … c-0.6.html

@thayer: even if you suspend to disk, you still need less than 2*ram for suspending, and can often get away with less than 1*ram, since a big portion of ram is used as a cache which is dropped to speed up suspending at the cost of some slugishness on resume. pm-utils does this by default at least.

Last edited by vogt (2008-07-31 23:19:44)

Offline

#9 2008-08-01 05:12:32

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

Re: Partitions and File Systems

@vogt

What filesystem(s) are you using with your lvm setup?

Offline

#10 2008-08-01 06:19:25

Acecero
Member
Registered: 2008-06-21
Posts: 1,373

Re: Partitions and File Systems

I would do:

/var - 10 GB - reiserfs
/  - 30 GB - ext3
swap - 2 GB
/home - the rest - ext3

Last edited by Acecero (2008-08-01 06:21:04)

Offline

#11 2008-08-12 19:02:28

moberry
Member
Registered: 2008-08-08
Posts: 16

Re: Partitions and File Systems

sda1 100mb /boot ext2
sda3 10gb   / ext3
sda2 3gb     swap
md0  750gb /home (raid 1) ext3

Offline

#12 2008-08-13 00:17:25

cschep
Member
From: Portland, OR
Registered: 2006-12-02
Posts: 120

Re: Partitions and File Systems

It seems like there is a general consensus in putting / on like 10-15gb.

What if that fills up? aren't you totally screwed without a re-install? or is the point that it just better not fill up?

why risk it?

This is totally out of curiosity and N00bness. Not trying to prove any point, I'm getting a new laptop soon and this same question has been in my mind...

thanks!


there once was a man named pac.

Offline

#13 2008-08-13 00:34:15

Barrucadu
Member
From: Hull, England
Registered: 2008-03-30
Posts: 1,157
Website

Re: Partitions and File Systems

cschep wrote:

It seems like there is a general consensus in putting / on like 10-15gb.

What if that fills up? aren't you totally screwed without a re-install? or is the point that it just better not fill up?

why risk it?

This is totally out of curiosity and N00bness. Not trying to prove any point, I'm getting a new laptop soon and this same question has been in my mind...

thanks!

Well, you can easily resize partitions without reinstalling, but / never generally uses as much as 10-15GB unless you install some really big programs. /home is what gets used up the fastest.

Offline

#14 2008-08-13 00:41:16

moberry
Member
Registered: 2008-08-08
Posts: 16

Re: Partitions and File Systems

cschep wrote:

It seems like there is a general consensus in putting / on like 10-15gb.

What if that fills up? aren't you totally screwed without a re-install? or is the point that it just better not fill up?

why risk it?

This is totally out of curiosity and N00bness. Not trying to prove any point, I'm getting a new laptop soon and this same question has been in my mind...

thanks!

10-15Gib is usually fine for /.

For a desktop /home will be largest

/var can get HUGE on servers.

Offline

#15 2008-08-13 00:50:48

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: Partitions and File Systems

/dev/sda1: /, ext3, 8 GB
/dev/sda2: swap, 2 GB
/dev/sda3: /home, ext3 (remaining space)

What exactly is the point of a /boot partition, anyway?

Offline

#16 2008-08-13 01:04:51

moberry
Member
Registered: 2008-08-08
Posts: 16

Re: Partitions and File Systems

Gullible Jones wrote:

/dev/sda1: /, ext3, 8 GB
/dev/sda2: swap, 2 GB
/dev/sda3: /home, ext3 (remaining space)

What exactly is the point of a /boot partition, anyway?

Can be smart, "oops" situations can save your kernel and get you to a root shell. Some file systems need it. Linux cannot boot from XFS for example.

Offline

#17 2008-08-13 01:09:14

thisllub
Member
From: Northern NSW Australia
Registered: 2007-12-28
Posts: 225

Re: Partitions and File Systems

/ Won't fill up 8GB if you don't store data on it.

boot should be ext2 or ext3
other than that is choice.

XFS seems to win the objective comparisons so I use that.
Using LVM is a good idea if you want to run regular backups of live data because you can create temporary snapshot volumes.

Offline

#18 2008-08-13 01:22:49

moberry
Member
Registered: 2008-08-08
Posts: 16

Re: Partitions and File Systems

thisllub wrote:

/ Won't fill up 8GB if you don't store data on it.

boot should be ext2 or ext3
other than that is choice.

XFS seems to win the objective comparisons so I use that.
Using LVM is a good idea if you want to run regular backups of live data because you can create temporary snapshot volumes.

I wish all filesystems would format as fast as XFS does.

Offline

#19 2008-08-13 01:48:20

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: Partitions and File Systems

moberry wrote:
Gullible Jones wrote:

/dev/sda1: /, ext3, 8 GB
/dev/sda2: swap, 2 GB
/dev/sda3: /home, ext3 (remaining space)

What exactly is the point of a /boot partition, anyway?

Can be smart, "oops" situations can save your kernel and get you to a root shell. Some file systems need it. Linux cannot boot from XFS for example.

Thanks for the info... Though the latter is not true, I have definitely booted Linux from XFS.

Offline

#20 2008-08-13 01:53:04

moberry
Member
Registered: 2008-08-08
Posts: 16

Re: Partitions and File Systems

Gullible Jones wrote:
moberry wrote:
Gullible Jones wrote:

/dev/sda1: /, ext3, 8 GB
/dev/sda2: swap, 2 GB
/dev/sda3: /home, ext3 (remaining space)

What exactly is the point of a /boot partition, anyway?

Can be smart, "oops" situations can save your kernel and get you to a root shell. Some file systems need it. Linux cannot boot from XFS for example.

Thanks for the info... Though the latter is not true, I have definitely booted Linux from XFS.

I dont think grub can though. Last time I tried, a year or so. It couldnt. Might have changed by now.

Last edited by moberry (2008-08-13 01:54:15)

Offline

#21 2008-08-13 01:59:29

vogt
Member
From: Toronto, Canada
Registered: 2006-11-25
Posts: 389

Re: Partitions and File Systems

iBertus wrote:

@vogt

What filesystem(s) are you using with your lvm setup?

$lvs
  LV       VG   Attr   LSize   Origin Snap%  Move Log Copy%  Convert
  archroot vg0  -wi-ao  15.00G     <- reiserfs
  boot     vg0  -wi-a- 100.00M                                      
  home     vg0  -wi-ao  55.00G                                      
  nixos    vg0  -wi-a-   5.00G          <- reiserfs                            
  pacache  vg0  -wi-ao   5.00G                                      
  swap     vg0  -wi-ao   3.00G                                      
  toshi    vg0  -wi-a-   7.00G                                      
  win      vg0  -wi-a-   2.00G

Ext3 by default.

But the ones without the o attribute are experiments gone wrong, and will be removed if I need the space.

If I ever succeed in getting grub2 running, or if that finally replaces the old one officially, /boot can go on lvm, just for kicks.

And lastly, some OSes don't like to boot from lvm, like nixos, though that one should work with a bit more coaxing sometime....

@moberry: I prefer to save my wishes for filesystems that handle small files quickly wink

Offline

#22 2008-08-14 00:12:43

Jeffers0n
Member
Registered: 2008-07-09
Posts: 12

Re: Partitions and File Systems

I agree with everyone thats supporting lvm.  It's really great after your system has been running for a year and starting to fill up to be able to take space from one partition and give it to another.  It's pretty painless too, and the Arch wiki has a good article on lvm. 

I'm using lvm on an older machine to combine two smaller hard drives.

[root@arch2 ~]# pvdisplay 
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               vg0
  PV Size               7.25 GB / not usable 665.00 KB
  Allocatable           yes 
  PE Size (KByte)       4096
  Total PE              1855
  Free PE               1842
  Allocated PE          13
  PV UUID               JF62dz-HQu0-R4Zt-wSIr-mPZf-bKhj-Mx4i8Y
   
  --- Physical volume ---
  PV Name               /dev/sdb1
  VG Name               vg0
  PV Size               27.95 GB / not usable 3.59 MB
  Allocatable           yes (but full)
  PE Size (KByte)       4096
  Total PE              7155
  Free PE               0
  Allocated PE          7155
  PV UUID               4I1HE2-O821-Rr3n-jHZD-2wxq-YWj1-VxomNA
[root@arch2 ~]# vgdisplay 
  --- Volume group ---
  VG Name               vg0
  System ID             
  Format                lvm2
  Metadata Areas        2
  Metadata Sequence No  7
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                4
  Open LV               4
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size               35.20 GB
  PE Size               4.00 MB
  Total PE              9010
  Alloc PE / Size       7168 / 28.00 GB
  Free  PE / Size       1842 / 7.20 GB
  VG UUID               KKv7Q2-NxdY-MynI-REiB-2vDt-zmln-0ns8VB
[root@arch2 ~]# lvs
  LV   VG   Attr   LSize  Origin Snap%  Move Log Copy%  Convert
  home vg0  -wi-ao  7.00G                                      
  root vg0  -wi-ao 10.00G                                      
  swap vg0  -wc-ao  1.00G                                      
  var  vg0  -wi-ao 10.00G

Offline

#23 2008-08-14 19:12:20

new2arch
Member
Registered: 2008-02-25
Posts: 235

Re: Partitions and File Systems

If I were you, I'd consider dividing up the disk even further.
Consider making separate partitions for /var /tmp /usr /boot in addition of having / and /home and swap. (some recommend making a separate /usr/local as well but I don't see why a single /usr would not gain the same benefit or result).

You could then gain some neat security advantage by mounting for example /tmp as 'nosuid' and 'noexec' and 'nodev' in the fstab file, same goes for /var. You could also mount /boot and /usr as 'ro' and mount /home as 'nosuid' and 'nodev'. But this setup demands more attention whenever you want to update your system since you'll have to remove the values you've added in the fstab file for example for /usr and /boot (/boot - if there's a kernel upgrade) and sometimes /tmp, and do a reboot for the changes to take effect before you can apply the updates. And since Archlinux is a rolling distro with never ending updates, you'll probably end up fiddling with fstab *alot*. :-D  But increased security always comes with a price tag.

My suggestion is:

/boot - 100 mb
swap - flexible
/ - 1000 mb
/usr - 15000 mb
/tmp - 1000 mb (to be safe)
/var - 2000-3000 mb (pacman cache demands lot of empty space)
/home - remaining empty space

As for filesystem, ext3 works well and while there are other filesystems that are faster, I've come to like ext3 very much! XFS is cool but don't use it for /var - it takes ages for the filesystem to work with tiny and multiple files.

Last edited by new2arch (2008-08-14 19:16:01)

Offline

#24 2008-08-14 19:50:07

Garns
Member
Registered: 2008-05-28
Posts: 239

Re: Partitions and File Systems

Depending on how much packages you install, you should give var a bit more space. I'm not really happy with just 2GB, Im filling the partition much too often.

This is basically my fault, because I clear up my cache very seldom and tend to download monsters like KDE4 just to look at it...

However I would recommend at least 3GB for var, probably more.

Offline

#25 2008-08-14 23:20:51

thisllub
Member
From: Northern NSW Australia
Registered: 2007-12-28
Posts: 225

Re: Partitions and File Systems

I agree with a large var.

One thing that can save you if you fill a partition is a symbolic link.
I saved a too small / on my laptop by moving /usr/src to /var/usr/src it then linking.
Be careful that the partition isn't mounted noexec though or you won't be able to run anything stored on it.

Offline

Board footer

Powered by FluxBB