Resizing the Static Partition in RHEL 8.
Task Description:
- Creating a Partition of the attached Hard disk
- Formatting the Partition
- Mounting a Folder to the Partition
- Creating a File in the Folder
- Unmounting a Folder from the Partition
- Deleting the partition
- Creating the New partition
- Again Mounting a Folder to the Partition
check whether harddisk is attached or not with command
#fdisk -l
we can see that 20GB harddisk is attached to the os
Step 1 : Creating a Partition of the attached Hard disk using command
#fdisk /dev/sdb1
*5GB of the partition is created
step 2 : Formatting the Partition
By using following command create a inode table by formatting the partition
#mkfs.ext4 /dev/sdb1
Step 3 : Mounting a Folder to the Partition
*create a folder and mount the partition to the folder
#mount /dev/sdb1 task
*check whether the folder is mounted or not using command : df -h
Step 4 : Creating a File in the Folder
enter any data into the file
Step 5 : umounting a Folder from the Partition
Step 6 : Deleting the partition
Step 7 : Creating the New partition
create a partition with size 10GB and iam not removing the ext4 signature.
*Format the extended partition with resize2fs command
* Run e2fsck command to check errors and format the extended partition
Step 8 : Again Mounting a Folder to the Partition
mount the folder and Now you can see that the data is safe.
thank you : )