Softpanorama
(slightly skeptical) Open Source Software Educational Society

May the source be with you, but remember the KISS principle ;-)

Softpanorama Search

Partition the Harddrives

Notes: 

  1. Create primary boot partition (200-300M). Type should be ext3.
  2. Create primary swap partition. Recommended size of the swap is the size of the RAM if RAM is 4G or less and half of the size of the RAM after that (actually depends on applications you will be running, but in general too much swapping is bad).  See Linux swap
  3. It is desirable to install LVM for all other partitions as this makes installation more flexible.
  4. /usr (4-6G) and /opt (4G ) can be merged with root partitio
  5. Some examples of partitioning

Example 1: mirrored pair of 36 drives (no LVM)

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda5              4128320    338524   3580032   9% /
/dev/sda2               298471     16210    266850   6% /boot
/dev/sda10             5207780    737020   4206212  15% /home
/dev/sda8              4128320    735412   3183144  19% /opt
/dev/sda9              4128320    240456   3678100   7% /tmp
/dev/sda6              4128320   1851872   2066684  48% /usr
/dev/sda7              8256696    342928   7494288   5% /var
Example 2:  mirrored pair of 73G drives (with LVM)
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/vg01-root
                       4128448    304384   3614352   8% /
/dev/sda2               297485     16507    265618   6% /boot
/dev/mapper/vg01-home
                       1032088     77000    902660   8% /home
/dev/mapper/vg01-opt   2064208    633432   1325920  33% /opt
/dev/mapper/vg01-tmp   4128448    136468   3782268   4% /tmp
/dev/mapper/vg01-usr   4128448   1404892   2513844  36% /usr
/dev/mapper/vg01-var  10321208    917848   8879072  10% /var
/dev/mapper/vg02-backup
                      17546044   6162448  10492308  38% /backup
	

Partitioning of hard drives using LVM

We will assume the first part of drive is visible as sda.

First you need to switch to the advanced mode in YAST2 Partitioner. You will see that one partition is already created.

If there are extra partitions on the boot drive you need to delete them.

  1. Create primary partition for /boot by entering +200M. Set the type of partition to Ext3 and check "format"

    sda2     /boot                200MB            4-29            (format ext3)

  2. Create another primary partition for  swap by using swap partition code from the menu For example for 64G of RAM enter +32G, but for 8G RAM or less you probably can afford 8G swap. 

    sda3     swap                32GB               30-4207
     
  3. Create extended partition for the rest of the drive

    sda4            Extended         (rest of disk)
     

  4. Create LVM partition out of extended (select Linux LVM partition type and default size)

    sda5     LVM                103GB
     

  5. Switch LVM view by clicking on LVM button and create volume group  vg01 (or vg00 if you wish) by clicking on Add group button at the top right part of the screen
     
  6. Enroll extended partition into this volume by clicking "Add volume" while extended partition is highlighted
     
  7. Within LVM create additional partitions. Use name of partitions for labels ( root for / partition). For example:

    vg00                                   103GB

    vg00    lv01            /                4GB

    vg00    lv02            /usr             8GB

    vg00    lv03            /var            12GB

    vg00    lv04            /opt             4GB

    vg00    lv05            /tmp             8GB

    vg00    lv06            /home            8GB

  8. Recheck that all partitions you created are Ext3 based.
     
  9. If you have the second pair of drives you can create logical volume vg02 for the second pair of drives  and repeat the same procedure for creating the necessary partitions on the second volume group

Notes:



Copyright © 1996-2009 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. Submit comments This document is an industrial compilation designed and created exclusively for educational use and is placed under the copyright of the Open Content License(OPL). Site uses AdSense so you need to be aware of Google privacy policy. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

Disclaimer:

Last modified: August 21, 2009