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

Chris Craig kwlug.org at ciotog.net
Wed Aug 12 11:22:27 EDT 2020


I believe cfdisk has an option to extend a partition without having to do
the nail-biting "delete partition/create partition" you have to do in
fdisk. both do the same thing, just rewrite the partition table, but cfdisk
is a bit nicer about it.

On Wed, 12 Aug 2020 at 10:59, Charles M <chaslinux at gmail.com> wrote:

> 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
>
> _______________________________________________
> kwlug-disc mailing list
> kwlug-disc at kwlug.org
> https://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20200812/4818baf7/attachment.htm>


More information about the kwlug-disc mailing list