[kwlug-disc] Resizing live file system (follow up)

Charles M chaslinux at gmail.com
Wed Aug 12 10:59:31 EDT 2020


Thanks to Mark who responded to me in a private message. I was able to
resize the RAID1 partition and expand the OS "running within the OS."
Here's what I did:

I was able to resize the partition on the live environment following
https://stackoverflow.com/questions/53743677/changing-a-partition-with-fdisk-shows-a-warning-like-partitionx-contains-ext4

I only had 2 partitions (no swap - which simplified things):
/dev/sda1 - /boot/EFI
/dev/sda2 - /

>From the live OS I ran
sudo fdisk /dev/sda2

I deleted the partition, and created a new partition. A couple of
notes: When you create the new partition you have to start it at the
same block as the old one. Also there's a prompt I didn't see
mentioned that asks about deleting an existing ext4 filesystem (which
I said NO to since I want to preserve the partition). fdisk defaulted
to the same block as the start block was before. fdisk also defaulted
to the proper size for the end of the array (the 6TB).  All I had to
do after was write the changes and then run:

resize2fs /dev/sda2

The process took around 30 seconds, but I only had a basic install of
Ubuntu server on the disks before, I'm not sure how long it would take
with a drive full of data. I did a df -h after the process and it
showed 6TB of space. To be sure that things were still good I
rebooted. On reboot Ubuntu server loaded up, I did a df -h again and
it saw the whole 6TB.

-- 
Charles




More information about the kwlug-disc mailing list