Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Partitioning worth it anymore?
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
zeek
Guru
Guru


Joined: 16 Nov 2002
Posts: 480
Location: Bantayan Island

PostPosted: Sun Jan 28, 2007 7:44 am    Post subject: Partitioning worth it anymore? Reply with quote

I'm about to setup some new machines and I was thinking about trying to set them up without even partitioning the harddrives. I want to install directly on /dev/sda. Has anyone tried this?

I don't bother with swap partitions anymore. I've got 16GB RAM ... what am I going to do? Create a 32GB swap partition??! Anyway, if I really need it, swapfiles in 2.6 bypass the filesystem and read/write directly on the disk so I can create a swapfile that performs as well as a partition.

I really don't see the advantages of a separate /boot partition. Apparently it'll keep the kernel safe if the main partition corrupts? What good is that? The main partition is needed for the userland utilities, so whats the point? Having a LiveCD closeby seems to be a better safeguard.

So no swap partition, and no /boot partition, so why bother partitioning the drive at all? I don't see why this isn't possible, anyone here run with a partition table?
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5934

PostPosted: Sun Jan 28, 2007 8:02 am    Post subject: Reply with quote

here is my preferred setup:

/boot
/
/usr
/usr/portage
/usr/portage/distfiles (i use a nfs-mount)
/var
/var/log
/opt (for desktops)
/home (optional, i use a nfs-mount)

if the drive is too small to partition these up, i just do a plain old /boot root swap.

cheers
_________________
Neddyseagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.

banned from #gentoo since sept 2017
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Sun Jan 28, 2007 8:14 am    Post subject: Reply with quote

A filesystem needs to be formatted in a partition, AFAIK. However, there's nothing wrong with having just one partition in a drive - or, more likely, one partition plus a little bit of space left over.
Back to top
View user's profile Send private message
madisonicus
Veteran
Veteran


Joined: 20 Sep 2006
Posts: 1130

PostPosted: Sun Jan 28, 2007 8:25 am    Post subject: Reply with quote

But, without partitioning, how can you test new distros?!?!?! A distro a day keeps Bill Gates away, I always say. :wink:

Seriously though, there's no reason why you need more than one partition. My Gentoo desktop has multiple partitions but has Fedora, FreeBSD, and a hardened Gentoo playground installed in single partitions that all share the same swap partition. My laptop has a Windows partition, a swap partition, and then Gentoo.

Having partition sizes can help prevent things like /tmp or home directories from getting to large. I've also seen people use specific filesystems based on their partition requirements: reiserfs for portage, xfs for media, etc.... It's all a matter of taste/needs.

-m
_________________
Please add [SOLVED] to your message title if you feel that your question has been answered.
------
Intel Q9300 Core2 Quad * Gigabyte GA-EP35C-DS3R
Samsung x360
AMD64 x2 4200+ * TF7050-M2 * HTPC
ZOTAC ION A-U Mini-ITX * HTPC
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Sun Jan 28, 2007 8:42 am    Post subject: Reply with quote

Moved from Kernel & Hardware to Installing Gentoo.
Back to top
View user's profile Send private message
broken_chaos
Guru
Guru


Joined: 18 Jan 2006
Posts: 370
Location: Ontario, Canada

PostPosted: Sun Jan 28, 2007 8:43 am    Post subject: Reply with quote

The reasons to partition are to keep something separate from the rest of the system. Shared data, things you don't want getting wiped out if you need to reinstall (yes, you can back up, but just a separate partition is simpler), /boot (some systems, mainly older ones, do have limitations on boot partition sizes), and things you need a specific filesystem for.

My laptop setup is like this:
/boot - ext2 - 64M - separated to keep kernels, etc separate, on a rock-solid ext2 partition, NOT MOUNTED during normal operation (noauto)
/ - XFS - 33G - main partition, and it's XFS because I just like the filesystem, very solid for me
/usr/portage - ext2 - 322M - portage directory, separated and using ext2 due to speed/size concerns, huge number of inodes for many, many small files
/var/cache/edb - ext2 - 71M - portage db cache directory, same concerns as /usr/portage, particularly when using XFS for main partition (bad with that many small files - 10000s)
/home - XFS - 65G - home directory, separated so it doesn't have to be backed up when formating, just in case

One other, small, bonus to keeping things partitioned is to (on the physical disk) keep files (and pieces of files) as close as possible, meaning (slightly) less seek times, in theory.

One aside, on filesystems... Might be something else I did, but since around the time I switched to XFS, I've noticed a slight increase in my laptop's battery life - about 10-15 minutes. Another reason to partition - different filesystems used for different things certainly does yield different results in speed and CPU usage. Even different mkfs/mount options does this for the same type of filesystem.
Back to top
View user's profile Send private message
markkuk
Guru
Guru


Joined: 29 Nov 2002
Posts: 446

PostPosted: Sun Jan 28, 2007 10:39 am    Post subject: Reply with quote

You can't install a boot loader on an unpartitioned drive. The first part (stage1) of all loaders is stored in the MBR which also contains the partition table. The BIOS won't even try booting from a drive without a correct MBR/partition table.
Back to top
View user's profile Send private message
EzInKy
Veteran
Veteran


Joined: 11 Oct 2002
Posts: 1742
Location: Kentucky

PostPosted: Sun Jan 28, 2007 2:03 pm    Post subject: Reply with quote

Even if you experiment with other partitioning schemes the one thing you should never forgo is /home.
_________________
Time is what keeps everything from happening all at once.
Back to top
View user's profile Send private message
zeek
Guru
Guru


Joined: 16 Nov 2002
Posts: 480
Location: Bantayan Island

PostPosted: Mon Jan 29, 2007 8:58 am    Post subject: Reply with quote

Quote:
A filesystem needs to be formatted in a partition ...


Nope you can put a filesystem directly on the block device. I already do this with SANs because it makes increasing the partition a lot easier. No need to bother with LVM, just add another drive and run xfs_growfs. Check out sdb below:

Code:
donkey ~ # df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3              38G   23G   16G  60% /
udev                  3.9G   44K  3.9G   1% /dev
none                  3.9G     0  3.9G   0% /dev/shm
/dev/sdb              1.4T  1.1T  331G  76% /san/sdb


Regarding the posters with their favorite partitioning schemes, that is exactly what I want to get away from. 322MB for /usr/portage? What happens when portage grows to 323MB? I know it isn't the end of the world, but you need to shuffle things around ... its just pointless.

Never forgo /home eh?
Code:
donkey ~ # l /home
total 0
-rw-r--r-- 1 root        root          0 Sep  9  2005 .keep

Perhaps someone can expand on the benefits of putting a 0 byte .keep file on its own partition? :P (just kidding)

Markkuks post is sobering ... however you can have a valid but empty partition table and put the FS on the block device if you run something other than XFS. All linux FS other than XFS skip the first few blocks on the disk to avoid the partition table just in case they're directly on the block device. XFS doesn't do this because the on disk layout is unchanged from the days of SGI IRIX. (which means you can take a drive from an old SGI IRIX server and mount it with a modern linux, sweet)

I'm going to give it a shot anyway! I'll report back in a couple of days.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Mon Jan 29, 2007 12:35 pm    Post subject: Reply with quote

If GRUB can't do the job without partition table - try some other bootloader. What about GAG? I'm sure there is more. As a side note I remember my first distro did not have a bootloader, kernel was booted directly by BIOS.
Back to top
View user's profile Send private message
MxxCon
n00b
n00b


Joined: 01 Apr 2005
Posts: 31

PostPosted: Mon Jan 29, 2007 3:25 pm    Post subject: Reply with quote

there are a few partitions i would create no matter what
/boot (~100MB) i still make it EXT2 for safety/compatibility. more tools can deal with EXT2 than other FS. who knows what might happen...buggy grub or something else will try to write to MBR and will somehow nuke nearest partition..i'd rather be it /boot than the whole 300gig hd.

/usr/portage (~3GB, but depend on use)from personal experience, i believe for continual health of your system it's best to keep the most fragment-prone part of gentoo on a separate partition...this way your 'emerge --sync' won't take 20min at a time.

/var/logs you mention your system has 16GB of mem, so i guess it's a server...you wouldn't want your whole system to crap out if some process started blowing up log files at the rate of 3GB/min 8O keeping it separate will limit such damage. and obviously data partition crash should not affect your logs partition.
Back to top
View user's profile Send private message
broken_chaos
Guru
Guru


Joined: 18 Jan 2006
Posts: 370
Location: Ontario, Canada

PostPosted: Tue Jan 30, 2007 12:46 am    Post subject: Reply with quote

zeek wrote:
Regarding the posters with their favorite partitioning schemes, that is exactly what I want to get away from. 322MB for /usr/portage? What happens when portage grows to 323MB? I know it isn't the end of the world, but you need to shuffle things around ... its just pointless.

/usr/portage is currently 251M on my ext2 partition. Odds of it gaining 71M+ of files is slim. That's adding another quarter of the size of the tree onto it. I doubt that will happen for a long, long time. If ever.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Tue Jan 30, 2007 1:34 am    Post subject: Reply with quote

Code:
$ du -h -s /usr/portage/distfiles/
18G

Thankfully, it's not on its own partition :)
I must be playing too many games 8O
Back to top
View user's profile Send private message
zeek
Guru
Guru


Joined: 16 Nov 2002
Posts: 480
Location: Bantayan Island

PostPosted: Tue Jan 30, 2007 5:37 am    Post subject: Reply with quote

MxxCon wrote:
there are a few partitions i would create no matter what
/boot (~100MB) i still make it EXT2 for safety/compatibility. more tools can deal with EXT2 than other FS. who knows what might happen...buggy grub or something else will try to write to MBR and will somehow nuke nearest partition..i'd rather be it /boot than the whole 300gig hd.

The only bootloader I've every heard of screwing up partitions is lilo. I haven't heard of anyone screwing up their partition via bootloader since 95. I don't think this is relevant.

What is your point about EXT2 compatibility? I'm not using EXT2 on my main partitions. This doesn't make any sense?

MxxCon wrote:

/usr/portage (~3GB, but depend on use)from personal experience, i believe for continual health of your system it's best to keep the most fragment-prone part of gentoo on a separate partition...this way your 'emerge --sync' won't take 20min at a time.

As already shown in this thread, 3GB can be small. But it can also be big in the case of the guy who only has 251MB there. I guess he doesn't do binary packages (I do).

MxxCon wrote:

/var/logs you mention your system has 16GB of mem, so i guess it's a server...you wouldn't want your whole system to crap out if some process started blowing up log files at the rate of 3GB/min 8O keeping it separate will limit such damage. and obviously data partition crash should not affect your logs partition.


I've seen the exact opposite. Data lost, daemons crashed, etc because /var (or some other partition) filled up when there was gigs free elsewhere.

All in all, this is what I want to get away from.
Back to top
View user's profile Send private message
MxxCon
n00b
n00b


Joined: 01 Apr 2005
Posts: 31

PostPosted: Tue Jan 30, 2007 1:27 pm    Post subject: Reply with quote

zeek wrote:
What is your point about EXT2 compatibility? I'm not using EXT2 on my main partitions. This doesn't make any sense?
i'm not talking about your main partition. i'm talking about /boot/ partition. who knows what will happen and you have to hookup that drive to some other system that is not running linux...there are better filesystem drivers on other OS for ext2 than for reiserfs or xfs or zfs or almost any other fs short of FAT.
zeek wrote:
I've seen the exact opposite. Data lost, daemons crashed, etc because /var (or some other partition) filled up when there was gigs free elsewhere.
please share what software does that if /var/log is full/unwritable
Back to top
View user's profile Send private message
batistuta
Veteran
Veteran


Joined: 29 Jul 2005
Posts: 1384
Location: Aachen

PostPosted: Tue Jan 30, 2007 1:48 pm    Post subject: Reply with quote

I can see the following advantages with partitioning

- Different filesystems are optimized for different things. So I like to use different filesystems for different tasks
- Permission scheme: you might want to use ACL on /home partition, while standard Linux access control on the rest
- Mount options: add quota on certain partitions, noexex for security, etc
- Trying out a different OS (Windows for games, linux distro, etc)
- Fragmetnation (keep /usr/portage separated)
- Backup: if something goes wrong you can wipe everything but keep /home intact
- Security: keep /boot separate
- Hiding: don't mount things you don't need (I only mount /backup before doing backup)

I don't think that HD partition is particularly useful. But I would recommend running LVM. In my setup I have /root and /boot in a separate partition, the rest in LVM.
Back to top
View user's profile Send private message
n19i
n00b
n00b


Joined: 11 Dec 2006
Posts: 53

PostPosted: Tue Jan 30, 2007 5:45 pm    Post subject: Reply with quote

I agree with batistuta. However, i have some questions:
- Using diferent filesystems wouldn't slow down things when it comes to copying files over to another partition? Like copying something from / which is, for example, ext3 to /home which is reiser?
- Also, I agree that LVM is great when it comes to organizing and managing, but what about the performance? Is there any performance hit?
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Tue Jan 30, 2007 5:54 pm    Post subject: Re: Partitioning worth it anymore? Reply with quote

zeek wrote:
So no swap partition, and no /boot partition, so why bother partitioning the drive at all? I don't see why this isn't possible, anyone here run with a partition table?

I have several of my machines setup like this (without a partition table), and it works just fine.

BTW, it is known as a superfloppy format when you don't have a partition table.
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Tue Jan 30, 2007 7:04 pm    Post subject: Re: Partitioning worth it anymore? Reply with quote

zeek wrote:

So no swap partition, and no /boot partition, so why bother partitioning the drive at all? I don't see why this isn't possible, anyone here run with a partition table?


There are tons of technical and logical reasons why partitioning is a saner aproach, but I would tell you only one, and it is about performance.

If you install and uninstall kernels trees (+25,000 files each tree), the portage tree (+140,000 files, that is scary, isn't it?) and the var and temp stuff, which can equally grow pretty large and is in a constant write/erase cycle, fragmentation of the hard drive will grow in no time to an insane extent. In binary distros where there are no portage either, the numbers are not that scary, since the only writes into / are those needed for periodical updates and a few others on /etc, but in gentoo is not a good idea to keep everything into a partition.

As I said, this is just one of the reasons, but people above said other different ones, so I just choose this to let you know about.

About swap... I don't know to what extent things have changed, but at least in the past, even with insane amounts of ram, the linux kernel liked to swap now and then (even if it is a few kb's), and performance was degradated if no swap was available. As I said, this is ancient knowledge, and since I really haven't taken the time to try these last few years, I don't really know if the things have changed as much as they are said. So, to be on the safe side I would keep 512mb of swap at the end of the disk, it does not harm in any case.
Back to top
View user's profile Send private message
jpmayer87
n00b
n00b


Joined: 19 Mar 2006
Posts: 51
Location: Troy, NY

PostPosted: Tue Jan 30, 2007 7:12 pm    Post subject: Reply with quote

zeek wrote:
Quote:
A filesystem needs to be formatted in a partition ...


Nope you can put a filesystem directly on the block device. I already do this with SANs because it makes increasing the partition a lot easier. No need to bother with LVM, just add another drive and run xfs_growfs. Check out sdb below:

Code:
donkey ~ # df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3              38G   23G   16G  60% /
udev                  3.9G   44K  3.9G   1% /dev
none                  3.9G     0  3.9G   0% /dev/shm
/dev/sdb              1.4T  1.1T  331G  76% /san/sdb


Regarding the posters with their favorite partitioning schemes, that is exactly what I want to get away from. 322MB for /usr/portage? What happens when portage grows to 323MB? I know it isn't the end of the world, but you need to shuffle things around ... its just pointless.

Never forgo /home eh?
Code:
donkey ~ # l /home
total 0
-rw-r--r-- 1 root        root          0 Sep  9  2005 .keep

Perhaps someone can expand on the benefits of putting a 0 byte .keep file on its own partition? :P (just kidding)

Markkuks post is sobering ... however you can have a valid but empty partition table and put the FS on the block device if you run something other than XFS. All linux FS other than XFS skip the first few blocks on the disk to avoid the partition table just in case they're directly on the block device. XFS doesn't do this because the on disk layout is unchanged from the days of SGI IRIX. (which means you can take a drive from an old SGI IRIX server and mount it with a modern linux, sweet)

I'm going to give it a shot anyway! I'll report back in a couple of days.


You should try putting portage inside a squashfs file. There are init scripts that allow you mount it at boot, and then mount a unionfs over it to make changes to the files. This allows --sync to work properly. My portage shrank to a ~40M file.

JP
Back to top
View user's profile Send private message
batistuta
Veteran
Veteran


Joined: 29 Jul 2005
Posts: 1384
Location: Aachen

PostPosted: Tue Jan 30, 2007 8:01 pm    Post subject: Reply with quote

n19i wrote:
- Using diferent filesystems wouldn't slow down things when it comes to copying files over to another partition? Like copying something from / which is, for example, ext3 to /home which is reiser?

I guess it will have some impact, but the question is how big. I mean instruction caching and many other things will play a role. But keep in mind that we are talking about HD access here. HD I/O is order of magnitudes slower than CPU instructions, so my reasoning is that an efficient filesystem for the particular type of file handling will pay-off for any extra CPU processing. This is a bit the idea behind reiser4: more CPU work, more efficient filesystem. Some people (you hear this a lot from FreeBSD people) claim that filesystem is not that important, and that it should just be robust. I guess like everything, it depends on what problem you are trying to solve. But at least we have a choice.

Quote:
- Also, I agree that LVM is great when it comes to organizing and managing, but what about the performance? Is there any performance hit?

I've looked for this in the past and couldn't find benchmarks or data to support this. But Suse claims this is minimal. I'm not so sure... :roll: But for me, as with encryption, the benefits of LVM are worth a small penalty.

EDIT: the above link does show some benchmark. The point is that those are just numbers. I would like to see a good analysis of this data by an independent reviewer.
Back to top
View user's profile Send private message
n19i
n00b
n00b


Joined: 11 Dec 2006
Posts: 53

PostPosted: Tue Jan 30, 2007 10:59 pm    Post subject: Reply with quote

Quote:

I've looked for this in the past and couldn't find benchmarks or data to support this. But Suse claims this is minimal. I'm not so sure... :roll: But for me, as with encryption, the benefits of LVM are worth a small penalty.


Well then I suppose that using LVM on top of a RAID0 would make it even. Well, maybe not in terms of security, since I guess your chances of having a corruption doubles.
Back to top
View user's profile Send private message
broken_chaos
Guru
Guru


Joined: 18 Jan 2006
Posts: 370
Location: Ontario, Canada

PostPosted: Wed Jan 31, 2007 5:22 am    Post subject: Reply with quote

zeek wrote:
As already shown in this thread, 3GB can be small. But it can also be big in the case of the guy who only has 251MB there. I guess he doesn't do binary packages (I do).

Oh, I keep just the portage tree on there - binary packages and distfiles are NOT on that partition, for the fragmentation/filesystem reasons others have mentioned - both of those are stored in /var (on / partition). Symlinks and make.conf variables are fun. ;)
Back to top
View user's profile Send private message
batistuta
Veteran
Veteran


Joined: 29 Jul 2005
Posts: 1384
Location: Aachen

PostPosted: Wed Jan 31, 2007 8:08 am    Post subject: Reply with quote

n19i wrote:
Well then I suppose that using LVM on top of a RAID0 would make it even. Well, maybe not in terms of security, since I guess your chances of having a corruption doubles.

You can do stripping directly with LVM, no need for RAID0. However, I like a more stacked approach and use RAID as a separate layer like you are suggesting. Would be nice to see if there is an performance difference. But as I've mentioned before, we are talking about I/O here. So I tend to think that optimizing on the disk access more than evens the computation work of RAID and LVM. Coarse thinking though, no numbers to support this.

And I don't wanna be picky, but RAID0 does not affect security at all, just the reliability :wink:
In any case, everyone should backup, because with RAID0 your chances of disk failure are almost double (but not twice as much because both hard drives could fail simultaneously), but even without RAID0 they are anyway high enough to make backup worth it.
Back to top
View user's profile Send private message
h0nke
n00b
n00b


Joined: 10 Jan 2006
Posts: 29
Location: /usa/ca/hills

PostPosted: Wed Jan 31, 2007 5:35 pm    Post subject: Reply with quote

madisonicus wrote:
A distro a day keeps Bill Gates away, I always say. :wink:


Amen.
_________________
--h0nke
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
Goto page 1, 2  Next
Page 1 of 2

 
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