[sclug] Newbie, partitioning 120Gb HDD - recommendations?

Alex Butcher lug at assursys.co.uk
Tue Jan 18 22:57:35 UTC 2005


On Tue, 18 Jan 2005, Tom Dawes-Gamble wrote:

> On Tue, 2005-01-18 at 15:51 +0000, Alex Butcher wrote:
>
>> *Modern* discs *don't* have the same number of physical sectors on outer
>> tracks as inner tracks,
>
> Yes I know and it's good to look at your numbers.  So if we know the
> boundaries of the zone we can partition the disk on those boundaries.
> and choose which partitions to use for which file systems.
>
> Do I put the root file system in the fast zone or do I put home on the
> fast zone?
>
> I think the general advice is that you want root to be fast. But is that
> the best strategy?

I'm not sure it is. My gut feeling is that once the system has booted, and
you have some daemons running, anything worthwhile from / will be cached or
resident anyway. Assuming you have enough memory (these days, not having
enough better be for a damn good reason :).

I'd prefer to put /usr, then /home or /usr/src in the fast zone, saving the
slower zones for things like /var/spool or general dumping areas (/scratch,
in my case). Putting /var/spool in the fast zone might be more appropriate
if the machine is hosting a non-home-Maildir IMAP/POP3 server, though.

> Lets say I want to edit a file.  Well I'm so slow at typing I guess the
> speed of the file system is academic.  But vim for example is about a
> 0.25Meg but the file I want to edit is say 1 Meg. (I know vim needs some
> shared libraries too.) I have to read in and write out 1 meg making a
> total of 2 meg of I/O so I get get the most benefit from having home in
> the fast zone.
>
> You really need to know which file system you are doing the majority of
> your I/O to before you can make any decision on where to put a file
> system.

Because I'm an LVM convert, I've pretty much lost all control over /where/ I
place filesystems these days. They're all over the disc, literally. :-/

# fdisk -l /dev/hde

Disk /dev/hde: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot      Start         End      Blocks   Id  System
/dev/hde1               1         499     4008186    c  W95 FAT32 (LBA)
/dev/hde2   *         500         761     2104515   83  Linux
/dev/hde3             762        1023     2104515   83  Linux
/dev/hde4            1024       24321   187141185    f  W95 Ext'd (LBA)
/dev/hde5            1024        3016    16008741    c  W95 FAT32 (LBA)
/dev/hde6            3017        5009    16008741   83  Linux
/dev/hde7            5010        8994    32009481   fd  Linux raid autodetect
/dev/hde8            8995        9238     1959898+  82  Linux swap
/dev/hde9            9239       24321   121154166   fd  Linux raid autodetect

To take this system, I have a Windows C: D: E: and F: for occasional games,
and slightly less occasional firmware upgrades (grrr!), I have / on
/dev/hde2, together with an equally-sized spare on /dev/hde3 and these
partitions are all under 1024 cylinders (if not for Linux, for anything more
primitive I might choose to try later). /dev/hde6 is paired with /dev/hdg6,
forming a RAID0 stripe set which is used as a LVM physical volume that hosts
logical volumes for losable stuff like /usr/src (i.e. my build directory -
not a general development area!). /dev/hde8 and /dev/hdg8 form a 4GB swap
stripe set - not that I hit swap much, these days. 4GB will probably be 2x
the maximum amount of memory this machine will ever have. Finally, /dev/hde9
forms a RAID1 mirror set with /dev/hdg9, which is used as a LVM physical
volume that hosts logical volumes for more crucial stuff (e.g. /home). Much
of this volume is presently unallocated, and I add space in ~10GB chunks
as-and-when they need it:

 	# umount /scratch
 	# tune2fs -o ^has_journal /dev/200GVolGroup01/scratch
 	# lvresize -L +10G /dev/200GVolGroup01/scratch
 	# resize2fs ...
 	# tune2fs -j /dev/200GVolGroup01/scratch
 	# mount /scratch

This used to be easier with LVM1 because it shipped with e2fsadm which
wrapped that all up in one command. Newer versions of LVM2 than I'm running
have fsadm which does the same thing, but supports more than ext2
filesystems.

Best Regards,
Alex.
-- 
Alex Butcher      Brainbench MVP for Internet Security: www.brainbench.com
Bristol, UK                      Need reliable and secure network systems?
PGP/GnuPG ID:0x271fd950                         <http://www.assursys.com/>


More information about the Sclug mailing list