Increase or Decrease the Size of Static Partition in Linux.

Increase or Decrease the Size of Static Partition in Linux.

1.Create a Static Partition:-

fdisk  -l
No alt text provided for this image
sidk /dev/ sdb

No alt text provided for this image

2. Format Partition

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

3.create a static Dire... And Mount partition

mkdir /ststic
mount /dev/sdb1 /static
No alt text provided for this image

4.Create a file in static folder

cd  /static
vim arth.txt
No alt text provided for this image

5.Increase the Size Of static partition than we need to unmount partition and delete partition

No alt text provided for this image

6. Increase size by creating a new partition

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

7. Not format the whole partition . only format the increasing part

No alt text provided for this image

Formatting the increase part

No alt text provided for this image

8. Mount Partition

No alt text provided for this image

9. Check arth.txt file exist or not

No alt text provided for this image

10. Reduce Size of Partition than we need to unmount partition and delete partition

No alt text provided for this image

11.Decrease the size by creating a new partition

No alt text provided for this image

12.Examining file system for eroors & resize inode table for new partition & mount partition

e2fsck -f /dev/sdb1
resize2fs /dev/sdb1  3G
No alt text provided for this image

13.Check arth.txt file exist or not

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



To view or add a comment, sign in

More articles by Arpit Patel

Others also viewed

Explore content categories