Score:0

How to configure LVM to use the entire partition

in flag

Due to the space crunch, have increased the HDD size from 500 GB to 650 GB on /dev/sdb, but unsure on how to resize the lvm to make use of the available 150GB.

sdb         8:16   0   650G  0 disk
└─ceph--ef9893e6--7191--434e--a531--8deaeb51ad92-osd--data--5abbfff8--920a--419d--bb87--91ba4a1bf3a1
          253:0    0   500G  0 lvm

Tried lvextend but failed.

lvextend -L+12G /dev/ceph-ef9893e6-7191-434e-a531-8deaeb51ad92/osd-data-5abbfff8-920a-419d-bb87-91ba4a1bf3a1
  Insufficient free space: 3072 extents needed, but only 0 available

lvextend -l +100%FREE /dev/ceph-ef9893e6-7191-434e-a531-8deaeb51ad92/osd-data-5abbfff8-920a-419d-bb87-91ba4a1bf3a1
  New size (127999 extents) matches existing size (127999 extents).

lvdisplay
  --- Logical volume ---
  LV Path                /dev/ceph-ef9893e6-7191-434e-a531-8deaeb51ad92/osd-data-5abbfff8-920a-419d-bb87-91ba4a1bf3a1
  LV Name                osd-data-5abbfff8-920a-419d-bb87-91ba4a1bf3a1
  VG Name                ceph-ef9893e6-7191-434e-a531-8deaeb51ad92
  LV UUID                kzJ5pI-g1UI-CUdP-kZE7-wRqT-fwTd-cZeoAX
  LV Write Access        read/write
  LV Creation host, time 
  LV Status              available
  # open                 0
  LV Size                <500.00 GiB
  Current LE             127999
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0



 pvdisplay
  --- Physical volume ---
  PV Name               /dev/sdb
  VG Name               ceph-ef9893e6-7191-434e-a531-8deaeb51ad92
  PV Size               500.00 GiB / not usable 4.00 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              127999
  Free PE               0
  Allocated PE          127999
  PV UUID               FzjGfa-evuO-cJxF-FcIo-u9Mb-wGuG-Pl4qFo

lvs

  LV                                            VG                                        Attr       LSize    Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  osd-data-5abbfff8-920a-419d-bb87-91ba4a1bf3a1 ceph-ef9893e6-7191-434e-a531-8deaeb51ad92 -wi-a----- <500.00g

OS Ubuntu 20.04 LTS

PonJar avatar
in flag
Looks like you have unallocated space on sdb. You can resize the existing partition and then extend the filesystem or you can create a new partition and add it to the volume group. This is a good guide https://www.tecmint.com/extend-and-reduce-lvms-in-linux/
Chel MS avatar
in flag
thank you, let me refer that.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.