You are not logged in.

#1 2017-08-10 13:51:54

batot
Banned
From: Poland
Registered: 2012-08-15
Posts: 47

lvm2 and bad sector - what next?

$ sudo lvscan
  inactive          '/dev/VolGroup00/LogVol00' [230.81 GiB] inherit
  inactive          '/dev/VolGroup00/LogVol01' [<1.94 GiB] inherit

$ sudo fdisk -l /dev/sdb
Disk /dev/sdb: 232.9 GiB, 250058268160 bytes, 488395055 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xfa90fa90

Device     Boot  Start       End   Sectors   Size Id Type
/dev/sdb1  *        63    208844    208782   102M 83 Linux
/dev/sdb2       208845 488392064 488183220 232.8G 83 Linux
]$

]$ sudo lvmdiskscan                     
  /dev/sda1 [     512.00 MiB]
  /dev/sda2 [     297.59 GiB]
  /dev/sdb1 [     101.94 MiB]
  /dev/sdb2 [     232.78 GiB] LVM physical volume
  0 disks
  3 partitions
  0 LVM physical volume whole disks
  1 LVM physical volume
]$

$ sudo lvm vgscan
  Reading volume groups from cache.
  Found volume group "VolGroup00" using metadata type lvm2


$ sudo lvm vgdisplay VolGroup00     
  --- Volume group ---
  VG Name               VolGroup00
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  3
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               232.78 GiB
  PE Size               32.00 MiB
  Total PE              7449
  Alloc PE / Size       7448 / 232.75 GiB
  Free  PE / Size       1 / 32.00 MiB
  VG UUID               0Usq3B-AroN-gvUk-hHaP-hwgh-gVle-UZ1aXS
   
lvs
  LV       VG         Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  LogVol00 VolGroup00 -wi------- 230.81g                                                   
  LogVol01 VolGroup00 -wi-------  <1.94g     

I used next:
$sudo badblocks -v -s /dev/sda > badblocks.log
and get 76 bad block like this:
175298372
175298373
175298374
175298375
175302428
175302429
175302430
175302431
175303512
175303513
175303514
175303515
175304004
175304005
175304006
175304007
175304008
175304009
175304010
175304011
175304500
175304501
175304502
175304503

next I'm trying

# sudo e2fsck -l badblocks.log /dev/sdb       
e2fsck 1.43.5 (04-Aug-2017)
ext2fs_open2: Bad magic number in super-block
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/sdb

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
or
    e2fsck -b 32768 <device>

/dev/sdb contains `DOS/MBR boot sector; GRand Unified Bootloader, stage1 version 0x3, boot drive 0x80, 1st sector stage2 0x660b' data
[root@Algrim2-BB ~]#



# debugfs
debugfs 1.43.5 (04-Aug-2017)
debugfs:  open /dev/sdb
Checksum errors in superblock!  Retrying...
/dev/sdb: Bad magic number in super-block while opening filesystem
/dev/sdb contains `DOS/MBR boot sector; GRand Unified Bootloader, stage1 version 0x3, boot drive 0x80, 1st sector stage2 0x660b' data
debugfs:  open /dev/sdb2
Checksum errors in superblock!  Retrying...
/dev/sdb2: Bad magic number in super-block while opening filesystem
/dev/sdb2 contains a LVM2_member file system
debugfs: 


But I dont know what can I must doing now?. How can I tell tell system that don't use this block/sector?
Anything who find in internet work in ext2, ext3 ext4 but dont work in LVM2

Offline

Board footer

Powered by FluxBB