Bad magic number in super-block while trying to open /dev/sd

Issues related to hardware problems
Post Reply
emailmarketer
Posts: 2
Joined: 2015/03/05 20:39:36

Bad magic number in super-block while trying to open /dev/sd

Post by emailmarketer » 2015/03/05 20:42:48

3 days ago my server hardrive crashed and i ticket hetzener to check hard drive and they told me hard drive should be replaced
but when i tried to run VPS which already worked well with Centos6.6 i got filesystem readonly errors and now i get Kernel Panic
i really need an expert to help me ,if anybody can help me.

[Moderator: removed personal contact details, please ask and be answered on the forum]

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Bad magic number in super-block while trying to open /de

Post by TrevorH » 2015/03/05 23:43:23

Please post the exact error message(s) that you receive and also the output from the following commands:

Code: Select all

fdisk -l
pvs
vgs
lvs
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

emailmarketer
Posts: 2
Joined: 2015/03/05 20:39:36

Re: Bad magic number in super-block while trying to open /de

Post by emailmarketer » 2015/03/06 19:40:50

this is fdisk

Code: Select all

[root@static ~]# fdisk -l
Disk /dev/sda: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00035176

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              64       13055   104344576   8e  Linux LVM

Disk /dev/sdb: 536.9 GB, 536870912000 bytes
255 heads, 63 sectors/track, 65270 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/VolGroup-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/VolGroup-lv_swap: 4227 MB, 4227858432 bytes
255 heads, 63 sectors/track, 514 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/VolGroup-lv_home: 48.9 GB, 48930750464 bytes
255 heads, 63 sectors/track, 5948 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
----------------------
pvs output

Code: Select all

  Total PE              25474
  Free PE               0
  Allocated PE          25474
  PV UUID               axiiJ5-TYPO-w44R-HlzY-vNCC-7CNZ-RCxIZO
------------------------------
lvs

Code: Select all

[root@static ~]# lvs
  LV      VG       Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  lv_home VolGroup -wi-ao---- 45.57g                                            
  lv_root VolGroup -wi-ao---- 50.00g                                            
  lv_swap VolGroup -wi-ao----  3.94g

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Bad magic number in super-block while trying to open /de

Post by gerald_clark » 2015/03/06 19:50:55

You did not supply all the information requested.
You did not show the output of vgs.

It looks like sdb was replaced, but you have not partitioned it and have not built any volumes on it yet.

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Bad magic number in super-block while trying to open /de

Post by TrevorH » 2015/03/07 04:09:32

Yesterday on IRC you posted a link to a pastebin that contained the following:

Code: Select all

    mke2fs 1.41.12 (17-May-2010)
    /dev/sdb is entire device, not just one partition!
    Proceed anyway? (y,n) y
    Filesystem label=
    OS type: Linux
    Block size=4096 (log=2)
    Fragment size=4096 (log=2)
    Stride=0 blocks, Stripe width=0 blocks
    32768000 inodes, 131072000 blocks
    6553600 blocks (5.00%) reserved for the super user
    First data block=0
    Maximum filesystem blocks=4294967296
    4000 block groups
    32768 blocks per group, 32768 fragments per group
    8192 inodes per group
    Superblock backups stored on blocks:
            32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
            4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
            102400000
That command destroyed your partition table and overwrote the contents of your entire /dev/sdb device. All information on it was lost. It's now time to get your backups out and restore the data that it used to contain.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Bad magic number in super-block while trying to open /de

Post by aks » 2015/03/08 06:34:18

Ouch!

Post Reply