Loading...
 

Cloned from seed04, formerly upgraded from 14.04 to 16.04, and recently ugpraded from 16.04 to 18.04

Info from show.t.o setup

See info at:
https://projects.alsawiki.com/tiki-index.php?page=show.tiki.org+-+Migration+show+v1&structure=show.tiki.org+-+Homepage

Managing LVM

Basic info derived from:


Removing boot partition

Initially with a small primary partition for boot, with limited Mb, and I removed that through:

  • copying /boot at /home/boot
  • unmounting boot partition (with kvpm)
  • moving /home/boot to /boot
  • removing /boot entry at /etc/fstab
  • rebooting
sudo apt install kvpm
ssh -Y xavi@seed21.seeds4c.org
sudo apt install kvpm
sudo kvpm

Managing partitions with LVM

Increasing the initial 45Gb of / to 95Gb (extending to the extra 50Gb available as free space at the end of the LVM group)

xavi@seed21:~$ sudo lvmdiskscan
  /dev/r-vg/root   [      45,76 GiB] 
  /dev/sda1        [     243,00 MiB] 
  /dev/r-vg/swap_1 [      <4,00 GiB] 
  /dev/sda5        [     <49,76 GiB] LVM physical volume
  1 disk
  2 partitions
  0 LVM physical volume whole disks
  1 LVM physical volume
xavi@seed21:~$ sudo vgcreate myvg /dev/sda5
  Can't open /dev/sda5 exclusively.  Mounted filesystem?
xavi@seed21:~$ sudo lvdisplay -m
  --- Logical volume ---
  LV Path                /dev/r-vg/root
  LV Name                root
  VG Name                r-vg
  LV UUID                P3DB3O-1Ecl-bT7z-5Qk0-C3Gb-5369-D5Ble0
  LV Write Access        read/write
  LV Creation host, time r, 2016-03-16 13:47:54 +0100
  LV Status              available
  # open                 1
  LV Size                45,76 GiB
  Current LE             11715
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0
   
  --- Segments ---
  Logical extents 0 to 11706:
    Type		linear
    Physical volume	/dev/sda5
    Physical extents	0 to 11706
   
  Logical extents 11707 to 11714:
    Type		linear
    Physical volume	/dev/sda5
    Physical extents	12730 to 12737
   
   
  --- Logical volume ---
  LV Path                /dev/r-vg/swap_1
  LV Name                swap_1
  VG Name                r-vg
  LV UUID                vsLf12-jHa1-kND6-r1op-8O19-wtV5-QkAKkR
  LV Write Access        read/write
  LV Creation host, time r, 2016-03-16 13:47:54 +0100
  LV Status              available
  # open                 2
  LV Size                <4,00 GiB
  Current LE             1023
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1
   
  --- Segments ---
  Logical extents 0 to 1022:
    Type		linear
    Physical volume	/dev/sda5
    Physical extents	11707 to 12729
   
   
xavi@seed21:~$

Extend root with the extra 50Gb of freespace

I had 50Gb free space in /dev/sda-1 . I created a new partition with kvpm, which became /dev/sda3

Then I could extend volume group r-vg with kvpm gui options

And then I could grow / partition from LVM to get all those extra 50Gb of space with:

sudo lvresize -L +50G --resizefs r-vg/root


Current distribution os space is:

xavi@seed21:~$ df -h
Filesystem              Size  Used Avail Use% Mounted on
udev                    1,9G     0  1,9G   0% /dev
tmpfs                   395M  616K  394M   1% /run
/dev/mapper/r--vg-root   95G  3,6G   87G   4% /
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
tmpfs                   395M     0  395M   0% /run/user/1001
xavi@seed21:~$

Provide new extra 50Gb through proxmox gui to the harddisk of the VM

Using proxmox gui, I shutdown the VM, then edited the hardware details, to resize harddisk, to provide extra 50Gb, and then restarted the VM

Extend root with the extra 50Gb of freespace

The new 50Gb free space provided by proxmox gui showed up in /dev/sda-1 .

Image

I created a new partition with kvpm, which became /dev/sda3

Image

Then I could extend volume group r-vg with kvpm gui options, by means of selecting the new partition /dev/sda4 created, right clicking on it, and selecting "Extend volume group > r-vg":

Image

And once completed, this new space will be available for the r-vg volume group:

Image

And then I could grow / partition from LVM to get all those extra 50Gb of space with:

xavi@seed21:~$ sudo lvresize -L +50G --resizefs r-vg/root
  Insufficient free space: 12800 extents needed, but only 12799 available
xavi@seed21:~$ sudo lvresize -L +49G --resizefs r-vg/root
  Size of logical volume r-vg/root changed from 95,76 GiB (24515 extents) to 144,76 GiB (37059 extents).
  Logical volume r-vg/root successfully resized.
resize2fs 1.44.1 (24-Mar-2018)
Filesystem at /dev/mapper/r--vg-root is mounted on /; on-line resizing required
old_desc_blocks = 6, new_desc_blocks = 10
The filesystem on /dev/mapper/r--vg-root is now 37948416 (4k) blocks long.

xavi@seed21:~$ df -h
Filesystem              Size  Used Avail Use% Mounted on
udev                    1,9G     0  1,9G   0% /dev
tmpfs                   293M  616K  293M   1% /run
/dev/mapper/r--vg-root  143G  3,6G  133G   3% /
tmpfs                   487M     0  487M   0% /dev/shm
tmpfs                   5,0M     0  5,0M   0% /run/lock
tmpfs                   487M     0  487M   0% /sys/fs/cgroup
tmpfs                   108M     0  108M   0% /run/user/1001
xavi@seed21:~$


Alias names of this page:
show2.t.o | show2 | lvm | (alias(kvpm)

Image Seed: noun \ˈsēd\ : the beginning of something which continues to develop or grow

Knowledge seeds

Switch Language