You are not logged in.
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
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
From what I've gleaned.
/boot 50-100MB Ext2
/var 3-4GB ReiserFS
/ Rest Ext3 or JFS
[Maybe a seperate home too]
Offline
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% /varAlso, are the file systems appropriate?
Offline
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
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
I have 2GB of ram so I decided not to use a swap at all. When I did have one it never got used.
![]()
Offline
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
@vogt
What filesystem(s) are you using with your lvm setup?
Offline
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
sda1 100mb /boot ext2
sda3 10gb / ext3
sda2 3gb swap
md0 750gb /home (raid 1) ext3
Offline
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
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
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
/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
/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
/ 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
/ 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
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
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
@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.00GExt3 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 ![]()
Offline
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.00GOffline
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
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
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