Your information is contradictory. /dev/md0
cannot simultaneously be a PV and have a partition table. file
would recognize a PV. It seems that md0
is partitioned so that the LVM volume is rather /dev/md0p1
or /dev/md0p2
.
Maybe for some reason pvscan
/ vgscan
ignore /dev/md0
/ /dev/md0p1
(and thus LVM cannot find the UUID). You may run pvscan
through strace
in order to check which block devices are scanned:
strace -e trace=open pvscan 2>&1 | grep /dev/md
The resize2fs
does not support shrinking of a mounted file system:
DESCRIPTION
The resize2fs program will resize ext2, ext3, or ext4 file systems. It can be used to enlarge or shrink an unmounted file system
located on device. If the
filesystem is mounted, it can be used to expand the size of the mounted filesystem, assuming the kernel and the file system
supports on-line resizing.
As you are using fedora distribution, it's much easier to use System Storage Manager
to change the size of your file system as it takes care on underlying partition/logical volume size change in one shot. Though you would need to boot the system off the one of LiveCD spins, provided by Fedora community (I recommend XFCE or LXDE to reduce the download size a bit), so in the terminal window just issue:
sudo ssm resize -s -5G /dev/mapper/pc_rperez_lvm-root
to decrease the root fs by 5 gigabytes, or
sudo ssm resize -s 15G /dev/mapper/pc_rperez_lvm-root
To set the fs size to 15 gigabytes.
If the ssm
is not available in the live CD you would download, then do
sudo yum install system-storage-manager
prior to re-sizing.
to extend a volume to the maximum available space just omit the -s
option:
sudo ssm resize /dev/mapper/pc_rperez_lvm-home
Best Answer
In RedHat's set of administration tools, there's system-config-lvm, which is optionally installable in other distributions like Fedora and Debian.
Recent versions of gnome-disk-utility support LVM.
The newly-released KDE 4.6 gains udisks as a Solid backend, which should provide LVM support. (Out of the three, this is the only one I haven't tried.)