viernes, noviembre 04, 2016

Verificar bloques (clusters) malos en un disco duro Linux (ext4)

Verify bad blocks hard disk Linux (ext4)

Opción 1 (Durante el formateo):
$ mkfs.ext4 -c /dev/sda1
Opción 2 (En cualquier momento, después del formateo):
$ umount /dev/sda1
$ fsck.ext4 -cDfty -C 0 /dev/sda1
Run a ext4 file system check and badblocks scan with progress info
Nothing fancy, just a regular filesystem scan that calls the badblocks program and shows some progress info. The used options are:
  • -c ? check for bad sectors with badblocks program
  • -D ? optimize directories if possible
  • -f ? force check, even if filesystem seems clean
  • -t ? print timing stats (use -tt for more)
  • -y ? assume answer ?yes? to all questions
  • -C 0 ? print progress info to stdout
  • /dev/sdxx ? the partition to check, (e.g. /dev/sda1 for first partition on first hard disk)
NOTE: Never run fsck on a mounted partition!

No hay comentarios: