Continuing from this article https://anyware.com.sg/debian11-128mb/
While testing out the file server services; the storage space soon filled up.
That’s when I realised I had provisioned only 16GB of Storage most likely I thought I’m won’t doing anything else besides sftp testing.
So how exactly I increased the Storage size…
There are couple of options in hand for me to do this.
- Add Additional virtual disk and mount it as a folder for the shares
- Expand the current virtual disk and partition the extra free space and mount it as a shared folder
- Expand the current virtual disk and repartition the disk so there is no need for additional mounts
Since I was in experimenting mood, I opted for option 3.
The process would like this or at least I thought so:
- Expand virtual disk to 120GB
- Delete the current partition and recreate it
- Resize the volume to take up the full capacity of the disk.
The actual process as I had to do additional procedures to correct some of the actions which didn’t go as expected:
- Expand virtual disk to 120 GB – > easy peasy..
- Delete the current partition and recreate it
I wasn’t so sure if this would go well but who cares its my test system anyway…
I used
cfdisk
which is more user friendly.
Deleted the primary, extended and linux swap partitions
Then readded the partitions with larger Primary partition with 116GB space, next extended and swap partition.
Paid particular attention to enable Boot on primary partition, before committing the changes.
So far so good…. ran
resize2fs /dev/sda1
hoping to see the new disk size.
The command returned to say something like .. no changes found no changes made.
Thought rebooting the system would show the increase in partition orrr break the system….
The reboot happened but it took way longer to then usual. There were error messsages like “missing swap partition” and “Gave up waiting for suspend/resume device”
Didn’t knew what it meant so proceeded to resize the volume and this time the volume expansion was successful and it showed the full volume size
Then checked up why swap was not in use… that’s when I found that couple on things must be done to fix it.
What happened to Swap….
Creating Swap partition alone would not suffice that it would be used by the system; it has to be initialized and activated. Please read to this linked article on how to activate swap partition