I have a weird situation:
I had a disk on a Debian 9 server that had one partition with an ext4 filesystem mounted to /opt/foobar. I then unmounted the partition and deleted it using fdisk.
I then
- Created a PV on that disk
- Added it to a VG
- Created an LV
- Created an ext4 filesystem
which I now want to mount to the old mountpoint /opt/foobar. The command finishes without error, but when I check with df or lsblk I can see that the mount is not there.
Update: I just realized, that mounting the LV to another mountpoint, say /mnt works.
Here are some outputs:
root:~/ # grep optsdc /etc/fstab
/dev/mapper/vg1-lvoptsdc /opt/sdc ext4 defaults 0 0
root:~/ # mount /dev/mapper/vg1-lvoptsdc /opt/sdc
root:~/ # echo $?
0
root:~/ # dmesg
[Thu Oct 17 16:34:54 2019] EXT4-fs (dm-9): mounted filesystem with ordered data mode. Opts: (null)
root:~/ # lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb 8:16 0 50G 0 disk
└─vg1-lvoptsdc 254:9 0 5G 0 lvm
root:~/ # lvdisplay -m /dev/mapper/vg1-lvoptsdc
--- Logical volume ---
LV Path /dev/vg1/lvoptsdc
LV Name lvoptsdc
VG Name vg1
LV UUID ol90ME-v6Tv-fpUC-8cb6-NwlZ-0UjF-l2c7d8
LV Write Access read/write
LV Creation host, time hostname, 2019-10-17 09:02:07 +0200
LV Status available
# open 0
LV Size 5.00 GiB
Current LE 1280
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:9
--- Segments ---
Logical extents 0 to 1279:
Type linear
Physical volume /dev/sdb
Physical extents 9722 to 11001