Score:0

How can I extend or resize lvm from disk space

ng flag

We use ceph to manage the storage and recently increased /dev/sdb's disk size. I'm not sure how to utilize the newly available space in my ceph's lvm.

sdb                                                                                                    8:16   0   550G  0 disk
└─ceph--9elp0015--40ic--40pf--bf26--436d3bmkilhf-osd--data--aamki6ca--ec5a--4251--8ep0-
c83plkmj176c 253:0    0   250G  0 lvm

How can I extend or resize the lvm's to use the available 300 GB?

 pvdisplay
  --- Physical volume ---
  PV Name               /dev/sdb
  VG Name               ceph-9e7d6015-464c-4f1f-bf26-436d3b9b8a1f
  PV Size               250.00 GiB / not usable 4.00 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              63999
  Free PE               0
  Allocated PE          63999
  PV UUID               Arhj1O-KuxC-f1YG-une0-D3CI-sP4H-Gf7hf0
Score:1
us flag

You can check and change sizes with ceph-bluestore-tool:

   bluefs-bdev-sizes --path osd path
      Print the device sizes, as understood by BlueFS, to stdout.

  bluefs-bdev-expand --path osd path
      Instruct BlueFS to check the size of its block devices and, if they have expanded, make use of the additional space.

Note that this only works for stopped OSDs. So make sure your cluster stays healthy if you shut down one OSD. If you're not sure how quick you're gonna be set the noout flag: ceph osd set noout so the OSD doesn't get drained if it's offline for more than 10 minutes. Is it a standalone OSD or does it have its rocksDB and/or WAL on a separate faster device?

I strongly recommend to test this procedure with a test cluster where you can't destroy data by making mistakes.

ng flag
Thank you for the suggestion, problem being, I cannot install any utility on the VM and its blocked. Is there a traditional way of approaching it ?
us flag
`ceph-bluestore-tool` is already part of the installation, no need to install additional tools. I don't know what you mean by "traditional way", but without access to the VM you won't be able to resize the disk. A different approach would be to remove the disk from ceph and recreate that OSD, but that's more destructive than extending it. Anyway, without access to the VM you won't be able to resize the OSD.
ng flag
Let me try that , thanks a lot.
us flag
Wait, what exactly do you want to try? Don't simply remove a disk from ceph!
ng flag
will play around in the test cluster.. Once I get the nuances will try that in our PRod env. thanks..
ng flag
`systemctl disable ceph-osd@<osd_id> # systemctl stop ceph-osd@<osd_id>` should help me in stopping an OSD right, post that, will run the `bluefs-bdev-expand --path osd path` command
us flag
Yes, this should work. Don't forget to set `ceph osd set noout`.
ng flag
Cool, thanks a lot !!
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.