• VMware

    Learn about VMware virtualization for its products like vsphere ESX and ESXi, vCenter Server, VMware View, VMware P2V and many more

  • Linux

    Step by step configuration tutorials for many of the Linux services like DNS, DHCP, FTP, Samba4 etc including many tips and tricks in Red Hat Linux.

  • Database

    Learn installation and configuration of databases like Oracle, My SQL, Postgresql, etc including many other related tutorials in Linux.

  • Sample kickstart partition example (RAID, LVM, Multipath, Simple,..)

    Below are some of the storage template examples which can be used in kickstart for various type of installation option

    Simple Layout

    Using below we do not give any requirement for any partition in terms of size and partition type, instea we only define the filesystem type. With this we will only get a root and boot partition

    For setting an ext4 partition with a simple layout
    # Disk Partitioning
    autopart --type=plain --fstype=ext4


    RAID 1 + LVM

    For setting an ext4 partition with a software RAID 1 + LVM.

    Here my setup is having two disk (each with 838GB space) hence I am create Physical Volume accordingly, you can modify the value based on your disk size. You can also use "--size 1 --grow" if you do not wish to restrictively define a size for your physical volume and this will take the maximum available space in your disks.
    # The following is the partition information you requested
    ignoredisk --only-use=sda,sdb

    # -- raid part for boot --
    part raid.sda0 --size 512 --asprimary --ondrive=sda
    part raid.sdb0 --size 512 --asprimary --ondrive=sdb

    # -- raid part for pv.1 --
    part raid.sda2 --size 821616 --ondrive=sda
    part raid.sdb2 --size 821616 --ondrive=sdb

    # -- raid part for root --
    part raid.sda1 --size 12288 --ondrive=sda
    part raid.sdb1 --size 12288 --ondrive=sdb

    # -- raid part for swap --
    part raid.sda3 --size 12288 --ondrive=sda
    part raid.sdb3 --size 12288 --ondrive=sdb

    # Raid device creation
    raid /boot --fstype ext4 --device md0 --level=RAID1 raid.sda0 raid.sdb0
    raid pv.1 --device md2 --level=RAID1 raid.sda2 raid.sdb2
    raid / --fstype ext4 --device md1 --level=RAID1 raid.sda1 raid.sdb1
    raid swap --fstype swap --device md3 --level=RAID1 raid.sda3 raid.sdb3

    # Volume group and logical volume creation
    volgroup vg00 --pesize=65536 pv.1
    logvol /var --fstype ext4 --vgname vg00 --size=16384 --name=var
    logvol /tmp --fstype ext4 --vgname vg00 --size=24576 --name=tmp
    logvol /home --fstype ext4 --vgname vg00 --size=8192 --name=home
    logvol /opt --fstype ext4 --vgname vg00 --size=16384 --name=opt
    logvol /usr --fstype ext4 --vgname vg00 --size=32768 --name=usr
    logvol /var/log --fstype ext4 --vgname vg00 --size=1 --grow --name=log


    Normal LVM Layout

    For setting an ext4 partition with only LVM.

    Here my setup has a single disk (sda) and my physical volume is configured to use all the available space on the disk to create and configure the partition layout
    part /boot --size 512 --asprimary --fstype=ext4 --ondrive=sda
    part pv.1 --size 1 --grow --fstype=ext4 --ondrive=sda

    volgroup system --pesize=32768 pv.1

    logvol / --fstype ext4 --vgname system --size=8192 --name=root
    logvol /var --fstype ext4 --vgname system --size=16384 --name=var
    logvol /tmp --fstype ext4 --vgname system --size=40960 --name=tmp
    logvol swap --vgname system --size=4096 --name=swap
    logvol /opt --fstype ext4 --vgname system --size=8192 --name=opt
    logvol /opt/deep --fstype ext4 --vgname system --size=6144 --name=deep
    logvol /opt/deep/log --fstype ext4 --vgname system --size=20480 --name=deeplog
    logvol /var/opt/data--fstype ext4 --vgname system --size=1 --grow --name=mybackup


    Multipath Layout

    This one is tricky as you must know the list of mpath device available so that you can define them to be used for installation. In the below example I only had single LUN hence I have only used single mpath device

    # The following is the partition information you requested
    ignoredisk --only-use=mpatha

    # Disk Partioning
    clearpart --all --initlabel --drives=mpatha

    # Disk partitioning information
    part pv.1073 --fstype="lvmpv" --size 1 --grow --ondisk=mpatha
    part swap --fstype="swap" --ondisk=mpatha --size=4096
    part /boot --fstype="ext4" --ondisk=mpatha --size=512

    volgroup system --pesize=32768 pv.1073

    logvol /var --fstype ext4 --vgname system --size=8192 --name=var
    logvol /tmp --fstype ext4 --vgname system --size=20480 --name=tmp
    logvol /opt/mgtservices  --fstype="ext4" --size=5120 --name=opt-mgtservices --vgname=system
    logvol /opt  --fstype="ext4" --size=1 --grow --name=opt --vgname=system
    logvol /home  --fstype="ext4" --size=4096 --name=home --vgname=system
    logvol /export  --fstype="ext4" --size=30720 --name=export --vgname=system
    logvol /var/opt  --fstype="ext4" --size=25600 --name=var-opt --vgname=system
    logvol / --fstype="ext4" --vgname=system --size=8192 --name=root

    Deepak Prasad

    Deepak Prasad is a techie and an author who is still trying to survive in this IT generation with very little knowledge he has on Linux/Unix, VMware, SAN Storage, Automation, networking etc

    You can follow him on Facebook or Google+

    Do you also have something to share here?

    Become an author and be a part of our GoLinuxHub Team, Click here for more information
    Sample kickstart partition example (RAID, LVM, Multipath, Simple,..) Sample kickstart partition example (RAID, LVM, Multipath, Simple,..) Reviewed by Deepak Prasad on Saturday, April 07, 2018 Rating: 5

    No comments:

    Powered by Blogger.