How to perform a text based install (no GUI) on Centos 6

To perform a text based install of Centos, press Tab while Install or upgrade an existing system is selected, per the below:

Centos0

Then a line of text will appear at the bottom beginning with vmlinuz per the below:

Centos1

Go to the end of the line and enter the word text then hit Enter. You will then see the familiar screen:

Centos2

Proceed with your text based install to your heart’s content!

Reference:
How can I install Centos 6 without the gui?

LVM – Setup and configure Filesystems in RHEL 6/Centos 6 – Part 4

Welcome to Part 4 of this series of 4 articles detailing how to setup and configure multiple filesystems running on LVM partitions. Each article will cover a specific topic, per the below:

Part 1 – Setup and configure Physical Volumes
Part 2 – Setup and configure Volume Groups
Part 3 – Setup and configure Logical Volumes
Part 4 – Setup and configure Filesystems

In Part 4 we are going to we will:

  • Format the logical volumes with the ext4 filesystem.
  • Mount the logical volumes create in Part 3 as filesystems.
  • Add these filesystems into /etc/fstab to ensure they are mounted during the boot process.

To format the music logical volume with the ext4 filesystem run:

mkfs.ext4 /dev/data/music

The resulting output is:

[root@lnx-svr-01 ~]# mkfs.ext4 /dev/data/music
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
655360 inodes, 2621440 blocks
131072 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2684354560
80 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 32 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[root@lnx-svr-01 ~]#

Perform the same steps for the video and pictures logical volumes.

Now that the filesystems have been created, we need to mount them. First, We will create the folders upon which the filesystems will be mounted, their relationships to the corresponding folders (mount point) is:

music -------> /var/music
video -------> /var/video
pictures ----> /var/pictures

Run mkdir to create the folder above:

mkdir /var/music /var/video /var/pictures

Mount the newly created filesystems by running the mount command per the below:

mount /dev/data/music /var/music
mount /dev/data/video /var/video
mount /dev/data/pictures /var/pictures

Then run df -h to see the currently mounted filesystems:

[root@lnx-svr-01 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                       18G  903M   16G   6% /
tmpfs                 939M     0  939M   0% /dev/shm
/dev/sda1             477M   25M  427M   6% /boot
/dev/mapper/data-music
                      9.8G   23M  9.2G   1% /var/music
/dev/mapper/data-video
                      4.8G   10M  4.6G   1% /var/video
/dev/mapper/data-pictures
                      4.8G   10M  4.6G   1% /var/pictures
[root@lnx-svr-01 ~]#

We can see from the above that our filesystems are listed and mounted. However, we mounted the filesystems manually, we need them to mount automatically when the system boots up, so in order to enable this we need to add them to /etc/fstab.

So to proceed, run vi to edit /etc/fstab:

vi /etc/fstab

This is what is looks like at present:

# /etc/fstab
# Created by anaconda on Sat May 30 19:17:27 2015
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/VolGroup-lv_root /                       ext4    defaults        1 1
UUID=db505cff-1d69-4f12-b22a-9d4335dc2275 /boot                   ext4    defaults        1 2
/dev/mapper/VolGroup-lv_swap swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0

Add the following lines into the file:

/dev/data/music         /var/music              ext4    rw,noatime      0 0
/dev/data/video         /var/video              ext4    rw,noatime      0 0
/dev/data/pictures      /var/pictures           ext4    rw,noatime      0 0

So it looks like this:

# /etc/fstab
# Created by anaconda on Sat May 30 19:17:27 2015
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/VolGroup-lv_root /                       ext4    defaults        1 1
UUID=db505cff-1d69-4f12-b22a-9d4335dc2275 /boot                   ext4    defaults        1 2
/dev/mapper/VolGroup-lv_swap swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
/dev/data/music         /var/music              ext4    rw,noatime      0 0
/dev/data/video         /var/video              ext4    rw,noatime      0 0
/dev/data/pictures      /var/pictures           ext4    rw,noatime      0 0

Save and exit the file, then reboot the system by running the shutdown command per the below:

[root@lnx-svr-01 ~]# shutdown -r now

Broadcast message from root@lnx-svr-01.vsysad.local
        (/dev/pts/0) at 14:35 ...

The system is going down for reboot NOW!
[root@lnx-svr-01 ~]#

Once the server comes back up, login and run df -h to confirm that all of our filesystems are mounted:

[root@lnx-svr-01 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                       18G  903M   16G   6% /
tmpfs                 939M     0  939M   0% /dev/shm
/dev/sda1             477M   25M  427M   6% /boot
/dev/mapper/data-music
                      9.8G   23M  9.2G   1% /var/music
/dev/mapper/data-video
                      4.8G   10M  4.6G   1% /var/video
/dev/mapper/data-pictures
                      4.8G   10M  4.6G   1% /var/pictures
[root@lnx-svr-01 ~]#

There we have it, three filesystems running on LVM partitions which are ready for production use. I hope this was easy to follow and understand. Please also take time to read the references at the bottom, they are excellent resources and were bookmarked by myself for reference whenever I needed to check anything LVM related.

References:
How to Create LVM Partition in RHEL 6 / CentoOS
Linux Basics – LVM (Logical Volume Manager) Tutorial
How to Install LVM on Linux and Disk Operations
A Beginner’s Guide To LVM
How To Create LVM Using vgcreate, lvcreate, and lvextend lvm2 Commands