Discussion:
[linux-lvm] resize2fs results in "permission denied"
chris
2015-07-07 17:19:04 UTC
Permalink
problem:
after successful "lvextend -L +15G" , resize2fs gets "permission denied".

strace says:

open("/dev/mapper/vg_phoesrv2b-varlog", O_RDONLY|O_EXCL) = -1 EACCES (Permission denied)
open("/dev/mapper/vg_phoesrv2b-varlog", O_RDWR) = -1 EACCES (Permission denied)

ls:
brw-rw---- 1 root disk 254, 44 Apr 11 23:15 /dev/mapper/vg_phoesrv2b-varlog

lvs:
varlog vg_phoesrv2b -wi-ao-- 25,00g

system:
debian 7.8
resize2fs 1.42.5 (29-Jul-2012)
lvm2 2.02.95-8
linux 3.18.9

never seen that one. what's going on?
chris
2015-07-08 12:31:15 UTC
Permalink
/dev/mapper contains device nodes, e.g.:
brw-rw---- 1 root disk 254, 73 Apr 11 23:15 vg_phoesrv2b-lvsnap

those should be symlinks ( except for/dev/mapper/control ):
vg_phoesrv2b-lvsnap -> ../dm-31

solution:
rm /dev/mapper/vg_phoesrv2b-lvsnap
udevadm trigger
Anatoly Pugachev
2015-07-09 11:32:57 UTC
Permalink
I wonder, no one should mess directly with /dev/mapper ! Better would be to
fill a bug report (reproducible/consistent), if it's not fixed in recent
lvm releases.

Thanks.
Post by chris
brw-rw---- 1 root disk 254, 73 Apr 11 23:15 vg_phoesrv2b-lvsnap
vg_phoesrv2b-lvsnap -> ../dm-31
rm /dev/mapper/vg_phoesrv2b-lvsnap
udevadm trigger
<http://tldp.org/HOWTO/LVM-HOWTO/>
Loading...