2

I operate a remote server (Ubuntu Server 14.04). On rebooting it halts and says:

Errors were found while checking the disk drive for /.
keys:Press F to attempt to fix the errors, I to ignore, S to skip mounting, or M for manual recovery

I can't press any key, so I need to boot into recovery mode. Which I do. There I executed

fsck -y /dev/sda

sda and sdb are busy. It only worked with /dev/md12[4567].
When using lsof, it does not show any use of /dev/sd[ab]

How would I repair my system correctly?

My suggested solution was: touch /forcefsck, which should fix disk errors. So I've mounted my raid partitions /dev/mdX and created forcefsck on it. But during boot nothing showed up. But the ubuntu mountscript contains the check on line 3 (see below).

This is where I am stuck:
I can't get forcefsck and fsck working. How do I properly fix my filesystem (or make them work)?

/mnt/etc/init/mountall.conf:

script
. /etc/default/rcS || true
[ -f /forcefsck ] && force_fsck="--force-fsck"
[ "$FSCKFIX" = "yes" ] && fsck_fix="--fsck-fix"

# Doesn't work so well if mountall is responsible for mounting /proc, heh.
if [ -e /proc/cmdline ]; then
    read line < /proc/cmdline
    for arg in $line; do
        case $arg in
            -q|--quiet|-v|--verbose|--debug)
                debug_arg=$arg
                ;;
        esac
    done < /proc/cmdline
fi
# set $LANG so that messages appearing in plymouth are translated
if [ -r /etc/default/locale ]; then
    . /etc/default/locale || true
    export LANG LANGUAGE LC_MESSAGES LC_ALL
fi

exec mountall --daemon $force_fsck $fsck_fix $debug_arg
end script

This is my output of fdisk -l:

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 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
Disk identifier: 0x7ea9111b

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048     2050047     1024000   fd  Linux raid autodetect
/dev/sda2         2050048    10049535     3999744   82  Linux swap / Solaris
/dev/sda3        10049536    51009535    20480000   fd  Linux raid autodetect
/dev/sda4        51009536   976771071   462880768    f  W95 Ext'd (LBA)
/dev/sda5        51011584   606468095   277728256   fd  Linux raid autodetect
/dev/sda6       606470144   976769023   185149440   fd  Linux raid autodetect

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 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
Disk identifier: 0x203e3ae7

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048     2050047     1024000   fd  Linux raid autodetect
/dev/sdb2         2050048    10049535     3999744   82  Linux swap / Solaris
/dev/sdb3        10049536    51009535    20480000   fd  Linux raid autodetect
/dev/sdb4        51009536   976771071   462880768    f  W95 Ext'd (LBA)
/dev/sdb5        51011584   606468095   277728256   fd  Linux raid autodetect
/dev/sdb6       606470144   976769023   185149440   fd  Linux raid autodetect

Disk /dev/md127: 189.6 GB, 189592895488 bytes
2 heads, 4 sectors/track, 46287328 cylinders, total 370298624 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
Disk identifier: 0x00000000

Disk /dev/md127 doesn't contain a valid partition table

Disk /dev/md126: 284.4 GB, 284393537536 bytes
2 heads, 4 sectors/track, 69432016 cylinders, total 555456128 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
Disk identifier: 0x00000000

Disk /dev/md126 doesn't contain a valid partition table

Disk /dev/md125: 21.0 GB, 20971388928 bytes
2 heads, 4 sectors/track, 5119968 cylinders, total 40959744 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
Disk identifier: 0x00000000

Disk /dev/md125 doesn't contain a valid partition table

Disk /dev/md124: 1048 MB, 1048510464 bytes
2 heads, 4 sectors/track, 255984 cylinders, total 2047872 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
Disk identifier: 0x00000000

Disk /dev/md124 doesn't contain a valid partition table

This is my whole bootlog: http://pastebin.com/raw/mTDL6KVk
And here you can see my raid 1 status:

~# cat /proc/mdstat
Personalities : [raid1]
md124 : active raid1 sda1[0] sdb1[1]
      1023936 blocks super 1.0 [2/2] [UU]

md125 : active raid1 sda3[0] sdb3[1]
      20479872 blocks super 1.0 [2/2] [UU]

md126 : active raid1 sda5[0] sdb5[1]
      277728064 blocks super 1.0 [2/2] [UU]
      bitmap: 0/3 pages [0KB], 65536KB chunk

md127 : active raid1 sda6[0] sdb6[1]
      185149312 blocks super 1.0 [2/2] [UU]
      bitmap: 0/2 pages [0KB], 65536KB chunk

unused devices: <none>

0

You must log in to answer this question.

Browse other questions tagged .