Hot answers tagged

6

resize2fs probably didn't finish the job, but you can't tell because you missed the end of its output. You should not have gone ahead and executed lvreduce at that point. There is a very good chance that this corrupted part of your filesystem. Note that you cannot undo this operation by running lvextend and hoping that the lost bytes come back and that the ...


4

Linux pretty much ignores partition types, it cares more about the content on those partitions. So you don't need a swap partition type to use swap in Linux, and thus there is no issue with LVM not having partition types either. But you have to use the correct partition type to stop Windows from attempting to format your Linux data/swap partitions... it's ...


2

If you have LVM on it, the easy way out is to make a new partition of the free space, set it up as physical volume in LVM and add that physical volume to your volume group. You're probably right that gparted won't touch the partition as it is in use.


2

You've created a volume — an empty space where information can be stored. You can't mount it, because what gets mounted is a filesystem — a structure for information. Mounting makes a filesystem visible in a directory. Use the appropriate mkfs command to create a filesystem on the volume, e.g. to create an ext4 filesystem (the de facto standard on Linux) ...


2

You script is far more complicated than it needs to be and has a few problems: You use backticks rather than $(). Your script ignores all but the first logical volume it finds. You assume that lack of a mount-point for an lvpath means that there are no logical volumes. This assumption is just plain wrong. both lvs and lvdisplay already tell you the device ...


2

I think what happened is you did try to reduce lvm size before getting filesystem shrink. Should do resize2fs to shrink filesystem before lvmreduce Do not mount it. You might end up getting filesystem corruption. Check if you have vg metadata backup it is under /etc/lvm/ when you modify vg it puts there as default since you have access to there check it ...


1

The LVM2 Volume Group(s) on your PV are started. Logical Volumes on this VG(s) might also be started. Stop them with lvchange -an and vgchange -an (after making sure no filesystems from any VG/LV is mounted.)



Only top voted, non community-wiki answers of a minimum length are eligible