1

The faulty partition is /dev/sdb3.

from /proc/mdstat:

md2 : active raid1 sda3[2]
      2896184639 blocks super 1.2 [2/1] [U_]

says /etc/fstab:

# /dev/md/2 belongs to LVM volume group 'vg0'
/dev/vg0/backups  /backups  ext4  defaults 0 0
/dev/vg0/root  /  ext4  defaults 0 0

says pvs:

PV         VG   Fmt  Attr PSize PFree 
/dev/md2   vg0  lvm2 a--  2.70t 50.00g

says lvs:

LV      VG   Attr     LSize   Pool Origin Data%  Move Log Copy%  Convert
backups vg0  -wi-ao-- 974.00g                                           
root    vg0  -wi-ao--   1.70t 

Is it possible to fsck.ext4 (or badblock) the /dev/sdb3, as long as the machine is running? (W/out getting a "Device or resource busy" due to the LVM).

initall
  • 2,205
  • 3
  • 18
  • 19
  • 1
    The partitions are on the logical volumes, not the disk partition. Thus the *partition* cannot be corrupt in a filesystem sense since the actual partition contains no filesystems. – Matthew Ife Feb 17 '15 at 13:03
  • 1
    you need to do fsck on the lvm logical volume not in your disk partition. – c4f4t0r Feb 17 '15 at 13:22
  • Thanks for clarification. So it's not possible to do this on the running server as the check has to be on the lvm. – initall Feb 17 '15 at 13:57

1 Answers1

1

You shouldn't even try to do fsck on a specific partition, because you're using software RAID and LV on top of it. So the filesystem is on other/"higher" level.

But you could use badblocks on a specific partition if it's not used by OS (/dev/sdb3 in this case). Then you could (and you should) re-add your partition to the RAID, if the device state is OK, by using option "--re-add".

Soal
  • 26
  • 1