You are not logged in.

#1 2009-10-13 21:00:02

b3d3r
Member
From: Poland
Registered: 2009-10-10
Posts: 6

How to partition 160GB drive? And other questions.

Hi,

As you might expect from the tittle of this topic I/m a new Linux user, or to be more precise I've been using Ubuntu for last few months. I've decided however to go one step further and try Arch Linux -  the distro for advanced users ;). Right now I'm in the process of deciding how to devide my hard drive and what file systems to use?

On my current system I use:

/boot 100M ext2
SWAP 2048M SWAP
/ 30GB xfs
/home rest xfs

Should I use separate partitions for /var /usr and /opt? If yes what file systems do you suggest? Is it good idea to use xfs for root and home partitions?

b3d3r

Offline

#2 2009-10-13 22:40:00

MadTux
Member
Registered: 2009-09-20
Posts: 553

Re: How to partition 160GB drive? And other questions.

That largely depends on what system you have and how you intend to use it. I never found any use for separate /var, /usr, /tmp, /opt, etc., but I am a home user and there are certainly different opinions here in the forum. I usually setup my systems with 3 partitons:
- / :at least 10GB
- swap : twice of memory
- /home: usually the rest of the disc

I am using ext4 for everything except swap and never had problems with it. But you may also use xfs, if you wish. I had a Slackware system setup a couple of month ago and had / and /home on xfs without problems. However, I think that ext4 is mature enough, at least for my purposes.

Offline

#3 2009-10-14 01:34:07

gog
Member
Registered: 2009-10-13
Posts: 103

Re: How to partition 160GB drive? And other questions.

This is my 160G drive:

/dev/sda1 32M /boot
/dev/sda5 1G /tmp
/dev/sda6 1.5G /var
/dev/sda7 2G /usr
/dev/sda8 500M  /
/dev/sda9 142G /home
/dev/sda10 1G swap

Most people tell you to put swap up front, but if you have >1G of ram then it's likely that it will go unused.

Everything else is set up for speed, except /boot which should be ideally the last partition on the drive. I don't care about boot speeds, I much rather have a setup that makes actually using the system faster at the expense of boot time. I haven't moved boot to the end of the drive because it makes recovering with a livecd/usbstick impossible.

And I should also have a different partition for opt, or share it with usr.

Why so many partitions? I can set different mount options, for both performance and security. This also allows me to take advantage of every parition type as I see fit. I have XFS for home for all the movies and isos, reiser3 for var, ext4 for everything else. I disable the journal selectively for mounts that don't need it, etc. Lots of versatility.

I wouldn't recommend this setup if you care about boot times, since the time it takes to mount all of this can easily add up 5 seconds to init, specially when using reiser partitions. And I also don't recommend doing this with LVM since the performance would be abysmal, given that LVM main's benefit depends on not having continous partitions.

Last edited by gog (2009-10-14 01:44:27)

Offline

#4 2009-10-14 03:28:03

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: How to partition 160GB drive? And other questions.

We have questions for you before we can give definite advice :

1) Is this an internal drive or external? (looks like internal..but better to confirm wink )
2) Do you have any other OSes on the system (especially Windows) and if so, do you plan to keep them?
3) What do you mostly intend to do with the system? For eg. will you be doing a lot of Video Editing, or is this just a regular desktop/laptop


Until you answer the above, some general ideas are:

With Arch, its no longer required to have a separate /boot. Of  course no linux distro requires it, but what I mean is that Arch has patched the grub so as to be able to boot an ext4 partition -- which means that you can make your root to be ext4 without hassle. Grub2 - should you choose to install that has support for ext4 upstream. A separate /boot would be a good idea if you had multiple linux OSes and were using the same /boot partition for all so as not to mess with the grub. However a separate /boot does give you the ability to put adifferent filesystem on it like Ext2 - which is perfect on a /boot because you have very little writes to it which means less fragmentation - therefore you do not need the EXT3/4 features like journalling, extents etc. But with newer tech, and faster filesystems, this advantage is no longer that important because fscking in EXT4 is quite fast as well.

/var - has a huge number of files that are very small in size. Reiserfs (not the newer Reiser4- which is pretty unstable) is the best for this type of partition. I have my /var has reiserfs and I have noticed substantial speed increase over when it was ext3. There was also a thread on this forum where other users seem to think the same.

There is no need to separate /tmp and /opt IMHO. You don't write to them much anyway. There are only certain software that ever get installed under /opt. Both of them being under root is fine for most purposes.

Choosing filesystem not only depends on what kind of files you will have on that partition, but also on how many changes you are going to make to the partition over time. I know this because I did this a lot initially when I was in the process of getting the system right for my usage. For eg. IIRC, JFS (and XFS?) do not have the ability to grow the partition (or is it that you cannot shrink?) -- one of the two. Ext2/3/4 allows you to shrink and grow the partitions. So today if you make a partition for your music, lets say 40GB, and later you find it to be small because your collection grew, you can increase the size by encroaching on another partition. with JFS (and XFS?) you will have to re-create the partition from scratch.

Last edited by Inxsible (2009-10-14 03:42:23)


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#5 2009-10-14 04:58:43

gog
Member
Registered: 2009-10-13
Posts: 103

Re: How to partition 160GB drive? And other questions.

Inxsible wrote:

There is no need to separate /tmp and /opt IMHO. You don't write to them much anyway. There are only certain software that ever get installed under /opt. Both of them being under root is fine for most purposes.

Depends on the use. Like you said, system partition schemes are personal and you can't apply one rule for all.

If you use gimp or any other program that would  make extensive use out of tmp, then it would make sense to have a separate tmp (gimp, by default, uses ~/.gimp/tmp. Change it to tmp/gimp, or another partition closer to the beginning of the disk and see the difference when working with large files).

You also wan't to make sure / doesn't get filled up (part of the reason behind having a separate var), and second, you want to prioritize it's order on the hdd for faster IO.

If you regularly install big software that doesn't belong to your distro, then having a dedicated opt makes sense too.

My scheme is about making sure that the important paths get better IO than others. This, of course, wouldn't require so much micro managing with a bigger HDD, since the head doesn't need to move as much towards the outer, slower edge of the disk to get the same amount of data.

Offline

#6 2009-10-14 05:11:29

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: How to partition 160GB drive? And other questions.

gog wrote:
Inxsible wrote:

There is no need to separate /tmp and /opt IMHO. You don't write to them much anyway. There are only certain software that ever get installed under /opt. Both of them being under root is fine for most purposes.

Depends on the use. Like you said, system partition schemes are personal and you can't apply one rule for all.

If you use gimp or any other program that would  make extensive use out of tmp, then it would make sense to have a separate tmp (gimp, by default, uses ~/.gimp/tmp. Change it to tmp/gimp, or another partition closer to the beginning of the disk and see the difference when working with large files).

You also wan't to make sure / doesn't get filled up (part of the reason behind having a separate var), and second, you want to prioritize it's order on the hdd for faster IO.

If you regularly install big software that doesn't belong to your distro, then having a dedicated opt makes sense too.

My scheme is about making sure that the important paths get better IO than others. This, of course, wouldn't require so much micro managing with a bigger HDD, since the head doesn't need to move as much towards the outer, slower edge of the disk to get the same amount of data.

I agree to what you said, but given that the op mentioned that he is new to linux (although its funny that even after using Ubuntu for 6+ months he accepts that he is new to linux -- which I believe is the case since Ubuntu holds your hand so much), I think its unlikely that he will be considering all the optimizations that you mentioned. Obviously when he gets more experienced, he might want to start from scratch again. Again, its presumptuous, I know...but one step at a time.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#7 2009-10-14 10:03:05

b3d3r
Member
From: Poland
Registered: 2009-10-10
Posts: 6

Re: How to partition 160GB drive? And other questions.

Inxsible wrote:

1) Is this an internal drive or external? (looks like internal..but better to confirm ;) )
2) Do you have any other OSes on the system (especially Windows) and if so, do you plan to keep them?
3) What do you mostly intend to do with the system? For eg. will you be doing a lot of Video Editing, or is this just a regular desktop/laptop

Ad 1. Internal.
Ad 2. No Windows. Only Arch.
Ad 3. Regular Desktop... but I was also thinking about amateur video editing for youtube.com. I also use gimp for time to time.

Inxsible wrote:

/var - has a huge number of files that are very small in size. Reiserfs (not the newer Reiser4- which is pretty unstable) is the best for this type of partition. I have my /var has reiserfs and I have noticed substantial speed increase over when it was ext3. There was also a thread on this forum where other users seem to think the same.

How much space do I need for /var? Will 10GB be enough?

gog wrote:

If you use gimp or any other program that would  make extensive use out of tmp, then it would make sense to have a separate tmp (gimp, by default, uses ~/.gimp/tmp. Change it to tmp/gimp, or another partition closer to the beginning of the disk and see the difference when working with large files).

Will Reiserfs be a good choice for /tmp. I assume that /tmp consists of many small files. Is this correct?

Inxsible wrote:

its funny that even after using Ubuntu for 6+ months he accepts that he is new to linux

After installing Arch Linux (on my laptop) for the third time this week I've concluded that I'm a newbie ;)

Offline

#8 2009-10-14 20:28:12

gog
Member
Registered: 2009-10-13
Posts: 103

Re: How to partition 160GB drive? And other questions.

b3d3r wrote:

Will Reiserfs be a good choice for /tmp. I assume that /tmp consists of many small files. Is this correct?

Again, depends on the programs you're using. Gimp likes to make big files in tmp when I open 6000x6000 raw images, for example.

Not a lot of programs make extensive use of tmp unless configured to do so, and there's also the problem that with a dedicated tmp partition far away from files you'd usually open (home) there's the unnecesary work of copying between partitions. That means that the benefits show while using the program, as opposed to intial loading time.

You could also get more creative by copying your firefox's cache to a in subdir tmp, etc. Or go even further and run it in ram (there's a tmpfs guide on the wiki for this).

In short, the sizes depend on what you set up tmp to be. I like to make programs put big files in there that i'd other wise wouldn't be able to page into my 1 gig of ram. I have tmp as ext4 without journal.

Last edited by gog (2009-10-14 20:29:16)

Offline

Board footer

Powered by FluxBB