Forzare il filesystem check al riavvio

From RVM Wiki
Jump to navigation Jump to search

Se si vuole forzare l' e2fsck della partizione / al reboot, occorre settare il valore do mount count della partizione stessa al massimo.

Brevemente, impostar ela partizione da testare:

export PART="/dev/md0"

Impostare il max check count:

sudo /sbin/tune2fs -C $(sudo /sbin/tune2fs -l $PART | grep 'Maximum mount count' | cut --delim=':' -f2 | tr -d ' ') $PART ; unset PART
reboot

ATTENZIONE: controllare accuratamente che nel file /etc/fstab ci sia settato il valore pass diverso da zero (vedi man fstab):

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>               <dump>  <pass>
/dev/md0        /               ext3    defaults                0       1

Se così non fosse, il filesystem NON VERRA' riparato !