Managing Partitions in RHEL 6.x – CentOS 6.x

Updated on November 12, 2017
1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5.00 out of 5)
Loading...

Managing Partitions in RHEL 6.x – CentOS 6.x The fdisk command is a text-based utility for viewing and managing hard disk partitions on Linux. It’s one of the most powerful tools you can use to manage partitions, but it’s confusing to new users. Using fdisk you can create a new partition, delete an existing partition, or change existing partition.

Using fidsk you are allowed to create a maximum of four primary partition, and any number of logical partitions, based on the size of the disk.

This video tutorial will go through the basics of using fdisk to manage a partition table. After using fdisk, we will have see how to use a mkfs command to format new partitions with a file system.

Related Article  Install Fedora 19 KDE Desktop Edition in VMware Workstation 9

Tasks:
1. Identify current storage configuration
fdisk -l

2. Provision 1 or more usable partitions
parted – manipulates partition table of disk
print
print all
select /dev/sdb
mklabel msdos – if it is entirely new disk
mkpart primary 1 10GB – it creates 10GB primary partition
quit

3. Format the partition
mkfs.ext4 /dev/sdb1

4. Create folder
mkdir /disk1

5. Mount partition
mount /dev/sdb1 /disk1

6. Show UUID pf storage device and reference in /etc/fstab
blkid

7. modify /etc/fstab
Add (Recommended way)
UUID=”6008e642-7d2d-4d0a-ac69-3b156aedf9cf” /Disk2 ext4 defaults 1 2
or
/dev/sdb1 /disk1 ext4 defaults 1 2

8. List mounted partitions
df -h

9. Unmount /disk1 partition
umount /disk1

Related Article  Install and Configure VSFTPD FTP Server - RHEL 6 - CentOS 6

10. List mounted partitions again
df -h

11. Mount all in fstab
mount -a

12. List mounted partitions
df -h