0

I have a VG consisting of 4 physical drives. I'm trying to rearrange the data such that I can remove one of the drives from the VG.

Despite having moved the majority of the data to all the spare (small) drives I have I am still left with a small amount of data on the VG, which in order to move I need one of the drives from the VG.

How can I reduce the VG to only use 3 of the 4 drives: vgs shows the following:

  VG        #PV #LV #SN Attr   VSize  VFree
  <HIDDEN>    4   1   0 wz--n-  5.91t    0

As you can see it shows ZERO free space and I'm not sure why; it was a long time ago when I created the VG!

Would someone be so kind as to tell me how I can go about doing this please, as all the commands I have read about and tried for organising a VG (pvresize, vgresize etc.) all return the same error; No extents available for allocation.

I look forward to your replies and I suspect this is something silly I'm just looking over. BTW, the drive is in ext4 format.

Thanks for the edits that were put in place but it didn't make for good reading so I've taken into account the edits and tried to make it a bit easier to read.

  • 1
    Ho do you moved to the small drive? – c4f4t0r Oct 23 '18 at 15:30
  • As the VG is on a networked share, I moved it across (file by file) to 6 smaller HDDs in my main PC via a USB docking station. – Adelphia Oct 25 '18 at 14:39
0

Your volume group appears to have a single logical volume, which itself uses the entire ~6TB of the volume group.

If you want to use less space, you must first shrink the filesystem contained in the logical volume, then shrink the logical volume, and then shrink the volume group.

Note that some filesystems, such as XFS, cannot be shrunk. In this case you will need to copy the data elsewhere, destroy and recreate the VG and LV, then copy the data back.

  • This is what I've done now. I was just hoping to be able to shrink the VG (I was using ext4) but everything I read and tried failed. – Adelphia Oct 26 '18 at 18:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.