Re: mount: unknown filesystem type 'LVM2_member' ...

2020-07-14 Thread Reco
On Tue, Jul 14, 2020 at 02:00:53PM +0200, Albretch Mueller wrote:
> On 7/9/20, Reco  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



Re: mount: unknown filesystem type 'LVM2_member' ...

2020-07-14 Thread Albretch Mueller
On 7/9/20, Reco  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


real0m13.893s
user0m0.012s
sys 0m0.004s
#
 lbrtchx



Re: mount: unknown filesystem type 'LVM2_member' ...

2020-07-09 Thread Reco
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



Re: mount: unknown filesystem type 'LVM2_member' ...

2020-07-09 Thread Albretch Mueller
 so, I should go?:

 mkdir -p "/media/abc123"

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



Re: mount: unknown filesystem type 'LVM2_member' ...

2020-07-09 Thread Reco
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



mount: unknown filesystem type 'LVM2_member' ...

2020-07-09 Thread Albretch Mueller
 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-xJwRLGVG lbrtchx-vg lvm2
[297.35 GiB / 0free]

real0m0.435s
user0m0.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

real0m0.036s
user0m0.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

real0m0.040s
user0m0.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



mount: unknown filesystem type 'LVM2_member'

2010-08-21 Thread Mathieu Malaterre
Hi there,

  I am trying to mount an IDE disk from an old (broken) machine. I am
using a USB adaptor. After attaching the IDE disk to the USB adaptor,
I cannot do anything with the disk.

dmesg reveal:

[13927.196346] usb-storage: device scan complete
[13927.503084] scsi 4:0:0:0: Direct-Access ST320413 A
   PQ: 0 ANSI: 0
[13927.504751] sd 4:0:0:0: Attached scsi generic sg2 type 0
[13927.505864] sd 4:0:0:0: [sdb] 39102336 512-byte logical blocks:
(20.0 GB/18.6 GiB)
[13927.506727] sd 4:0:0:0: [sdb] Write Protect is off
[13927.506734] sd 4:0:0:0: [sdb] Mode Sense: 27 00 00 00
[13927.506739] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[13927.508348] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[13927.508355]  sdb: sdb1  sdb5 sdb6 sdb7 
[13927.549046] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[13927.549050] sd 4:0:0:0: [sdb] Attached SCSI disk
[13930.050201] sr 0:0:0:0: [sr0] Unhandled sense code
[13930.050209] sr 0:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[13930.050218] sr 0:0:0:0: [sr0] Sense Key : Hardware Error [current]
[13930.050227] sr 0:0:0:0: [sr0] Add. Sense: Timeout on logical unit
[13930.050237] sr 0:0:0:0: [sr0] CDB: Read(10): 28 00 00 01 87 68 00 00 01 00
[13930.050256] end_request: I/O error, dev sr0, sector 400800
[13930.050267] Buffer I/O error on device sr0, logical block 100200

When trying to mount, I get:


$ sudo mount  -t auto  /dev/sdb7 /tmp/test
mount: unknown filesystem type 'LVM2_member'

But it looks like I do have a LVM2 filesystem on this disk:

$ sudo pvs
  PV VG  Fmt  Attr PSize   PFree
  /dev/sda2  dhcp-67-183 lvm2 a-   148.81G0
  /dev/sdb7  Debian  lvm2 a-17.89G0

Same issue with :

$ sudo lvdisplay /dev/sdb7
  Volume group sdb7 not found


Any suggestion greatly appreciated !
Thanks,
-- 
Mathieu


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlktimjikbiujx+x9jaa2krh2-dqtfqwog0kzkgz...@mail.gmail.com



Re: mount: unknown filesystem type 'LVM2_member'

2010-08-21 Thread Mathieu Malaterre
On Sat, Aug 21, 2010 at 1:51 PM, Mathieu Malaterre
mathieu.malate...@gmail.com wrote:
 Hi there,

  I am trying to mount an IDE disk from an old (broken) machine. I am
 using a USB adaptor. After attaching the IDE disk to the USB adaptor,
 I cannot do anything with the disk.

 dmesg reveal:

 [13927.196346] usb-storage: device scan complete
 [13927.503084] scsi 4:0:0:0: Direct-Access     ST320413 A
   PQ: 0 ANSI: 0
 [13927.504751] sd 4:0:0:0: Attached scsi generic sg2 type 0
 [13927.505864] sd 4:0:0:0: [sdb] 39102336 512-byte logical blocks:
 (20.0 GB/18.6 GiB)
 [13927.506727] sd 4:0:0:0: [sdb] Write Protect is off
 [13927.506734] sd 4:0:0:0: [sdb] Mode Sense: 27 00 00 00
 [13927.506739] sd 4:0:0:0: [sdb] Assuming drive cache: write through
 [13927.508348] sd 4:0:0:0: [sdb] Assuming drive cache: write through
 [13927.508355]  sdb: sdb1  sdb5 sdb6 sdb7 
 [13927.549046] sd 4:0:0:0: [sdb] Assuming drive cache: write through
 [13927.549050] sd 4:0:0:0: [sdb] Attached SCSI disk
 [13930.050201] sr 0:0:0:0: [sr0] Unhandled sense code
 [13930.050209] sr 0:0:0:0: [sr0] Result: hostbyte=DID_OK 
 driverbyte=DRIVER_SENSE
 [13930.050218] sr 0:0:0:0: [sr0] Sense Key : Hardware Error [current]
 [13930.050227] sr 0:0:0:0: [sr0] Add. Sense: Timeout on logical unit
 [13930.050237] sr 0:0:0:0: [sr0] CDB: Read(10): 28 00 00 01 87 68 00 00 01 00
 [13930.050256] end_request: I/O error, dev sr0, sector 400800
 [13930.050267] Buffer I/O error on device sr0, logical block 100200

 When trying to mount, I get:


 $ sudo mount  -t auto  /dev/sdb7 /tmp/test
 mount: unknown filesystem type 'LVM2_member'

 But it looks like I do have a LVM2 filesystem on this disk:

 $ sudo pvs
  PV         VG          Fmt  Attr PSize   PFree
  /dev/sda2  dhcp-67-183 lvm2 a-   148.81G    0
  /dev/sdb7  Debian      lvm2 a-    17.89G    0

 Same issue with :

 $ sudo lvdisplay /dev/sdb7
  Volume group sdb7 not found

Answering myself, one need to use the name in the VG column (not the /dev id):

  sudo lvdisplay Debian
  sudo vgchange -ay /dev/Debian
  sudo mount /dev/Debian/home /tmp/test

Cheers

-- 
Mathieu


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlktikjvrnrihgsqmfoi1guuedf7bcal9rd1dwxk...@mail.gmail.com