🔅Increase or Decrease the Size of Static Partition in Linux.
🌀 7.1.B: Elasticity Task
There are two Memory Management Techniques: Contiguous, and Non-Contiguous. In Contiguous Technique, the executing process must be loaded entirely in the main memory. Contiguous Technique can be divided into:
- Fixed (or static) partitioning
- Variable (or dynamic) partitioning
So first we have created a fixed partition in sdb hard disk of size 5G and mounted it to the /ld mount point.
Now we would unmount sdb1 partition from the folder and reun e2fsck command. The e2fsck command is used to check the ext2/ext3/ext4 family of file systems. For ext3 and ext4 filesystems that use a journal, if the system has been shut down uncleanly without any errors, normally, after replaying the committed transactions in the journal, the file system should be marked as clean.
Then we would delete the 5G partition.
After deleting the 5G partition we would create a new partition of new required size(in this case 7G). In the process of deleting the file we would not delete the ext4 signature in the partition.
Now we have created a new partition of 7G and now we have to mount it.
First we would run resize2fs command to format it in a special way such that no data is lost. Then we would mount it to the desired folder.