From a00a1922b1f72b501bc4f91d9affa4bf31f24ebc Mon Sep 17 00:00:00 2001 From: Maximilian Kalus Date: Fri, 7 Sep 2018 14:16:13 +0200 Subject: [PATCH 1/2] Added lvextend sheet. --- sheets/lvextend | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 sheets/lvextend diff --git a/sheets/lvextend b/sheets/lvextend new file mode 100644 index 0000000..4648f89 --- /dev/null +++ b/sheets/lvextend @@ -0,0 +1,26 @@ +# lvextend + +# Extends a logical volume in an existing volume group. +# A volume group is a collection of logical and physical volumes. + +# Extend volume in volume mylv in groug vg0 (defined by volume path /dev/vg0/mylv) to 12 gigabyte: +lvextend -L 12G /dev/vg0/mylv + +# Extend volume in volume mylv in groug vg0 (defined by volume path /dev/vg0/mylv) by 1 gigabyte: +lvcreate -L +1G /dev/vg0/mylv + +# Extend volume in volume mylv in groug vg0 (defined by volume path /dev/vg0/mylv) to use all of the unallocated space in the volume group vg0: +lvcreate -L +100%FREE /dev/vg0/mylv + +# Extend ext4 filesystem after changing a logical volume (takes volume path as parameter): +ext2resize /dev/vg0/mylv + +# Extend btrfs filesystem after changing a logical volume (takes the mount point as parameter, not the volume path): +btrfs filesystem resize max /mylv + +# Extend xfs filesystem after changing a logical volume (takes the mount point as parameter, not the volume path): +xfs_growfs /mylv + +# Extend jfs filesystem after changing a logical volume (takes the mount point as parameter, not the volume path); +# Just remount: +mount -o remount,resize /home \ No newline at end of file From ec30bb2c491b88f88a531390713755e1b2afd6d7 Mon Sep 17 00:00:00 2001 From: Igor Chubin Date: Sat, 15 Sep 2018 13:50:54 +0200 Subject: [PATCH 2/2] s/lvcreate/lvextend/ --- sheets/lvextend | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/sheets/lvextend b/sheets/lvextend index 4648f89..03858a7 100644 --- a/sheets/lvextend +++ b/sheets/lvextend @@ -1,26 +1,35 @@ # lvextend - # Extends a logical volume in an existing volume group. # A volume group is a collection of logical and physical volumes. -# Extend volume in volume mylv in groug vg0 (defined by volume path /dev/vg0/mylv) to 12 gigabyte: +# Extend volume in volume mylv in groug vg0 +# (defined by volume path /dev/vg0/mylv) +# to 12 gigabyte: lvextend -L 12G /dev/vg0/mylv -# Extend volume in volume mylv in groug vg0 (defined by volume path /dev/vg0/mylv) by 1 gigabyte: -lvcreate -L +1G /dev/vg0/mylv +# Extend volume in volume mylv in groug vg0 +# (defined by volume path /dev/vg0/mylv) +# by 1 gigabyte: +lvextend -L +1G /dev/vg0/mylv -# Extend volume in volume mylv in groug vg0 (defined by volume path /dev/vg0/mylv) to use all of the unallocated space in the volume group vg0: -lvcreate -L +100%FREE /dev/vg0/mylv +# Extend volume in volume mylv in groug vg0 +# (defined by volume path /dev/vg0/mylv) +# to use all of the unallocated space in the volume group vg0: +lvextend -L +100%FREE /dev/vg0/mylv -# Extend ext4 filesystem after changing a logical volume (takes volume path as parameter): +# Extend ext4 filesystem after changing a logical volume +# (takes volume path as parameter): ext2resize /dev/vg0/mylv -# Extend btrfs filesystem after changing a logical volume (takes the mount point as parameter, not the volume path): +# Extend btrfs filesystem after changing a logical volume +# (takes the mount point as parameter, not the volume path): btrfs filesystem resize max /mylv -# Extend xfs filesystem after changing a logical volume (takes the mount point as parameter, not the volume path): +# Extend xfs filesystem after changing a logical volume +# (takes the mount point as parameter, not the volume path): xfs_growfs /mylv -# Extend jfs filesystem after changing a logical volume (takes the mount point as parameter, not the volume path); +# Extend jfs filesystem after changing a logical volume +# (takes the mount point as parameter, not the volume path); # Just remount: -mount -o remount,resize /home \ No newline at end of file +mount -o remount,resize /home