[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

mount: unknown filesystem type 'LVM2_member' ...



 I (wrongly) think I have done everything right but I can't mount the
encrypted drive

// __ partition with the encrypted external drive

_PART="sdb"

###
date; lsblk | grep "${_PART}"

date; blkid | grep crypto_LUKS | grep "${_PART}"

// __ device

_DEV=$(blkid | grep crypto_LUKS | grep "${_PART}" | awk -F: '{print $1}')
echo "// __ \$_DEV: |${_DEV}|"

_CR_CRYPTO=$(basename "${_DEV}")"_cr-crypto"
echo "// __ \$_CR_CRYPTO: |${_CR_CRYPTO}|"

date; time cryptsetup --verbose luksOpen "${_DEV}" "${_CR_CRYPTO}"

date; lsblk | grep "${_PART}"

date; time cryptsetup status "${_CR_CRYPTO}"

// __ getting logical volume group (listing all to see which one is
the logical volume associated with the external drive ... )

vgs

_X_LVG="lbrtchx-vg"

###

date; time pvscan --verbose --uuid | grep "${_X_LVG}"

date; time vgchange --activate y | grep "${_X_LVG}"

date; time lvdisplay --verbose "${_X_LVG}" | grep "LV Path"

~
I get from the last three commands:


# date; time pvscan --verbose --uuid | grep "${_X_LVG}"
Thu Jul  9 11:41:48 WEST 2020
    Wiping internal VG cache
    Wiping cache of LVM-capable devices
  PV /dev/mapper/sdb3_cr-crypto with UUID
CQqpCe-qlsx-NQi8-q2qj-gBAM-26Na-xJwRLG    VG lbrtchx-vg         lvm2
[297.35 GiB / 0    free]

real    0m0.435s
user    0m0.024s
sys     0m0.024s
#

# date; time vgchange --activate y | grep "${_X_LVG}"
Thu Jul  9 11:41:49 WEST 2020
  5 logical volume(s) in volume group "lbrtchx-vg" now active

real    0m0.036s
user    0m0.020s
sys     0m0.012s
#

# date; time lvdisplay --verbose "${_X_LVG}" | grep "LV Path"
Thu Jul  9 11:41:49 WEST 2020
  LV Path                /dev/lbrtchx-vg/root
  LV Path                /dev/lbrtchx-vg/var
  LV Path                /dev/lbrtchx-vg/swap_1
  LV Path                /dev/lbrtchx-vg/tmp
  LV Path                /dev/lbrtchx-vg/home

real    0m0.040s
user    0m0.020s
sys     0m0.012s
#


but when I try to mount the device:

_DEV_CR_CRYPTO=$(cryptsetup status "${_CR_CRYPTO}" | head -n 1 | awk
'{print $1}')
echo "// __ \$_DEV_CR_CRYPTO: |${_DEV_CR_CRYPTO}|"

_MED_MNT="/media/"$(basename "${_DEV_CR_CRYPTO}")"/$(date +%Y%m%d%H%M%S)"
echo "// __ \$_MED_MNT: |${_MED_MNT}|"

mkdir --verbose --parents "${_MED_MNT}"

if [ -s "${_MED_MNT}" ]; then
 echo "// __ \$_MED_MNT: |${_MED_MNT}| exists!"
 echo "mount --verbose \""${_DEV_CR_CRYPTO}"\" \""${_MED_MNT}\"" -r"

 date; time mount --verbose "${_DEV_CR_CRYPTO}" "${_MED_MNT}" -r
fi

I am getting:

mount: unknown filesystem type 'LVM2_member'

what is it exactly I am not getting right?

lbrtchx


Reply to: