Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved]Partitioning a 60gb HDD
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
HouseAtreides
n00b
n00b


Joined: 29 Apr 2010
Posts: 58
Location: NH

PostPosted: Fri May 21, 2010 2:16 am    Post subject: [solved]Partitioning a 60gb HDD Reply with quote

I thought I'd go ahead and ask for a little bit of input on this before I go ahead with the install. I apologize for not using the sticky, but I'm very anxious to move forward.

As I said, I have a 60gb HDD. Here is what my current partition setup is in my Arch install.

/ 15gb - XFS
/boot 150mb - ext2
/swap 2gb
/home 43gb - ext4

I'm not sure if I would have been better off using XFS for /home too.... Not really sure.


Anyway, I didn't really know what I was doing when I made this partition setup, how should I change it for Gentoo? (separate /var /usr or /opt?) I don't keep too much data on my laptop, so it isn't terribly important that there be a lot of storage space, I'm more concerned with speed.

Also, is 2gb swap adequate...? I have 2gb of RAM.
_________________
~In a society that has abolished all adventure the only adventure left is to abolish that society.~


Last edited by HouseAtreides on Wed May 26, 2010 1:32 am; edited 1 time in total
Back to top
View user's profile Send private message
pianosaurus
l33t
l33t


Joined: 19 Apr 2004
Posts: 944
Location: Bash$

PostPosted: Fri May 21, 2010 2:50 am    Post subject: Reply with quote

XFS gives, as I understand it, good performance on large files. Your current scheme would put portage on the XFS partition, but portage contains a lot of tiny files. You would probably be better of using something like reiserfs for that. The ext systems are somewhere in between (though ext4 is getting pretty good at small files too, according to benchmarks). Personally, I use ext4 for root. It is very stable now (google recently switched from ext2 to ext4), and there are plenty of recovery tools available should it ever be necessary.

Swap depends on how you use your computer. I don't have any swap, but I don't recommend that. 2 Gb should be good for pretty much anything.

My boot partition is 10 Mb. A typical one is more like 30. Your 150 is quite large, but these days it's peanuts anyway.
_________________
PKA Cuber
Please add [SOLVED] to the subject of your original post when you feel that your problem is resolved.
Adopt an unanswered post
Back to top
View user's profile Send private message
HouseAtreides
n00b
n00b


Joined: 29 Apr 2010
Posts: 58
Location: NH

PostPosted: Fri May 21, 2010 3:21 am    Post subject: Reply with quote

I know XFS isn't conventional, but I think I went with it because something went wrong with my initial install using ext4 and I thought (while I was at reinstalling) I'd try something else for variety. It seemed at the time (with my limited knowledge) to give somewhat better performance so I just stuck with it; later I read up some on it and although it is designed for larger files, some benchmarks still put it as the speediest fs for many other tasks.

If I were to keep with it, would it be best to then put /var (that is the portage tree, correct?) on a separate partition, using reiserfs perhaps?

Also, would ext4 be better suited to root or /home, if I were to keep XFS around? I'm not quite sure which would be better for which, or if I should just use the same on each.

I didn't know you could run without swap, but okay on the 2gb :)

And to comment on the boot, I think I had memtest or something installed to. The Arch install guide also calls for a fairly sizable /boot if I recall, but as you said, "sizable" has taken on quite a different meaning nowadays.
_________________
~In a society that has abolished all adventure the only adventure left is to abolish that society.~
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Fri May 21, 2010 9:21 am    Post subject: Reply with quote

I keep a lot of old kernels around, so I tend to use around 64MB for a (separate)
boot partition. I can't break my heart over differences in file system speeds, so
I just use ext3 (and now ext4) for everything, since they are well-proven.

I prefer to use a separate /var partition, since it contains a lot of miscellaneous
log and scratch files which come and go; given 60G I'd use 64MB for /boot,
16G each for /, /var, /usr/portage, and /home. (Obviously one of those would
have to be cut back to 12G - probably /home.) I tend to install a swap partition
the same size as main memory, in case I need to use it for hibernation, but YMMV.
I've never seen it used for swap except for one occasion when X ran amok, so
you don't really need it.

Will
Back to top
View user's profile Send private message
HouseAtreides
n00b
n00b


Joined: 29 Apr 2010
Posts: 58
Location: NH

PostPosted: Fri May 21, 2010 9:17 pm    Post subject: Reply with quote

Alright, so I will go with a separate partition for for /var, does it need to be 16gb though? (will it benefit from more space?)

If a yes to that, then something like....

/boot - 64mb
/ - 16gb
/usr - 16gb
/var - 16gb
/home - the rest (around 10gb)
_________________
~In a society that has abolished all adventure the only adventure left is to abolish that society.~
Back to top
View user's profile Send private message
pianosaurus
l33t
l33t


Joined: 19 Apr 2004
Posts: 944
Location: Bash$

PostPosted: Sat May 22, 2010 3:32 am    Post subject: Reply with quote

Only put /, /usr and /var on different partitions if you intend to use different file systems on them. Otherwise, there's no point. /home makes sense to have on a separate partition regardless.

The portage tree (with all the tiny files) is in /usr/portage. If you use overlays, they will be in /usr/local/portage by default.

/var has tiny files too, but it is nowhere near the size of portage. On my machine, it's 111 Mb right now. However, /var/tmp is used by portage for compiling, so make sure you have plenty of room for that.

Just like cwr, I tend to prefer simplicity over performance. If you desperately want to scrape a few percent extra out of your system, put portage and /var on reiserfs, and use ext4 or XFS for the rest. There's not much use for XFS on root, so I'd just go with:

/boot - 64 Mb - ext2
/ - 24 Gb - ext4 (resize depending on what software you intend to install)
/home - the rest - XFS
_________________
PKA Cuber
Please add [SOLVED] to the subject of your original post when you feel that your problem is resolved.
Adopt an unanswered post
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Sat May 22, 2010 10:21 am    Post subject: Reply with quote

/var probably needs up to 8G for emerging large packages, eg: open office,
and it has the dubious distinction of being the only filesystem I've ever had
corrupted - as I said, scratch files come and go, and if you have a news feed
then the news files end up on /var as well, so it seems best to give it its own
fixed space.

/home needs to be separated for convenience in upgrading, and /usr/portage
because it has so many small files; when I used smaller filesystems I had to
add extra inodes when building /usr/portage, just to fit all the ebuilds onto
the filesystem (under ext3/4).

I wouldn't separate / and /usr - long, long ago I ran a system with / in a ramdisk,
and /usr separately mounted, but I really wouldn't bother now. You may even
have problems booting, since the current distributions may not be careful enough
in separating eg: /bin and /usr/bin.

One other thing I've found useful is (if you can find the space) a second installation,
on its own partition, that simply boots to a command line. That partition can be
pretty small, 4G or less (and needn't even be Gentoo, I suppose). It comes in
handy quite often, though, when messing around or maintaining Gentoo. A lot
quicker than having to boot from a LiveCD.

Good luck - Will
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21706

PostPosted: Sat May 22, 2010 7:28 pm    Post subject: Reply with quote

cwr wrote:
/var probably needs up to 8G for emerging large packages
Technically, you need a large amount of space for $PORTAGE_TMPDIR, which defaults to /var/tmp, but can be moved either temporarily or permanently.
cwr wrote:
/usr/portage because it has so many small files; when I used smaller filesystems I had to add extra inodes when building /usr/portage, just to fit all the ebuilds onto the filesystem (under ext3/4).
Squashfs can be a huge win here. It does make syncing a bit more complicated, though.
cwr wrote:
You may even have problems booting, since the current distributions may not be careful enough in separating eg: /bin and /usr/bin.
Although use of separate filesystems seems to have fallen from favor, it is still done often enough that I doubt support for a separate /usr is in any danger of bitrot.
Back to top
View user's profile Send private message
HouseAtreides
n00b
n00b


Joined: 29 Apr 2010
Posts: 58
Location: NH

PostPosted: Sun May 23, 2010 7:57 pm    Post subject: Reply with quote

Phew, lots of information here. Rather than responding to each person individually, I'll try and incorporate everything I read and propose a partition setup. I know I'm getting a little bit adventurous with the filesystems (as Hu touched on), but I would like to see for myself if this does actually give any noticeable benefits. Worst comes to worse I'm not installing on my main machine, and I backup regularly.

Based on what I've read, here's what I'm thinking.

/boot 64mb - ext2
swap 2gb - swap
/ 15gb - ext4
/home 15gb - XFS
I'm still kind of confused with respect to portage. It draws on both /var and /usr/portage, so it would be best to put both those on separate partitions? Can you put /usr/portage on its own partition if /usr is already part of the / partition?

I've heard a lot of numbers for how big these need to be too. Is 10gb each fair, or does one need more space than another? If I were to do 10gb each, and use reiserfs (I know, getting adventurous) then also add:

/usr/portage 10gb - reiserfs
/var 10gb - reiserfs

Would that make sense? As I said, /usr/portage and /var are still very nebulous to me.
_________________
~In a society that has abolished all adventure the only adventure left is to abolish that society.~
Back to top
View user's profile Send private message
Jimini
l33t
l33t


Joined: 31 Oct 2006
Posts: 601
Location: Germany

PostPosted: Sun May 23, 2010 8:19 pm    Post subject: Reply with quote

HouseAtreides wrote:
Can you put /usr/portage on its own partition if /usr is already part of the / partition?


Of course you can. For example, my /usr/portage/distfiles is mounted via NFS, also .tunderbird and .mozilla/firefox in my home-directory. 10GB should be enough for /usr/portage, in case you should need more free space here, you can tidy up a little with eclean.
/var itself does not need much space in general (on my workstation it "weighs" about 3G at the moment, a server with some logstuff and/or mail-functions needs more), but it holds /var/tmp - where some setups put really much stuff into (e.g. ut2004 copies all cd-content into this directory during the installation).

Better do not create too many mountpoints - every additional mountpoint wants to be paid with a little loss in flexibility, especially with such a "small" hard disk.
I prefer a partition-layout like this:
/boot - 64M
/ - at least 20G (some games need really much space)
swap - about 2G
/home - the rest

Of course only you know exactly, how much space you will need. My systems leech many many files via NFS from my fileserver (email, music, movies and stuff). With a big / and /home, you are very flexible and should not experience any problems with bigger packets.

Best regards,
Jimini
_________________
"The most merciful thing in the world, I think, is the inability of the human mind to correlate all its contents." (H.P. Lovecraft: The Call of Cthulhu)
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Mon May 24, 2010 7:57 am    Post subject: Reply with quote

Yes, you can mount any filesystem on any directory; except that any files already present
in that directory will be masked and inaccessible. On small machines I've sometimes mounted
eg: /var/tmp on an SMBFS file system exported by another, larger machine to build big
packages such as OpenOffice.

So you can certainly put /usr/portage on its own partition - part of my fstab is:
Code:

/dev/hda7      /boot      ext2      noauto,noatime   1 2
/dev/hda8      none      swap      sw      0 0
/dev/hda9      /      ext3      noatime      0 1
/dev/hda10      /home      ext3      noatime      0 2
/dev/hda11      /var      ext3      noatime      0 2
/dev/hda12      /usr/portage   ext4      noatime      0 2


I wouldn't go under 8G for /usr/portage - it seems to accumulate files. And if you run
out of space on /var/tmp you can always mount an exported drive, as I suggested
above, so /var is probably the place to shave space.

Will
[/code]
Back to top
View user's profile Send private message
HouseAtreides
n00b
n00b


Joined: 29 Apr 2010
Posts: 58
Location: NH

PostPosted: Tue May 25, 2010 4:44 am    Post subject: Reply with quote

So 8gb for /usr/portage and say, 5gb for /var would be fine?

Thanks to all though, I think I now know enough to move forward. I may try each method; both the basic partition set up and the more diverse one with portage and /var on separate partitions, and see which I find more agreeable.
_________________
~In a society that has abolished all adventure the only adventure left is to abolish that society.~
Back to top
View user's profile Send private message
pianosaurus
l33t
l33t


Joined: 19 Apr 2004
Posts: 944
Location: Bash$

PostPosted: Tue May 25, 2010 7:36 am    Post subject: Reply with quote

HouseAtreides wrote:
[...] I may try each method; [...] , and see which I find more agreeable.


That's what most people tend to end up doing anyway. Different tastes, and all that jazz.
_________________
PKA Cuber
Please add [SOLVED] to the subject of your original post when you feel that your problem is resolved.
Adopt an unanswered post
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Tue May 25, 2010 8:12 am    Post subject: Reply with quote

60 GB is plenty of space for a Gentoo installation, but 15GB for / is way too tight.
20GB minimum for / if you intend to emerge stuff like KDE and so on...
You always want a few GB free for /var/tmp to build stuff in.
JFS is a good filesystem for both small and large files. High performance, low overhead and never breaks.
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Tue May 25, 2010 10:52 am    Post subject: Reply with quote

Mike Hunt wrote:
60 GB is plenty of space for a Gentoo installation, but 15GB for / is way too tight.
20GB minimum for / if you intend to emerge stuff like KDE and so on...
You always want a few GB free for /var/tmp to build stuff in.


No, with a separate /var, /home, and /usr/portage 16G is fine for /. Mine is 60-70% full, and I've
got several hundred packages (apart from X and Gnome) emerged. I haven't tried building
OpenOffice recently, but the story seems to be that it needs 8G, so if / and /var are combined
they will need around 32G.

Will
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Tue May 25, 2010 5:40 pm    Post subject: Reply with quote

True enough cwr, hard to ntell exactly since this is always a subjective matter-of-taste opinion thing.

Smile :)

Cheers,

MH
Back to top
View user's profile Send private message
HouseAtreides
n00b
n00b


Joined: 29 Apr 2010
Posts: 58
Location: NH

PostPosted: Wed May 26, 2010 1:31 am    Post subject: Reply with quote

Well thanks again for the help everyone! I'm going to go ahead and try a few different configurations, referencing all the information I received from this thread. Not entirely sure exactly what those configurations will be yet, but I have a general idea of the two main ones I will try.

Thanks again to all :)
_________________
~In a society that has abolished all adventure the only adventure left is to abolish that society.~
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum