Table of Contents

EXT4

Determine FS block size

# tune2fs -l /dev/mapper/sdb5 | grep Block
Block count:              242871296
Block size:               4096
Blocks per group:         32768

Try to read bad sector:

hdparm --read-sector 965009739 /dev/sda

Write sector with zeros:

hdparm --yes-i-know-what-i-am-doing --repair-sector 965009739 /dev/sda

ext4 on LUKS

cryptsetup luksDump /dev/sdb5
Version:       	1
Cipher name:   	aes
Cipher mode:   	cbc-plain64
Hash spec:     	sha512
# cryptsetup status /dev/mapper/sdb5
/dev/mapper/sdb5 is active.
  type:    LUKS1
  cipher:  aes-cbc-plain64
  keysize: 128 bits
  device:  /dev/sdb5
  offset:  2048 sectors
  size:    1942970368 sectors
  mode:    read/write