Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Partitioning HD on new box
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
mukwuknuk
Tux's lil' helper
Tux's lil' helper


Joined: 23 Dec 2003
Posts: 80
Location: Colorado, USA

PostPosted: Fri Jan 09, 2004 3:56 pm    Post subject: Partitioning HD on new box Reply with quote

I'm in the process of buying a new computer from a company specializing in Linux boxes*, and here is the partitioning scheme they've suggested for the hard drive:

/ 2 gigs
/usr 8 gigs
/var 2 gigs
swap 1 gig
/opt 1.5 gigs
/home the rest

Now calm down, keep reading, I haven't asked my question yet! I don't want to get into a discussion of whether /opt should be bigger than /var, whether swap should be twice the size of RAM and all those details; I have a higher level question.....

What is the advantage of defining multiple partitions with fdisk and then mounting them as various sub-directories? One disadvantage I see is that a predicted size might be too low and later you might run out of space (in which case I suppose adding a link to a partition with more space might circumvent the problem, but I digress).... So anyway, what is the advantage of this scheme over the usual "Windoze" approach of just defining one giant partition and dividing it up into directories?

Anyone wish to comment? Thanks.

* If you wish to know the name of the U.S. vendor (whom I recommend even though they don't install Gentoo yet), send me an email and I'll tell you. I feel if I post the name here folks will accuse me of advertising for them, which doesn't belong here in this forum. I have no affiliation with the vendor other than as a satisfied customer.
_________________
"If there are back-slashes in your path, you're heading down the wrong path ... backwards."
Back to top
View user's profile Send private message
metalac
Apprentice
Apprentice


Joined: 21 Aug 2002
Posts: 191
Location: Seattle, USA

PostPosted: Fri Jan 09, 2004 4:13 pm    Post subject: Reply with quote

One of the definite advantages is the filesystems. So you could have each of the "sub-directories" a certain filesystem. So if you know that /etc is full of small file, which usually is then you put a filesystem that is optimized for dealing with small files and so on.
_________________
>>>>> Ignorance is bliss <<<<<
Back to top
View user's profile Send private message
Kirigoe
Tux's lil' helper
Tux's lil' helper


Joined: 10 Jan 2003
Posts: 147
Location: concrete hut, sweden

PostPosted: Fri Jan 09, 2004 4:13 pm    Post subject: Reply with quote

the only advantage i know of is that if one partition runs out of space it doesn't affect the others, consider a server with only one partition running out of diskspace, it's pretty much b0rked for the time being. if there is more than one user on the computer it might be a good idea to have /home seperate, and for logfiles filling up, a seperate /var is nice too.

the disadvantage would be like you said to create too small partitions.
_________________
+ adopt an unanswered post today!
+ kimono network monitor
+ downshift.org
Back to top
View user's profile Send private message
GuidoJ
Guru
Guru


Joined: 24 Dec 2002
Posts: 444
Location: Netherlands

PostPosted: Fri Jan 09, 2004 10:19 pm    Post subject: Reply with quote

If you run out of disk space you simply add another disk, or at least that is the idea. The advantages are (as mentioned earlier) that you can have different file systems. Another advantage is that you can share certain partitions (like /home for instance) in a cluster environment. You can also have different backup strategies per partition, although that is also possible with directories.
Back to top
View user's profile Send private message
northern
Tux's lil' helper
Tux's lil' helper


Joined: 09 Nov 2003
Posts: 130
Location: Stoke on Trent, UK

PostPosted: Fri Jan 09, 2004 11:47 pm    Post subject: Reply with quote

Kirigoe wrote:
the only advantage i know of is that if one partition runs out of space it doesn't affect the others, consider a server with only one partition running out of diskspace, it's pretty much b0rked for the time being. if there is more than one user on the computer it might be a good idea to have /home seperate, and for logfiles filling up, a seperate /var is nice too.

the disadvantage would be like you said to create too small partitions.


Kirigoe makes a valid point. Also, if a filesystem gets corrupted it only affects the mountd filesystem not the whole system, usually making rescue possible.

Ive always had different partitions for / /boot /usr /var /home /tmp /opt on my home systems, but depending on how important your home sysytem is to you would dictate how to set it up, a /boot / /home system would do for a home machine to ease the headache of running out of space on one filesystem while having loads spare on another. I dont know how mature LVM is on Linux but that's an option too, cos you should be able to move filespace from one filesystem to another with LVM if all filesystems are in the same volume group.

On a production server I always put / /boot /var /tmp /home /opt etc on seperate filesystems, then as time goes on this gets added to with stuff like /opt/oracle etc also having their own filesystems. Basically having certain filesystems on their own partitions lessens the chance of losing the system, and it also means that you can unmount a partition and fix/amend it while the other partitions are available to users.

Each has its own merits, but if my livelihood depended on a server Id use seperate partitions.
If I just wanted an easy life Id have one big partition.

And if I wanted long hair I'd buy a wig, free world :lol:
Back to top
View user's profile Send private message
CharlieS
Tux's lil' helper
Tux's lil' helper


Joined: 06 Nov 2003
Posts: 146
Location: Texas, USA

PostPosted: Fri Jan 09, 2004 11:57 pm    Post subject: Reply with quote

Briefly..

Easier to change properties of filesystems. (type: ext3, ext3, reiserfs)
Safer for bad shutdowns...
Helps keep script kiddies from filling up entire Harddisk... for example /tmp


But in my personal opinion, If this is a home computer or not a server.. i would make /boot, / and /home seperate.. /boot for obvious reasons.. and /home because i encrypt home with AES..

I don't really have to worry about a hostile takeover.. You probably do not either..
Back to top
View user's profile Send private message
Erik_
n00b
n00b


Joined: 10 Jan 2004
Posts: 10
Location: Geneva, Switzerland

PostPosted: Sat Jan 10, 2004 1:16 am    Post subject: Reply with quote

Northern wrote :
Quote:
I dont know how mature LVM is on Linux but that's an option too, cos you should be able to move filespace from one filesystem to another with LVM if all filesystems are in the same volume group.


LVM is very stable, and once you get used to it, you won't install systems without it ;-) I've been using it for over a year with RH9 and more recently with RHEL3. Gentoo comes (livecd oct03) comes with LVM 1.07.

So mukwuknuk mentions:
Quote:
/ 2 gigs
/usr 8 gigs
/var 2 gigs
swap 1 gig
/opt 1.5 gigs
/home the rest


I would install as follow :
/boot as a direct primary partition in ext3 /dev/sda1
swap as a direct primary parition /dev/sda2
create a /dev/sda3 partition of LVM type and create all
the other partitions inside LVM / 2G, /usr 8G, /var 2G, /opt 1.5G, /home rest_minus_some_G

I leave some unallocated space, so if /opt (for example /dev/vg/opt ) is running out of space I would only need to :
umount /dev/vg/opt
lvextend -L2G /dev/vg/opt
e2fsck -f /dev/vg/opt
resize2fs /dev/vg/opt
mount /dev/vg/opt /opt
and you would have a 2G /opt partition.

Give it a try on a test system and see how easy it becomes to resize partitions.
Back to top
View user's profile Send private message
mukwuknuk
Tux's lil' helper
Tux's lil' helper


Joined: 23 Dec 2003
Posts: 80
Location: Colorado, USA

PostPosted: Sat Jan 10, 2004 5:29 pm    Post subject: Reply with quote

Thanks very much for the replies! All are very helpful, as usual here in these forums.

"A day when you haven't learned something new about Unix is a day when you haven't done any real computer work."


~
_________________
"If there are back-slashes in your path, you're heading down the wrong path ... backwards."
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