-1

HDD failure occurred.

So, a new primary HDD was added in and the old HDD was added in as a secondary one.

I'm trying to mount my secondary HDD but there are errors occurring.

I made /media/qwe/.

I then went on Putty and used these SSH commands:

root@chicken [/]# mount /dev/sdb2 /media/qwe
mount: unknown filesystem type 'LVM2_member'

But, I got an error.

vgdisplay

root@chicken [/]# vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "VolGroup" using metadata type lvm2
  Found volume group "VolGroup" using metadata type lvm2


root@chicken [/]# vgs
  VG       #PV #LV #SN Attr   VSize VFree
  VolGroup   1   3   0 wz--n- 1.82t    0
  VolGroup   1   3   0 wz--n- 1.82t    0

vgchange -a y

I use cPanel and WHM.

I am trying to recover the MySQL databases that were lost. I managed to mount the sdb1 bit, but I think that's the boot partition. I don't need that. I need to access the other files!

Any help?

unutbu
  • 842,883
  • 184
  • 1,785
  • 1,677
Simon Co
  • 7
  • 1
  • What's the type of tables , myisam or Innodb ? – akuzminsky Sep 27 '14 at 12:53
  • Unfortunately this is not a programming question. You should try [SuperUser](http://superuser.com/) and/or [ServerFault](http://serverfault.com/) or [Unix & Linux](http://unix.stackexchange.com/). – Duck Sep 27 '14 at 13:15
  • I can't even access it. I don't know what kind of tables they are. I'm a total noob. I am stressing out because I lost very valuable MySQL databases that I can't retrieve. The HDD is attached, so why can't I mount it? I don't know why it is so hard for me to mount it, it almost feels impossible. Can an expert enlighten me? – Simon Co Sep 27 '14 at 19:01
  • Is it a problem that they share the same volume group name? – Simon Co Sep 27 '14 at 19:14

1 Answers1

0

You don't need file system to get you data back. Start with taking an image from the failed disk

akuzminsky
  • 2,190
  • 15
  • 21
  • Thanks. Would I just be able to use 7zip to extract that after downloading it? It sounds like a great idea. – Simon Co Sep 27 '14 at 14:22
  • dd if=/dev/sdb of=/path/on/sda/faulty_disk.img conv=noerror What's this? /path/on/sda/ I've never seen "/path/on/" before. Could I change it to "/faulty_disk.img" instead by removing the "/path/on/sda/" bit? – Simon Co Sep 27 '14 at 14:30
  • I'm not familiar with 7zip. You should take an image from the disk because if the disk fails any next read operation may be unsuccessful. After the image is ready you can think on recovery plan. Depending on MySQL table types(MyISAM or InnoDB) you may want to use different tools. My point was don't bother yourself with file systems, most probably it's not recoverable. But you don't need it, you need the data – akuzminsky Sep 27 '14 at 14:31
  • "What's this? /path/on/sda/ I've never seen "/path/on/" before", - hmm, I should have been more clear. Save the image in any directory. Just make sure it's on a good disk. – akuzminsky Sep 27 '14 at 14:33
  • Oh okay, I'm doing it now. I wonder how long it will take. It's taking a while. – Simon Co Sep 27 '14 at 14:55
  • It's unpredictable because depends on the amount of faulty blocks. A read from the faulty block may take seconds – akuzminsky Sep 27 '14 at 15:03
  • `dd: opening `/path/on/sda/faulty_disk.img': No such file or directory root@rpg134591 [~]# dd if=/dev/sdb of=/faulty_disk.img conv=noerror dd: writing to `/faulty_disk.img': No space left on device 87273425+0 records in 87273424+0 records out 44683993088 bytes (45 GB) copied, 1786.46 s, 25.0 MB/s` What does it mean no space left on device? – Simon Co Sep 27 '14 at 15:09
  • File size is too big. Is there a different way? I just want to copy a specific part of it? Can't I explore it with SFTP or something? – Simon Co Sep 27 '14 at 18:42