Resizing the Static Partition in RHEL 8.

Resizing the Static Partition in RHEL 8.


No alt text provided for this image


No alt text provided for this image

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

No alt text provided for this image

Step 1 : Creating a Partition of the attached Hard disk using command

#fdisk /dev/sdb1
No alt text provided for this image

*5GB of the partition is created

No alt text provided for this image

step 2 : Formatting the Partition

By using following command create a inode table by formatting the partition

#mkfs.ext4 /dev/sdb1
No alt text provided for this image

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

No alt text provided for this image

Step 4 : Creating a File in the Folder

enter any data into the file

No alt text provided for this image

Step 5 : umounting a Folder from the Partition

No alt text provided for this image

Step 6 : Deleting the partition

No alt text provided for this image
No alt text provided for this image

Step 7 : Creating the New partition

create a partition with size 10GB and iam not removing the ext4 signature.

No alt text provided for this image
No alt text provided for this image

 *Format the extended partition with resize2fs command

* Run e2fsck command to check errors and format the extended partition

No alt text provided for this image

Step 8 : Again Mounting a Folder to the Partition

mount the folder and Now you can see that the data is safe.

No alt text provided for this image

thank you : )

要查看或添加评论,请登录

GUNI SUDHA RANI的更多文章

社区洞察

其他会员也浏览了