[linux-lvm] fsadm bug

Oliver Mangold o.mangold at googlemail.com
Sat Feb 18 14:58:46 UTC 2012


Hi,

I would like to report a bug in the fsadm script.

Trying to resize a filesystem which has a device name that is equal to 
the beginning of another mounted device (which of course can happen with 
the devices in /dev/mapper created for lvm) fails for me. The script 
complains that the filesystem is mounted (even if it is not), then tries 
to unmount *the other* filesystem (which can fail, of course). E.g. you 
want to resize a filesystem with the name /dev/mapper/foobar but there 
another filesystem mounted somewhere from the device /dev/mapper/foo the 
problem appears.

Reason is that the device path is simply grepped from /proc/mounts 
without checking that the matched string is the whole device path. I 
attached a quick fix which solved the problem for me, but imho it does 
not fix all potential issues here. The device path is used unmodified as 
a regexp and also it is not checked if the match is in the correct 
column of the line.

Best,

Oliver
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fsadm_fix.diff
Type: text/x-patch
Size: 563 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20120218/343e4777/attachment.bin>


More information about the linux-lvm mailing list