#before you start, resize the fisical disk first or in virtual environment (vmware, virtualbox, etcc...)
#first, execute:
fdisk -l command
#after execute:
df -h
or
ls /sys/class/scsi_device/
or
echo 1 > /sys/class/scsi_device/2\:0\:0\:0/device/rescan
echo 1 > /sys/class/scsi_device/3\:0\:0\:0/device/rescan
echo 1 > /sys/class/scsi_device/32\:0\:0\:0/device/rescan
#Use cfdisk to extend boot partition,select it, (/dev/sda3 in my case) and select “Resize” Click enter, new size is shown
#Then select “Write”, when prompted, type “Yes”, and then select “Quit” and press Enter
#With fdisk -l /dev/sda, make sure partition is extended
#Next, let’s run parted and resize a partition
#in parted execute:
(parted) print
(parted) resizepart
(parted) quit
#Next, resize the physical volume:
pvresize /dev/sda3
#Now, extend the logical volume:
lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
#Finally, run resize2fs to apply the changes:
resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
#Verify changes:
df -h
#partition is extended from (size before) to (new size)
references:
https://geekdudes.wordpress.com/2021/04/09/ubuntu-20-04-extend-boot-partition/
Nenhum comentário:
Postar um comentário