0

At work there is an Ubuntu 12.04 server with 2 internal hard drives (1.0TB and 2.0TB), 2 external hard drives (2.0TB and 4.0TB), and a 32GB USB memory that is used as swap. It's kind of a complicated setup, so I suppose they just kept on adding stuff when memory filled up. My user session is assigned to a partition on the external 4.0TB drive.

It was running quite slow lately so I attempted to reboot, but it froze during shutdown, so I shut it down manually by cutting the power supply (not a good thing, but there was no other option I was aware of).

Now when I try to boot the system, I get the following message:

swapon: /dev/sde1: read swap header failed: Invalid argument
mountall: swap on /dev/sde1 [1049] terminated with status 255
mount all: Problem activating swap: /dev/sde1
/dev/sdc1: clean, 201/40697856 files, 2604786/162790314 blocks
/dev/sdc2: clean, 17/40697856 files, 141991259/162790321 blocks
/dev/sdc3: clean, 870/40697856 files, 53137157/162790322 blocks
The disk drive for /home/member/USB_Disk/Disk1 is not ready yet or not present.
Continue to wait, or Press S to skip mounting or M for manual recovery
_

If I skip S, other partitions also give the same problem. I can still boot Ubuntu but without the hard drives, my user session is obviously empty. So this time I pressed M for manual recovery in root mode, but now I'm not sure what to do.

Here are the contents of /etc/fstab:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc          /proc    proc    nodev,noexec,nosuid     0    0

# /dev/sda10
UUID=[...]    /        ext4    errors=remount-ro       0    1
# /dev/sda1
UUID=[...]    /boot    ext4    defaults                0    2
# /dev/sda6
UUID=[...]    /home    ext4    defaults                0    2
# /dev/sda9
UUID=[...]    none     swap    sw,pri=0                0    0

# /dev/sda8
UUID=[...]    /home/member/Data    ext4    defaults    0    2
# /dev/sdb1
UUID=[...]    /home/member/Data2   ext4    users       0    2

# /dev/sdd2
UUID=[...]    /home/member/USB_Disk/Disk1  vfat    users,uid=1001    0    2
# /dev/sdd3
UUID=[...]    /home/member/USB_Disk/Disk2  ext4    users             0    2
# /dev/sdd4
UUID=[...]    /home/user1/Data             ext4    defaults          0    2
# /dev/sdd5
UUID=[...]    /var/www                     ext4    defaults          0    2

# /dev/sdc1
UUID=[...]    /media/Backup1               ext4    defaults          0    2
# /dev/sdc2
UUID=[...]    /media/Backup2               ext4    defaults          0    2
# /dev/sdc3
UUID=[...]    /media/Backup3               ext4    defaults          0    2

/dev/sde1     none            swap    sw,pri=1     0    0
/dev/sdf1     /home/user2     ext3    defaults     0    2
/dev/sdf2     /home/user3     ext3    defaults     0    2

"user3" in the last line is me, so my files are usually located in /dev/sdf2. When I run fsck -f, it tells me that the following disks are mounted. Note that this is a simplification of the output, it actually gives me a warning saying that the system is mounted and I will risk damaging the system, do I want to proceed anyway(y/n)?- to which I press (n). In most cases it then tells me that the disk is mounted:

/dev/sda10 is mounted.
/dev/sda1 is mounted.
/dev/sda6 is mounted.
/dev/sda8 is mounted.
/dev/sdb1 is mounted.

fsck.ext4: Unable to resolve 'UUID=[ID for /dev/sdd3]'
fsck.ext4: Unable to resolve 'UUID=[ID for /dev/sdd4]'
fsck.ext4: Unable to resolve 'UUID=[ID for /dev/sdd5]'
/dev/sdc1 is mounted.

/dev/sdc2 is mounted.
/dev/sdc3 is mounted.

fsck.ext3: No such file or directory while trying to open /dev/sdf1
Possibly non-existent device?
fsck.ext3: No such file or directory while trying to open /dev/sdf2
Possibly non-existent device?

What can I do next? It is of vital importance that I do not erase any data.

biohazard
  • 143

1 Answers1

0

This

fsck.ext3: No such file or directory while trying to open /dev/sdf1
Possibly non-existent device?
fsck.ext3: No such file or directory while trying to open /dev/sdf2
Possibly non-existent device?

tells us that one of the 3 external drives are not present on the system, maybe it has hardware failure (or the USB port where it is plugged in has a failure) or simply corrupted by the force shutdown. You should check the logs for error messages or lsusb to find out which drive is missing/has the problems. Likely it is the /dev/sdd device as the UUID-s of the partitions on that drive are not found:

fsck.ext4: Unable to resolve 'UUID=[ID for /dev/sdd3]'
fsck.ext4: Unable to resolve 'UUID=[ID for /dev/sdd4]'
fsck.ext4: Unable to resolve 'UUID=[ID for /dev/sdd5]'

and

The disk drive for /home/member/USB_Disk/Disk1 is not ready yet or not present.

Because the /dev/sdd device is now missing, all the devices after it gain a lower /dev name, i.e. /dev/sde became /dev/sdd and /dev/sdf became /dev/sde. This can be the cause of this:

swapon: /dev/sde1: read swap header failed: Invalid argument
mountall: swap on /dev/sde1 [1049] terminated with status 255
mount all: Problem activating swap: /dev/sde1

as the /dev/sde1 partition is now not a swap space so it cannot be mounted as such.

And that is why /dev/sdf is missing now.

fsck.ext3: No such file or directory while trying to open /dev/sdf1
Possibly non-existent device?
fsck.ext3: No such file or directory while trying to open /dev/sdf2
Possibly non-existent device?

But this is just speculation, check the external drives or another machine and check the logs, lsusb to find out which one (or ones) have a problem.


Also the fstab you are using is inconsistent. In the beginning of the file you are using UUIDs which are fine, but in the end of the file you switch back to using simple /dev device names. Please stick to the UUID naming scheme and change these lines

/dev/sde1     none            swap    sw,pri=1     0    0
/dev/sdf1     /home/user2     ext3    defaults     0    2
/dev/sdf2     /home/user3     ext3    defaults     0    2

to use UUIDs too, as all the other lines in the fstab. If your fstab were only using UUIDs some of the problems I described above wouldn't happen. (The swap space and the /dev/sdf drive could be mounted.)


@biohazard wrote in the comments that indeed the problem was with /dev/sdd but fortunately not a hardware failure just that drive was powered off. Not having only UUIDs in fstab caused the other problems as I mentioned it above.

falconer
  • 15,334