Recover old HOME directory data from USB external HDD error: mount: unknown filesystem type 'LVM2_member', Couldn't find valid filesystem superblock
1
vote
1
answer
1029
views
**Reason:** /boot filesystem corrupted: Both bootable hard drive cables were disconnected with motherboard by accident when it was powered on, which caused the HDDs /boot filesystem crashed. CentOS 7 **Bootable 2 x 320GB entire hard drives were mirrored by LVM2** (/dev/mapper/cl-root, /dev/mapper-cl-home and swap) during the installation.
I boot up with CD-ROM, tried to repair the corrupted root partition superblock without success. Now I put the drive connected with SATA->USB connect to another CentOS 7 server's USB port, showing as following:
[root@localhost ~]# fdisk -l
..... (**ignore the current server internal drivers info here**)
--- below is the external USB SATA 320GB corrupted /boot drive -----
......
Disk /dev/sdg: 320.1 GB, 320072933376 bytes, 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 33553920 bytes
Disk label type: dos
Disk identifier: 0xe9e67578
Device Boot Start End Blocks Id System
/dev/sdg1 * 2048 2099199 1048576 83 Linux
/dev/sdg2 606116385 625137344 9510480 7 HPFS/NTFS/exFAT
/dev/sdg3 2099200 606115839 302008320 8e Linux LVM
My main purpose is to recover the HOME directory data from the crashed boot disk. I am looking for your help on one of the followings which can achieve this goal:
1. copy data out of the crashed hard drive.
2. repair the superblock to boot up as previously (in order to keep this question as short as possible, if you consider this is easier than 1, please let me know, so I have a longer troubleshooting code to paste here);
Below is the detail information for what I did on 1):
1. Copy data out of the crashed hard drive:
[root@localhost ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 2.7T 0 disk
......(ignore the internal disk, below is the USB HDD)....
sdg 8:96 0 298.1G 0 disk
├─sdg1 8:97 0 1G 0 part
├─sdg2 8:98 0 9.1G 0 part
└─sdg3 8:99 0 288G 0 part
sr0 11:0 1 4.1G 0 rom
I am mounting all of the 3 slice onto the mount points:
but the /dev/sdg3 failed with the following error <<-- this is my key problem: how can I mount this slice to see the HOME data? (it's obviously the data is not on sdg1 and sdg2).
[root@localhost ~]# mount /dev/sdg1 /media/1
[root@localhost ~]# mount /dev/sdg2 /media/2
[root@localhost ~]# mount /dev/sdg3 /media/3
mount: unknown filesystem type 'LVM2_member'
[root@localhost ~]# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
......
/dev/sdg2 9510476 8211864 1298612 87% /media/2
/dev/sdg1 1038336 300072 738264 29% /media/1
I tried to use testdisk to dump out data from sdg3, with output file image.dd.
however, at the end I found that this image.dd file is stilled wrapped with LVM2_member:
[root@localhost home-gwu-old]# ls -l
total 302008328
-rw-r--r--. 1 root root 309256519680 Jan 5 19:34 image.dd
[root@localhost]# mount -o loop image.dd /media/3
mount: unknown filesystem type 'LVM2_member
Any your help would be greatly appreciated!
gordon
Asked by Gordon
(11 rep)
Jul 2, 2020, 01:30 AM
Last activity: Jun 12, 2024, 09:51 PM
Last activity: Jun 12, 2024, 09:51 PM