Linux Lecture2

Embed Size (px)

Citation preview

  • 7/31/2019 Linux Lecture2

    1/31

    PARTIONS IN LINUX

    S.AZAD

    RHCE TRAINER

    MAZENET SOLUTIONS

  • 7/31/2019 Linux Lecture2

    2/31

    What is a Partition?

    Partitioning is a means to divide a single hard driveinto many logical drives.

    A partition is a contiguous set of blocks on a drivethat are treated as an independent disk.

    A partition table is an index that relates sections ofthe hard drive to partitions.

  • 7/31/2019 Linux Lecture2

    3/31

    Why have multiple partitions?

    Reduce the risk of system failure in case a partitionbecomes full. Runaway processes or maniacal userscan consume so much disk space that the operatingsystem no longer has room on the hard drive for its

    bookkeeping operations. This will lead to disaster. Bysegregating space, you ensure that things other thanthe operating system die when allocated disk space isexhausted.

    Encapsulate your data. Since file system corruption islocal to a partition, you stand to lose only some ofyour data if an accident occurs.

  • 7/31/2019 Linux Lecture2

    4/31

    Partition Fields

    Device: This field displays the partition's device name.

    Start: This field shows the sector on your hard drivewhere the partition begins.

    End: This field shows the sector on your hard drive wherethe partition ends.

    Size: This field shows the partition's size (in MB).

    Type: This field shows the partition's type (for example,ext2, ext3, or vfat).

    Mount Point: A mount point is the location within thedirectory hierarchy at which a volume exists; the volume is

    "mounted" at this location. This field indicates where thepartition will be mounted.

  • 7/31/2019 Linux Lecture2

    5/31

    Filesystem TypesLinux Installation

    ext2 An ext2 filesystem supports standard Unix filetypes (regular files, directories, symbolic links, etc). Itprovides the ability to assign long file names, up to 255characters. Versions prior to Red Hat Linux 7.2 used ext2filesystems by default.

    ext3

    The ext3 filesystem is based on the ext2filesystem and has one main advantage journaling.Using a journaling filesystem reduces time spentrecovering a filesystem after a crash as there is no need tofsck the filesystem.

    swap

    Swap partitions are used to support virtualmemory. In other words, data is written to a swap partitionwhen there is not enough RAM to store the data yoursystem is processing.vfat The VFAT filesystem is a Linux filesystem that iscompatible with Windows 95/NT long filenames on theFAT filesystem.

  • 7/31/2019 Linux Lecture2

    6/31

    Recommended Partitioning

    SchemeUnless you have a reason for doing otherwise, it isrecommended that you create the following partitions:

    /boot partition contains kernel images and grubconfiguration and commands

    / partition/var partition

    /home partition

    Any other partition based on application (e.g /usr/local

    for squid)swap partition swap partitions are used to supportvirtual memory. In other words, data is written to aswap partition when there is not enough RAM to storethe data your system is processing. The size of your

    swap partition should be equal to twice yourcomputer's RAM.

  • 7/31/2019 Linux Lecture2

    7/31

    Disk Partition

    IDE Disk Partitions/dev/hda (Primary Master Disk)

    /dev/hda1 (First Primary Partition)

    /dev/hda2 (Second Primary Partition)/dev/hdb (Primary Slave Partition)/dev/hdb1

    /dev/hdc (Secondary Master/Slave Partition)/dev/hdc1

    SCSI Disk Partitions/dev/sda1, /dev/sda2/dev/sdb1, /dev/sdb2/dev/sdc1, /dev/sdc2

  • 7/31/2019 Linux Lecture2

    8/31

    Software RAID and LVMLinux Installation

    Software RAID (Redundant Array of Inexpensive Disk)

    RAID 0 (Striping)

    RAID 1 (Mirroring)

    RAID 5 (Striping with Parity)

    LVM (Logical Volume Manager)

  • 7/31/2019 Linux Lecture2

    9/31

  • 7/31/2019 Linux Lecture2

    10/31

  • 7/31/2019 Linux Lecture2

    11/31

  • 7/31/2019 Linux Lecture2

    12/31

  • 7/31/2019 Linux Lecture2

    13/31

  • 7/31/2019 Linux Lecture2

    14/31

  • 7/31/2019 Linux Lecture2

    15/31

    THANK YOU

    GOOD DAY

  • 7/31/2019 Linux Lecture2

    16/31

  • 7/31/2019 Linux Lecture2

    17/31

  • 7/31/2019 Linux Lecture2

    18/31

  • 7/31/2019 Linux Lecture2

    19/31

  • 7/31/2019 Linux Lecture2

    20/31

  • 7/31/2019 Linux Lecture2

    21/31

  • 7/31/2019 Linux Lecture2

    22/31

  • 7/31/2019 Linux Lecture2

    23/31

  • 7/31/2019 Linux Lecture2

    24/31

  • 7/31/2019 Linux Lecture2

    25/31

  • 7/31/2019 Linux Lecture2

    26/31

  • 7/31/2019 Linux Lecture2

    27/31

  • 7/31/2019 Linux Lecture2

    28/31

  • 7/31/2019 Linux Lecture2

    29/31

  • 7/31/2019 Linux Lecture2

    30/31

  • 7/31/2019 Linux Lecture2

    31/31