I check both /etc/fstab
and the current mounts.
if grep -Pq '/dev/(mapper/|disk/by-id/dm)' /etc/fstab || mount | grep -q /dev/mapper/then echo "LVM is in use"fi
I check both /etc/fstab
and the current mounts.
if grep -Pq '/dev/(mapper/|disk/by-id/dm)' /etc/fstab || mount | grep -q /dev/mapper/then echo "LVM is in use"fi