Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #224639 > unrolled thread

mount: unknown filesystem type 'LVM2_member' ...

Started byAlbretch Mueller <lbrtchx@gmail.com>
First post2020-07-09 13:00 +0200
Last post2020-07-14 16:00 +0200
Articles 6 — 2 participants

Back to article view | Back to linux.debian.user


Contents

  mount: unknown filesystem type 'LVM2_member' ... Albretch Mueller <lbrtchx@gmail.com> - 2020-07-09 13:00 +0200
    Re: mount: unknown filesystem type 'LVM2_member' ... Reco <recoverym4n@enotuniq.net> - 2020-07-09 14:00 +0200
      Re: mount: unknown filesystem type 'LVM2_member' ... Albretch Mueller <lbrtchx@gmail.com> - 2020-07-09 14:30 +0200
        Re: mount: unknown filesystem type 'LVM2_member' ... Reco <recoverym4n@enotuniq.net> - 2020-07-09 14:50 +0200
          Re: mount: unknown filesystem type 'LVM2_member' ... Albretch Mueller <lbrtchx@gmail.com> - 2020-07-14 14:10 +0200
            Re: mount: unknown filesystem type 'LVM2_member' ... Reco <recoverym4n@enotuniq.net> - 2020-07-14 16:00 +0200

#224639 — mount: unknown filesystem type 'LVM2_member' ...

FromAlbretch Mueller <lbrtchx@gmail.com>
Date2020-07-09 13:00 +0200
Subjectmount: unknown filesystem type 'LVM2_member' ...
Message-ID<AqCrw-22M-3@gated-at.bofh.it>
 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

[toc] | [next] | [standalone]


#224642

FromReco <recoverym4n@enotuniq.net>
Date2020-07-09 14:00 +0200
Message-ID<AqDnz-2Fd-15@gated-at.bofh.it>
In reply to#224639
	Hi.

On Thu, Jul 09, 2020 at 06:54:05AM -0400, Albretch Mueller wrote:
> but when I try to mount the device:
> 
> _DEV_CR_CRYPTO=$(cryptsetup status "${_CR_CRYPTO}" | head -n 1 | awk
> '{print $1}')
...
>  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?

You're trying to mount lvm2 physical volume which is never going to
work - it's not a filesystem.
What you should mount is a logical volume, i.e. that devices that
lvdisplay shows you.

Reco

[toc] | [prev] | [next] | [standalone]


#224644

FromAlbretch Mueller <lbrtchx@gmail.com>
Date2020-07-09 14:30 +0200
Message-ID<AqDQB-341-5@gated-at.bofh.it>
In reply to#224642
 so, I should go?:

 mkdir -p "/media/abc123"

 mount "/dev/lbrtchx-vg/home" "/media/abc123"

[toc] | [prev] | [next] | [standalone]


#224647

FromReco <recoverym4n@enotuniq.net>
Date2020-07-09 14:50 +0200
Message-ID<AqE9X-3au-9@gated-at.bofh.it>
In reply to#224644
On Thu, Jul 09, 2020 at 08:28:24AM -0400, Albretch Mueller wrote:
>  so, I should go?:
> 
>  mkdir -p "/media/abc123"
> 
>  mount "/dev/lbrtchx-vg/home" "/media/abc123"

More or less. The correct sequence is:
1) cryptsetup luksOpen
2) pvscan && vgchange -ay
3) mount "/dev/lbrtchx-vg/home" "/media/abc123"

And the unmounting should go in reverse:
1) umount /media/...
2) vghcange -an ...
3) cryptsetup luksClose

Reco

[toc] | [prev] | [next] | [standalone]


#224793

FromAlbretch Mueller <lbrtchx@gmail.com>
Date2020-07-14 14:10 +0200
Message-ID<AsrV0-4UY-13@gated-at.bofh.it>
In reply to#224647
On 7/9/20, Reco <recoverym4n@enotuniq.net> wrote:
> More or less. The correct sequence is:
> 1) cryptsetup luksOpen
> 2) pvscan && vgchange -ay
> 3) mount "/dev/lbrtchx-vg/home" "/media/abc123"
>
> And the unmounting should go in reverse:
> 1) umount /media/...
> 2) vghcange -an ...
> 3) cryptsetup luksClose

 thank you, but for some reason I can't quite understand, I haven't
found a thorough, self-describing step-by-step guideline about such
matters and I don't have the time right now, Internet access to make
another mistake.

# _DEV_MPPR="/dev/mapper/${_CR_CRYPTO}"
# echo "// __ \$_DEV_MPPR: |${_DEV_MPPR}|"
// __ $_DEV_MPPR: |/dev/mapper/sdc3_xcrypto|

# time mkfs --type ext4 "${_DEV_MPPR}"
mke2fs 1.43.4 (31-Jan-2017)
/dev/mapper/sdc3_xcrypto contains a LVM2_member file system
Proceed anyway? (y,N) N


real    0m13.893s
user    0m0.012s
sys     0m0.004s
#
 lbrtchx

[toc] | [prev] | [next] | [standalone]


#224802

FromReco <recoverym4n@enotuniq.net>
Date2020-07-14 16:00 +0200
Message-ID<AstDs-5JX-3@gated-at.bofh.it>
In reply to#224793
On Tue, Jul 14, 2020 at 02:00:53PM +0200, Albretch Mueller wrote:
> On 7/9/20, Reco <recoverym4n@enotuniq.net> wrote:
> > More or less. The correct sequence is:
> > 1) cryptsetup luksOpen
> > 2) pvscan && vgchange -ay
> > 3) mount "/dev/lbrtchx-vg/home" "/media/abc123"
> >
> > And the unmounting should go in reverse:
> > 1) umount /media/...
> > 2) vghcange -an ...
> > 3) cryptsetup luksClose
> 
>  thank you, but for some reason I can't quite understand, I haven't
> found a thorough, self-describing step-by-step guideline about such
> matters and I don't have the time right now, Internet access to make
> another mistake.
> 
> # _DEV_MPPR="/dev/mapper/${_CR_CRYPTO}"
> # echo "// __ \$_DEV_MPPR: |${_DEV_MPPR}|"
> // __ $_DEV_MPPR: |/dev/mapper/sdc3_xcrypto|
> 
> # time mkfs --type ext4 "${_DEV_MPPR}"
> mke2fs 1.43.4 (31-Jan-2017)
> /dev/mapper/sdc3_xcrypto contains a LVM2_member file system
> Proceed anyway? (y,N) N

That does seem wrong. Is /dev/mapper/sdc3_xcrypto shown by
lvdisplay/lvs? Because it is not, you probably should not try to mount
it.

Reco

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web