RHEL Partitioining Scheme (UNCLASSIFIED)

Rick Stevens ricks at nerd.com
Fri May 8 21:18:52 UTC 2009


Johnson, Kenyetta A Mrs CIV USA NETCOM/9TH SC A wrote:
> Classification:  UNCLASSIFIED 
> Caveats: NONE
> 
> Hi Linux Gurus,
> 
> I'm installing RHEL v5.2 on a virtual machine with 1GB RAM and 50GB
> storage.
> The image will be used to install a kickstart server to be used for
> building systems to support network operation COTS applications.  I
> would like some feedback regarding designing a RHEL partitioning scheme.
> I've identified the following partitions: /, /boot /home, /opt (netops
> apps), /usr /usr/local, /var, and /tmp.
> I receive the following message:
> 
> "Your selected packages require 1411 MB of free space for installation,
> but you do not have enough available.  You can change your selections or
> reboot."
> 
> The attempted filesystem layout is as follows:
> 
> LVM Volume Groups
> VolGroup00
>   LogVol02	/tmp	ext3	320
>   LogVol00	/	ext3	1472
>   LogVol01	/home	ext3	512
> 
> Hard Drives
> /dev/sda
>   /dev/sda1	/boot	   ext3		 101	1	 13
>   /dev/sda2		   swap		1027	14	144
>   /dev/sda3	/var	   ext3		 384	145	193		
>   /dev/sda4		   Extended  	2580	194	522
>   /dev/sda5	/usr	   ext3		250	194	225
>   /dev/sda6	VolGroup00 LVM PV	2329	226	522

There are two things many people forget with ext3 filesystems.  The
first is that, by default, 5% of the disk blocks are reserved for the
root user.  That immediately drops the usable space on / to 1398MB--
which is less than the 1411MB the install needs.  The second is that the 
ext3 journals take additional space, so that 1398MB will be reduced even
more.

I have to also say that this is a bit of an odd layout.  Is there a
reason you created normal partitions for /var and /usr and an LVM for /,
/tmp, and /home?  For a bootable system, you only need a normal
partition for /boot (as grub doesn't grok LVM yet).  You can use an LVM
for the rest of the lot (well, you may want to keep swap as a real 
partition as well).

Using LVM for everything except /boot and swap is generally a good idea.
Since disks are much faster now, creating a single logical volume and 
using a single, monolithic filesystem for everything isn't anywhere near
the performance penalty it used to be and you don't run into space
crunches as easily.

If you like separate "partitions", then using separate logical volumes
is fine as you can expand the various logical volumes you need onto
additional disks when the time comes.

I generally only use partitions or separate LVs if I need something like
quotas or such.  In such cases, I generally use this formula, tweaked as
appropriate for the storage I have available and possible use of the
system:

	100MB for /boot (you just have kernels and initrds there)
	2xRAM for swap
	4GB   for /var (make sure you enable log file compression)
	2GB   for / (possibly more)
	4GB   for /home (if there's a lot of users)
	rest  for /usr

As I said, tweak as needed.  Your mileage may vary.  Void where
prohibited.  Some assembly required.  Batteries not included.  Etc.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer                      ricks at nerd.com -
- AIM/Skype: therps2        ICQ: 22643734            Yahoo: origrps2 -
-                                                                    -
-     Have you noticed that "human readable" configuration file      -
-          directives are beginning to resemble COBOL code?          -
----------------------------------------------------------------------




More information about the Redhat-install-list mailing list