[CentOS] Accessing crashed disk

Thu Dec 14 00:15:23 UTC 2017
J Martin Rushton <martinrushton56 at btinternet.com>

On 13/12/17 21:42, Leon Fauster wrote:
> Am 13.12.2017 um 22:31 schrieb martin.wagner at mailbit.io:
>> I have a Centos server that crashed, it would no longer boot. I thought it was the disk with the OS that was the problem so I bought a new one and did a fresh install and now the computer is again up and running. But I'm having problems with accessing the old failed disk. I can see it with gnome-disk-utility and it says that the disk is OK but has 8 bad sectors. I can mount the boot partition from it and I can decrypt the main partition. But then I can see no way to mount the main partition. It is a LVM physical volume.   
>> Any advice?
> Show us the output of (after decrypt):
> lsblk -f
> or directly - try:
> vgchange -a y
> mount /dev/mapper/"main partition" /oldfaileddisk 
> --
> LF
If you think the disk is going faulty the very first thing to do is to
make a copy of it and then work on the copy.  If your failed disk is on
(as an example) /dev/sdc, the command is:

# dd if=/dev/sdc of=/home/dd-copy-of-sdc

It will take a long time, and ensure that /home has enough space for the
complete disk.  Use kpartx(8) to make the disk visible and you can then
mount the partitions.

lvs(8) will tell you about any logical volumes and IIRC, lvchange allows
you to activate them.  You can then mount them as normal.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.centos.org/pipermail/centos/attachments/20171214/763cc059/attachment-0004.sig>