R: Partitioning (ex: Installing Fedora on RH9 (newbie))

Rick Stevens rstevens at vitalstream.com
Wed Mar 3 21:29:12 UTC 2004


Ninux wrote:
>>I don't buy that.  The part of the disk that contains Linux may be 4G,
>>but the individual partitions (those listed by "mount" or "df -h")
>>are undoubtedly smaller.  "fdisk" would report them too.  Remember
>>that partitions 1-4 under fdisk are primary partitions (with one of
>>them possibly an extended partition), partitions 5-n are INSIDE the
>>extended partition.
> 
> 
> Sorry, Rick, I don't understand :<
> 
> "fdisk" reports:
> /dev/hbd1   1  517 4152771  b Win95 FAT32
> /dev/hdb2 518  683  530145 82 Linux swap
> /dev/hdb3 584 1027 3566430 83 Linux

Fine, three partitions on the disk, all primary and no extended.

> "df -h" reports:
> /dev/hdb3   3,4G 2,2G 1,1G 69% /
> none        125M    0 125M  0% /dev/shm
> /dev/hdb1   4,0G 2,1G 2,0G 52% /mnt/windows

Shows you have root mounted (which is 69% full, by the way), swap is
full (normal) and you have your Windows partition mounted.

> "mounts" reports:
> /dev/hdb3 on / type ext3 (rw)

Ewwww!  Linux on one filesystem!  Bad planning.

> none on /proc type proc (rw)
> none on /dev/pts type devpts (rw,quid=5,mode=620)
> usbdevfs on /proc/bus/usb type usbdevfs (rw)
> none on /dev/shm type tmpfs (rw)
> /dev/hdb1 on /mnt/windows type vfat (rw,noexec,nosuid,nodev,umask=000)

The rest look normal.

> What's wrong? How can I fix that?

You installed all of Linux into a single file system.  As the system
installs (especially during an upgrade), the system creates a temporary
directory in /var to hold the RPMs that make up a "group" (such as the
"C development" group) and copies the necessary RPMs to that directory
(this "cache" speeds up the installation as CDs are slower than hard
drives).  Since you have everything in one partition (ordinarily, you
create /var as a separate partition), the system sucks up as much disk
space as needed to hold your package selections and, as a consequence,
there's no space to upgrade / or /usr (since they're all on the same
filesystem).

This will only occur on an upgrade, as the packages must be decompressed
and files swapped out as they're replaced.  The solution is not easy
with an installed system.  You have to repartition the disk.  The
partitioning method I use is:

1.  Partition the disk so you have a small primary partition to hold the
/boot filesystem (about 64-128MB is generally more than enough).

2.  Partition off an extended partition to hold the rest of the system.

3.  Partition off the extended partition into sub-partitions.  With 4GB
available, I'd set them up as follows:

	/ (root filesystem):	128-256MB (depending on how many kernels
				you'll have installed)
	swap			1 to 2 times your RAM size
	/var:			512MB-1GB
	/usr:			Rest of extended partition

This would limit the upgrade to suck up whatever's left of /var for its
cache and not affect the / or /usr filesystems, leaving them space for
upgrades (there's not a ton of stuff that gets installed in /var during
an upgrade other than the cache).

That's the way I'd set it up.  Do as you will.
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
- grasshopotomaus: A creature that can leap to tremendous heights... -
-                                                ...once.            -
----------------------------------------------------------------------





More information about the Redhat-install-list mailing list