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-0001.sig>
On Dec 13, 2017, at 5:15 PM, J Martin Rushton <martinrushton56 at btinternet.com> wrote:> > # dd if=/dev/sdc of=/home/dd-copy-of-sdcBetter, use ddrescue: https://www.gnu.org/software/ddrescue/ dd will do unfortunate things like quit early on I/O errors, even if later blocks would read just fine. ddrescue assumes the input file is dodgy and tries to cope.
On 14/12/17 18:57, Warren Young wrote:> On Dec 13, 2017, at 5:15 PM, J Martin Rushton <martinrushton56 at btinternet.com> wrote: >> >> # dd if=/dev/sdc of=/home/dd-copy-of-sdc > > Better, use ddrescue: > > https://www.gnu.org/software/ddrescue/ > > dd will do unfortunate things like quit early on I/O errors, even if later blocks would read just fine. ddrescue assumes the input file is dodgy and tries to cope. >Looks interesting. I've only used dd in anger, and then only maybe 3 or 4 times over the last 20 years. It's worth pointing out that ddrescue is not in the main distro, you'll need to get it from EPEL. Whatever method you use though: "Be diligent because every time a physically damaged drive powers up and is able to output some data, it may be the very last time that it ever will." (ddrescue manual section 9) -------------- 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/fa5fba8c/attachment-0001.sig>