Skip to content

Instantly share code, notes, and snippets.

@stefan2904
Last active September 18, 2024 07:57
Show Gist options
  • Save stefan2904/2af30453bb4cf1731c06 to your computer and use it in GitHub Desktop.
Save stefan2904/2af30453bb4cf1731c06 to your computer and use it in GitHub Desktop.

Revisions

  1. stefan2904 revised this gist Jul 14, 2015. 1 changed file with 15 additions and 0 deletions.
    15 changes: 15 additions & 0 deletions lvextend
    Original file line number Diff line number Diff line change
    @@ -47,3 +47,18 @@ tmpfs 5.8G 0 5.8G 0% /sys/fs/cgroup
    /dev/sda1 232M 35M 181M 16% /boot
    tmpfs 1.2G 4.0K 1.2G 1% /run/user/116
    tmpfs 1.2G 12K 1.2G 1% /run/user/1000

    [~10 minutes later]

    % df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/dm-1 46G 14G 31G 31% /
    udev 10M 0 10M 0% /dev
    tmpfs 2.3G 9.2M 2.3G 1% /run
    tmpfs 5.8G 232K 5.8G 1% /dev/shm
    tmpfs 5.0M 4.0K 5.0M 1% /run/lock
    tmpfs 5.8G 0 5.8G 0% /sys/fs/cgroup
    /dev/mapper/thinkbook-home 148G 55G 87G 39% /home
    /dev/sda1 232M 35M 181M 16% /boot
    tmpfs 1.2G 4.0K 1.2G 1% /run/user/116
    tmpfs 1.2G 12K 1.2G 1% /run/user/1000
  2. stefan2904 revised this gist Jul 14, 2015. 1 changed file with 9 additions and 5 deletions.
    14 changes: 9 additions & 5 deletions lvextend
    Original file line number Diff line number Diff line change
    @@ -11,25 +11,29 @@ tmpfs 5.8G 0 5.8G 0% /sys/fs/cgroup
    tmpfs 1.2G 4.0K 1.2G 1% /run/user/116
    tmpfs 1.2G 12K 1.2G 1% /run/user/1000


    % sudo lvextend -L150G /dev/mapper/thinkbook-home
    Size of logical volume thinkbook/home changed from 93.13 GiB (23841 extents) to 150.00 GiB (38400 extents).
    Logical volume home successfully resized


    % sudo lvs
    LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
    home thinkbook -wi-ao---- 150.00g
    root thinkbook -wi-ao---- 46.56g


    % sudo resize2fs /dev/mapper/thinkbook-home
    resize2fs 1.42.12 (29-Aug-2014)
    Filesystem at /dev/mapper/thinkbook-home is mounted on /home; on-line resizing required
    old_desc_blocks = 6, new_desc_blocks = 10
    The filesystem on /dev/mapper/thinkbook-home is now 39321600 (4k) blocks long.
    The filesystem on /dev/mapper/thinkbook-home is now 39321600 (4k) blocks long.


    % sudo resize2fs /dev/mapper/thinkbook-home
    resize2fs 1.42.12 (29-Aug-2014)
    The filesystem is already 39321600 (4k) blocks long. Nothing to do!

    % sudo lvs
    LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
    home thinkbook -wi-ao---- 150.00g
    root thinkbook -wi-ao---- 46.56g

    % df -h
    Filesystem Size Used Avail Use% Mounted on
  3. stefan2904 revised this gist Jul 14, 2015. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions lvextend
    Original file line number Diff line number Diff line change
    @@ -26,6 +26,10 @@ Filesystem at /dev/mapper/thinkbook-home is mounted on /home; on-line resizing r
    old_desc_blocks = 6, new_desc_blocks = 10
    The filesystem on /dev/mapper/thinkbook-home is now 39321600 (4k) blocks long.

    % sudo lvs
    LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
    home thinkbook -wi-ao---- 150.00g
    root thinkbook -wi-ao---- 46.56g

    % df -h
    Filesystem Size Used Avail Use% Mounted on
  4. stefan2904 revised this gist Jul 14, 2015. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions lvextend
    Original file line number Diff line number Diff line change
    @@ -20,6 +20,13 @@ tmpfs 1.2G 12K 1.2G 1% /run/user/1000
    home thinkbook -wi-ao---- 150.00g
    root thinkbook -wi-ao---- 46.56g

    % sudo resize2fs /dev/mapper/thinkbook-home
    resize2fs 1.42.12 (29-Aug-2014)
    Filesystem at /dev/mapper/thinkbook-home is mounted on /home; on-line resizing required
    old_desc_blocks = 6, new_desc_blocks = 10
    The filesystem on /dev/mapper/thinkbook-home is now 39321600 (4k) blocks long.


    % df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/dm-1 46G 14G 31G 31% /
  5. stefan2904 revised this gist Jul 14, 2015. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions lvextend
    Original file line number Diff line number Diff line change
    @@ -15,6 +15,11 @@ tmpfs 1.2G 12K 1.2G 1% /run/user/1000
    Size of logical volume thinkbook/home changed from 93.13 GiB (23841 extents) to 150.00 GiB (38400 extents).
    Logical volume home successfully resized

    % sudo lvs
    LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
    home thinkbook -wi-ao---- 150.00g
    root thinkbook -wi-ao---- 46.56g

    % df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/dm-1 46G 14G 31G 31% /
  6. stefan2904 created this gist Jul 14, 2015.
    29 changes: 29 additions & 0 deletions lvextend
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    % df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/dm-1 46G 14G 31G 31% /
    udev 10M 0 10M 0% /dev
    tmpfs 2.3G 9.2M 2.3G 1% /run
    tmpfs 5.8G 232K 5.8G 1% /dev/shm
    tmpfs 5.0M 4.0K 5.0M 1% /run/lock
    tmpfs 5.8G 0 5.8G 0% /sys/fs/cgroup
    /dev/mapper/thinkbook-home 92G 55G 33G 63% /home
    /dev/sda1 232M 35M 181M 16% /boot
    tmpfs 1.2G 4.0K 1.2G 1% /run/user/116
    tmpfs 1.2G 12K 1.2G 1% /run/user/1000

    % sudo lvextend -L150G /dev/mapper/thinkbook-home
    Size of logical volume thinkbook/home changed from 93.13 GiB (23841 extents) to 150.00 GiB (38400 extents).
    Logical volume home successfully resized

    % df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/dm-1 46G 14G 31G 31% /
    udev 10M 0 10M 0% /dev
    tmpfs 2.3G 9.2M 2.3G 1% /run
    tmpfs 5.8G 232K 5.8G 1% /dev/shm
    tmpfs 5.0M 4.0K 5.0M 1% /run/lock
    tmpfs 5.8G 0 5.8G 0% /sys/fs/cgroup
    /dev/mapper/thinkbook-home 92G 55G 33G 63% /home
    /dev/sda1 232M 35M 181M 16% /boot
    tmpfs 1.2G 4.0K 1.2G 1% /run/user/116
    tmpfs 1.2G 12K 1.2G 1% /run/user/1000