3

So my Fedora Linux machine crashed during an update, and now refuses to start properly. I'm using SystemRescueCD to try to recover the contents of the hard drive.

Following the steps in this post, I have done the following, shown together with the respective output for each command.

First I list the partitions:

root@sysresccd /root % fdisk -l
Disk /dev/loop0: 338.5 MiB, 354885632 bytes, 693136 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 477 GiB, 512110190592 bytes, 1000215216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x283f70c2

Device     Boot   Start        End   Sectors   Size Id Type
/dev/sda1  *       2048    1026047   1024000   500M 83 Linux
/dev/sda2       1026048 1000214527 999188480 476.5G 8e Linux LVM


Disk /dev/mapper/fedora-swap: 7.6 GiB, 8187281408 bytes, 15990784 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sdb: 7.5 GiB, 8076132352 bytes, 15773696 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x29ca9ce2

Device     Boot Start     End Sectors  Size Id Type
/dev/sdb1        2048 7641087 7639040  3.7G  b W95 FAT32

The harddrive I want to access is in sda2, so I try to mount it.

root@sysresccd /root % mkdir /mnt/old
root@sysresccd /root % mount /dev/sda2 /mnt/old 
mount: unknown filesystem type 'LVM2_member'

So it is unable to mount the hard drive because it does not recognise the filesystem.

With the lvm2 tools, I do a disk scan

root@sysresccd /root % lvmdiskscan
/dev/loop0              [     338.45 MiB] 
/dev/mapper/fedora-swap [       7.62 GiB] 
/dev/sda1               [     500.00 MiB] 
/dev/sda2               [     476.45 GiB] LVM physical volume
/dev/sdb1               [       3.64 GiB] 
1 disk
3 partitions
0 LVM physical volume whole disks
1 LVM physical volume

With lvdisplay I get the logical volume (LV) name and the volume group (VG) name

root@sysresccd /root % lvdisplay
WARNING: Unrecognised segment type thin-pool
WARNING: Unrecognised segment type thin
--- Logical volume ---
LV Path                /dev/fedora/pool00
LV Name                pool00
VG Name                fedora
LV UUID                Ye2FvY-Sx80-znoh-aYdi-Q5wM-e0W3-UPaQtA
LV Write Access        read/write
LV Creation host, time localhost, 2016-01-04 15:59:45 +0000
LV Status              NOT available
LV Size                452.82 GiB
Current LE             115922
Segments               1
Allocation             inherit
Read ahead sectors     auto

--- Logical volume ---
LV Path                /dev/fedora/root
LV Name                root
VG Name                fedora
LV UUID                DLcLQA-VcRn-u7fQ-sWaL-v9cY-M5EW-F3ZFuN
LV Write Access        read/write
LV Creation host, time localhost, 2016-01-04 15:59:46 +0000
LV Status              NOT available
LV Size                50.00 GiB
Current LE             12800
Segments               1
Allocation             inherit
Read ahead sectors     auto

--- Logical volume ---
LV Path                /dev/fedora/home
LV Name                home
VG Name                fedora
LV UUID                aTrVab-urfB-u0xU-zoit-PK8H-l5Sf-2MfaXV
LV Write Access        read/write
LV Creation host, time localhost, 2016-01-04 15:59:48 +0000
LV Status              NOT available
LV Size                402.82 GiB
Current LE             103122
Segments               1
Allocation             inherit
Read ahead sectors     auto

--- Logical volume ---
LV Path                /dev/fedora/swap
LV Name                swap
VG Name                fedora
LV UUID                MuFrai-TMdG-uiap-y7fh-5lhU-dYlL-cjjBAZ
LV Write Access        read/write
LV Creation host, time localhost, 2016-01-04 15:59:51 +0000
LV Status              available
# open                 0
LV Size                7.62 GiB
Current LE             1952
Segments               1
Allocation             inherit
Read ahead sectors     auto
- currently set to     256
Block device           253:0

The vgdisplay command also gives similar information

root@sysresccd /root % vgdisplay
WARNING: Unrecognised segment type thin-pool
WARNING: Unrecognised segment type thin
--- Volume group ---
VG Name               fedora
System ID             
Format                lvm2
Metadata Areas        1
Metadata Sequence No  9
VG Access             read/write
VG Status             resizable
MAX LV                0
Cur LV                4
Open LV               0
Max PV                0
Cur PV                1
Act PV                1
VG Size               476.45 GiB
PE Size               4.00 MiB
Total PE              121971
Alloc PE / Size       117932 / 460.67 GiB
Free  PE / Size       4039 / 15.78 GiB
VG UUID               WduLzz-NwqH-DXYy-8fQy-ojos-SDi4-EmmHs5

Now I tried a new mount, using the LV name path:

root@sysresccd /root % mount /dev/fedora/home /mnt/old 
mount: special device /dev/fedora/home does not exist

It still refuses to mount.

lvscan shows the status of the logical volume

root@sysresccd /root % lvscan
WARNING: Unrecognised segment type thin-pool
WARNING: Unrecognised segment type thin
inactive          '/dev/fedora/pool00' [452.82 GiB] inherit
inactive          '/dev/fedora/root' [50.00 GiB] inherit
inactive          '/dev/fedora/home' [402.82 GiB] inherit
ACTIVE            '/dev/fedora/swap' [7.62 GiB] inherit

As you can see, it is still inactive and not mounted. Also, there are two warnings about unrecognised segment types.

So even though I continue with the given instructions and add the device mapping module dm-mod to the kernel:

root@sysresccd /root % modprobe dm-mod

Then I change the attributes of the volume group:

root@sysresccd /root % vgchange -ay
WARNING: Unrecognised segment type thin-pool
WARNING: Unrecognised segment type thin
Refusing activation of LV pool00 containing an unrecognised segment.
Refusing activation of LV root containing an unrecognised segment.
Refusing activation of LV home containing an unrecognised segment.
1 logical volume(s) in volume group "fedora" now active

But the attributes do not change due to the unrecognised segments, and the logical volumes stay inactive.

root@sysresccd /root % lvscan
WARNING: Unrecognised segment type thin-pool
WARNING: Unrecognised segment type thin
inactive          '/dev/fedora/pool00' [452.82 GiB] inherit
inactive          '/dev/fedora/root' [50.00 GiB] inherit
inactive          '/dev/fedora/home' [402.82 GiB] inherit
ACTIVE            '/dev/fedora/swap' [7.62 GiB] inherit

I don't know what "thin" and "thin-pool" mean in this context, but it seems quite clear that they are blocking the access to the old partitions.

So if there is anyone who can spot the problem, please tell how to solve it.

1 Answer 1

2

This appears to be a bug in older versions of LVM. A bug that could be corrected by compiling from source with a different set of flags to add support for thin devices. I can not speak for the SystemRescueCD you mentioned, because I have never used it, but it may be using an older version of LVM, for whatever reason, which may have this very bug.

Since you mentioned you are running Fedora, have you tried getting an official Fedora ISO image to boot from? Grab the server version here: https://getfedora.org/en/server/download/

I suggest the server version rather than desktop version because of the options for troubleshooting available.

Simply boot from the ISO image (CD/DVD or USB thumb drive) and start rescue mode. Version 23 of the Fedora server ISO I tested seemed to have no issues reading any LVM volumes on a test machine I purposely "broke" the file systems on. Of course, your mileage may vary. :\

I have also had success with thin-provisioning-tools found here: https://github.com/jthornber/thin-provisioning-tools

After booting from the Fedora ISO, you may need to do a bit of leg work to get your machine to boot up far enough to install the tools. Perhaps not mounting the damaged mount points at boot, if possible that is.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .