Extend an LV and its filesystem

Add 10G to an LVM logical volume and grow the ext4 filesystem without unmounting it.

lvextend -L +10G /dev/vg0/lv_data && resize2fs /dev/vg0/lv_data

tool
linux133 commands
tags
linuxlvmdiskfilesystem

More linux commands

  • fallocate -l 2G /swapfile && chmod 600 /swapfile && mkswap /swapfile && swapon /swapfile

    Create a 2G swap file, set permissions, format it and turn it on.

  • swapon --show && free -h

    List active swap areas and overall memory and swap usage.

  • ip -br a

    Show a short list of all interfaces and their IPs.

  • ip route show table all

    Show routes from all tables, including policy routing tables.

  • ip route add 10.0.0.0/8 via 192.168.1.1 dev eth0

    Add a static route. It is gone after a reboot.

all 133 linux commands