Hello,
I would like to reduce the size of a lvm2 partition (ext4) without losing data. I am confuse by resizef2s and lvresize. Could you tell me the exact way of doing.
Thank.
On Fri, Apr 29, 2011 at 8:14 PM, Patrick Dupre patrick.dupre@york.ac.uk wrote:
I would like to reduce the size of a lvm2 partition (ext4) without losing data. I am confuse by resizef2s and lvresize. Could you tell me the exact way of doing.
Think of the LV as a partition. You therefore have to resize2fs before lvresize.
You're generally better off using resizef2s twice, before and after lvresize that way you can, for example, resizef2s to 99 GB, lvresize to 100GB, and then resizef2s without specifying a size so that you lay an fs over the entire LV.
On 04/29/2011 07:14 PM, Patrick Dupre wrote:
Hello,
I would like to reduce the size of a lvm2 partition (ext4) without losing data. I am confuse by resizef2s and lvresize. Could you tell me the exact way of doing.
Thank.
I recommend the system-config-lvm tool. It's a really handy LVM GUI tool. It does the "resizef2s" and "lvresize" for you. It does lots of other stuff, too!
If you don't use that tool, remember to shrink the file system before reducing the lv. Ask me how I know that. LOL