TransWikia.com

Trying to mount LVM Volume and getting "can't read superblock" .. help!

Unix & Linux Asked by Siv on December 2, 2020

I have a disk from my Mint 19 laptop (480GB SSD) which I cannot remember the password for, so I thought, no problem attach via a USB 3.0 adapter to my desktop PC and mount the drive and back it up before wiping the disk and re-installing the laptop.

When I plug it in a 511MB volume automounts and has the Grub files on it etc. Initially the first time I plugged it in a second volume appeared and shows the root and swap dives of 442.68GB and 3.97GB respectively. I copied the home folder off and at the start got a permissions error and selected skip, I then got another permissions error and selected skip all assuming these were hidden files that I am not too bothered about backing up, I am more focused on the Documents and Pictures folders as much as anything else.

At the end I could see that all the folders off my home directory on the laptop had appeared but when I looked closer they were all zero byte files. I then tried copying a few key files and got a permissions error "Read Only File System". So it appeared that I could not access any files. I had a look at the drive in DiskPart and could see that it was an LVM drive so I decided to run through some procedures to mount the LVM drive. After unmounting it from the Files application.

Initially I did sudo lvs and got a warning:

WARNING: PV /dev/sdc5 in VG mint-vg is using an old PV header, modify the VG to update.

So I ran:

sudo vgck --updatemetadata mint-vg

This upgraded the VG and the warning went away doing sudo lvs.

I then ran these commands to try and activate and then mount the drive:

sudo pvscan
  PV /dev/sdc5   VG mint-vg         lvm2 [446.65 GiB / 0    free]
  Total: 1 [446.65 GiB] / in use: 1 [446.65 GiB] / in no VG: 0 [0   ]
siv@BigBlackIII:~$ sudo vgscan
  Found volume group "mint-vg" using metadata type lvm2
siv@BigBlackIII:~$ sudo vgchange -a y
  2 logical volume(s) in volume group "mint-vg" now active
siv@BigBlackIII:~$ sudo lvscan
  ACTIVE            '/dev/mint-vg/root' [442.68 GiB] inherit
  ACTIVE            '/dev/mint-vg/swap_1' [<3.97 GiB] inherit
siv@BigBlackIII:~$ sudo mount /dev/min=vg/root /mnt
mount: /mnt: special device /dev/min=vg/root does not exist.
siv@BigBlackIII:~$ sudo mount /dev/mint-vg/root /mnt
mount: /mnt: can't read superblock on /dev/mapper/mint--vg-root.
siv@BigBlackIII:~$ sudo dumpe2fs /dev/mint-vg/root | grep superblock
dumpe2fs 1.45.5 (07-Jan-2020)
dumpe2fs: Input/output error while trying to open /dev/mint-vg/root
Couldn't find valid filesystem superblock.

Out of interest I was able to get to the superblock using this command:

sudo mke2fs -n /dev/sdc5

mke2fs 1.45.5 (07-Jan-2020) /dev/sdc5 contains a LVM2_member filesystem Proceed anyway? (y/N) y 

Creating filesystem with 117087488 4k blocks and 29278208 inodes Filesystem UUID: b4974c66-4d05-4fe3-9aff-bf86783a12a4 

Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 102400000 

I then tried:

mount sb=32768 /dev/mint-vg/root /media/siv/TonyRoot 
mount: bad usage Try 'mount --help' for more information. 

So not sure what I am doing wrong? I found this method of creating the mount using the mount command in various posts butit is not accepted on Linux Mint 20 which is what I am running on my desktop machine.

Could anyone recommend what I should do to get this drive mounted so that I can back up my data?

Any help appreciated.

Siv

OK so not much help here in the end but for anyone who has the same issue I fixed my issue using this post:

quonn.wordpress.com

I was able to locate the files in /mnt/home/username where "username" is the actual user on my disk. I then copied all failes from there to my backup disk and then formatted the drive.

Siv

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP