I have a project that requires me to shrink the root and home volumes on an existing CentOS 6 install to make room for a CentOS 7 install on a customer's bare metal host. Yes, I know what a bad idea this is. We ought to be shipping our customer a brand new, fully configured server.
Anyhow, I'm wondering if there's any magic utility that can scan unmounted disk volumes and report back how much free space or (or what percentage) can be used when I eventually run lvreduce. Anaconda must do this but how to I use anaconda in the %pre section of my kickstart config file?
Thanks.
If the filesystem was ext[234] I would guess you could probably do something like
tune2fs -l /dev/devicename
.