Increase or Decrease the Size of Static Partition in Linux.
Shrishti Kapoor
Accenture | 4 x RedHat Certified | Aviatrix Certified Engineer | AI-900 | Technical Trainer, Mentor, Judge @Hackathon | Technical Research Writer Enthusiast ??DevOps ??Cloud-AWS, Azure ??ML/AI/DL ??Python DSA
The steps to increase the size of static Partition in Linux are as follows:
Step1: Create a partition (say of 2Gb)
Step2: Format(ext4) it and mount a folder (say lw) to it
Step3: Create file and store in that partition.
Step4: Unmount folder
Step5: Delete the created partition and save the settings
Step6: Create new partition of size bigger than that of previous one(say 4Gb)
Step7: Now use “e2fsck -f /dev/sdb1”
This command checks the filesystem(ext2,ext,3,ext4), if error is there like OS shutdown abruptly then, it will resolve it by replaying the committed transactions in the journal. Hence our transaction of creating a file will be redone.
Step8: Now use “resize2fs /dev/sdb1”
This command format(create filesystem like ext4) the remaining volume added to the partition i.e. 4-2=2.
Step9: Now mount the previously mounted folder i.e. lw.
We will see that our previously created file and its data is present in it..!!!
?
DevOps Engineer @ The Good Glamm Group | AWS Solutions Architect Professional | CKS | CKA | Azure Administrator
4 年??