Expanding filesystem on ubuntu

mars@athena:~$ df -k Filesystem 1K-blocks Used Available Use% Mounted on tmpfs 9640288 1728 9638560 1% /run efivarfs 128 48 76 39% /sys/firmware/efi/efivars /dev/mapper/ubuntu--vg-ubuntu--lv 102626232 97366968 0 100% / tmpfs 48201436 0 48201436 0% /dev/shm tmpfs 5120 0 5120 0% /run/lock /dev/nvme0n1p2 1992552 102956 1768356 6% /boot /dev/nvme0n1p1 1098632 6288 1092344 1% /boot/efi tmpfs 9640284 20 9640264 1% /run/user/1000 mars@athena:~$ sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL [sudo] password for mars: NAME FSTYPE SIZE MOUNTPOINT LABEL loop0 73.9M /snap/core22/2045 loop1 140.6M /snap/docker/3265 loop2 49.3M /snap/snapd/24792 nvme0n1 1.9T ├─nvme0n1p1 vfat 1G /boot/efi ├─nvme0n1p2 ext4 2G /boot └─nvme0n1p3 LVM2_member 1.9T └─ubuntu--vg-ubuntu--lv ext4 100G / mars@athena:~$ ls -l /dev/ubuntu-vg/ubuntu-lv lrwxrwxrwx 1 root root 7 Jul 16 02:33 /dev/ubuntu-vg/ubuntu-lv -> ../dm-0 mars@athena:~$ sudo lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv Size of logical volume ubuntu-vg/ubuntu-lv changed from 100.00 GiB (25600 extents) to 1.86 TiB (487597 extents). Logical volume ubuntu-vg/ubuntu-lv successfully resized. mars@athena:~$ sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL NAME FSTYPE SIZE MOUNTPOINT LABEL loop0 73.9M /snap/core22/2045 loop1 140.6M /snap/docker/3265 loop2 49.3M /snap/snapd/24792 nvme0n1 1.9T ├─nvme0n1p1 vfat 1G /boot/efi ├─nvme0n1p2 ext4 2G /boot └─nvme0n1p3 LVM2_member 1.9T └─ubuntu--vg-ubuntu--lv ext4 1.9T / mars@athena:~$ sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv resize2fs 1.47.0 (5-Feb-2023) Filesystem at /dev/mapper/ubuntu--vg-ubuntu--lv is mounted on /; on-line resizing required old_desc_blocks = 13, new_desc_blocks = 239 The filesystem on /dev/mapper/ubuntu--vg-ubuntu--lv is now 499299328 (4k) blocks long. mars@athena:~$ df -k Filesystem 1K-blocks Used Available Use% Mounted on tmpfs 9640288 1728 9638560 1% /run efivarfs 128 48 76 39% /sys/firmware/efi/efivars /dev/mapper/ubuntu--vg-ubuntu--lv 1965264808 97375332 1786917528 6% / tmpfs 48201436 0 48201436 0% /dev/shm tmpfs 5120 0 5120 0% /run/lock /dev/nvme0n1p2 1992552 102956 1768356 6% /boot /dev/nvme0n1p1 1098632 6288 1092344 1% /boot/efi tmpfs 9640284 20 9640264 1% /run/user/1000

Comments

Popular posts from this blog

Set manual ip via command line

Exposing Docker to portainer remotely