Answer the question
In order to leave comments, you need to log in
LVM shrink size?
Good day to all. Please help.
In short: I have a 140GB lv, but I only use 10Mb there, how can I reduce the free space on this lv? I tried the command: lvextend -l -100%FREE /dev/volgroup/logvol but it didn't work, it only moves a couple of blocks but doesn't make the lv smaller.
Secondly, I have /dev/sda2 - LVM2_member and it has 199GB, after shrinking lv, how can I reduce and compress the partition to a minimum and throw away the free space so that I can delete it later (might need to move partitions with gparted)?
p.s. I can't shrink the lv or partition via resize2fs because I can't shrink the XFS file system.
Thank you!
Answer the question
In order to leave comments, you need to log in
In short: I have lv 140GB, but I only use 10Mb there
xfs? BUT! Yes, it cannot be reduced, only expanded, unlike ext3/4.
There is only one option:
- copy the data
- unmount the partition
- demolish the logical volume
- create a new one of the required size
- format
it - copy the data back
And yes, for the future, XFS is certainly good (especially with automatic defragmentation), but EXT4 is no worse than they say half a petabyte of data in our working storages!
I tried to create a livecd using UCK-GUI or whatever to get system-config-lvm but I can't create a livecd because UCK is a dead project. And I can't find any GUI tools for LVM.
There is also an option to make a data backup and delete the old lv and create a new one, like here: https://yallalabs.com/linux/how-to-reduce-shrink-t...
But then how to reduce the LVM2_member - /dev/sda2 partition?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question