root@k8s-master:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 1.9G 0 1.9G 0% /dev
tmpfs 393M 1.3M 391M 1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv 19G 11G 6.7G 62% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
/dev/sda2 976M 150M 760M 17% /boot
tmpfs 393M 0 393M 0% /run/user/0
overlay 19G 11G 6.7G 62% /var/lib/docker/overlay2/cdecf5e060b7ed367fae9cdba47d09fa4926ce5f771b1f1754eac5d07bcdf0eb/merged
/dev/mapper/data--vg-data--lv 49G 53M 47G 1% /dataroot@k8s-master:~# umount /dev/data-vg/data-lv
root@k8s-master:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 1.9G 0 1.9G 0% /dev
tmpfs 393M 1.3M 391M 1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv 19G 11G 6.7G 62% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
/dev/sda2 976M 150M 760M 17% /boot
tmpfs 393M 0 393M 0% /run/user/0
overlay 19G 11G 6.7G 62% /var/lib/docker/overlay2/cdecf5e060b7ed367fae9cdba47d09fa4926ce5f771b1f1754eac5d07bcdf0eb/mergedroot@k8s-master:~# e2fsck -f /dev/data-vg/data-lv
e2fsck 1.44.1 (24-Mar-2018)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/data-vg/data-lv: 11/3276800 files (0.0% non-contiguous), 284558/13106176 blocksroot@k8s-master:~# resize2fs /dev/data-vg/data-lv 10G
resize2fs 1.44.1 (24-Mar-2018)
Resizing the filesystem on /dev/data-vg/data-lv to 2621440 (4k) blocks.
The filesystem on /dev/data-vg/data-lv is now 2621440 (4k) blocks long.
root@k8s-master:~# lvreduce -L 10G /dev/data-vg/data-lv
WARNING: Reducing active logical volume to 10.00 GiB.
THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce data-vg/data-lv? [y/n]: y
Size of logical volume data-vg/data-lv changed from <50.00 GiB (12799 extents) to 10.00 GiB (2560 extents).
Logical volume data-vg/data-lv successfully resized.root@k8s-master:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
data-lv data-vg -wi-a----- 10.00g
ubuntu-lv ubuntu-vg -wi-ao---- <19.00groot@k8s-master:~# fdisk -l
Disk /dev/fd0: 1.4 MiB, 1474560 bytes, 2880 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x90909090
Device Boot Start End Sectors Size Id Type
/dev/fd0p1 2425393296 4850786591 2425393296 1.1T 90 unknown
/dev/fd0p2 2425393296 4850786591 2425393296 1.1T 90 unknown
/dev/fd0p3 2425393296 4850786591 2425393296 1.1T 90 unknown
/dev/fd0p4 2425393296 4850786591 2425393296 1.1T 90 unknown
Disk /dev/sda: 20 GiB, 21474836480 bytes, 41943040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 0995E371-7712-40EC-970D-4FC84C1A8438
Device Start End Sectors Size Type
/dev/sda1 2048 4095 2048 1M BIOS boot
/dev/sda2 4096 2101247 2097152 1G Linux filesystem
/dev/sda3 2101248 41940991 39839744 19G Linux filesystem
Disk /dev/sdb: 50 GiB, 53687091200 bytes, 104857600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/ubuntu--vg-ubuntu--lv: 19 GiB, 20396900352 bytes, 39837696 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/data--vg-data--lv: 10 GiB, 10737418240 bytes, 20971520 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytesroot@k8s-master:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 1.9G 0 1.9G 0% /dev
tmpfs 393M 1.3M 391M 1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv 19G 11G 6.7G 62% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
/dev/sda2 976M 150M 760M 17% /boot
tmpfs 393M 0 393M 0% /run/user/0
overlay 19G 11G 6.7G 62% /var/lib/docker/overlay2/cdecf5e060b7ed367fae9cdba47d09fa4926ce5f771b1f1754eac5d07bcdf0eb/mergedroot@k8s-master:~# mount /dev/data-vg/data-lv /data/ root@k8s-master:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 1.9G 0 1.9G 0% /dev
tmpfs 393M 1.3M 391M 1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv 19G 11G 6.7G 62% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
/dev/sda2 976M 150M 760M 17% /boot
tmpfs 393M 0 393M 0% /run/user/0
overlay 19G 11G 6.7G 62% /var/lib/docker/overlay2/cdecf5e060b7ed367fae9cdba47d09fa4926ce5f771b1f1754eac5d07bcdf0eb/merged
/dev/mapper/data--vg-data--lv 9.6G 37M 9.1G 1% /data