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.

2

1 Answer 1

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.

6
  • Thanks a lot. I do not have another linux machine. My boss has said I cannot bring my own linux from home nor ask the people next door, and suggested I connect the hard drive to one of our desktop MAC computers. I tried to explain that the ext3/ext4 format cannot be read on Mac, but they wouldn't have it, saying we can remote access from the Mac so why can't connect the disk directly. (very hard to explain these things to an angry boss). I need to find a way to mount these disks without connecting them to another computer and without losing any data...
    – biohazard
    Jan 24, 2014 at 6:54
  • @biohazard Then do it on that machine. First I would check lsusb. Does all the drives shown there? Then do an lsblk, how many and which drives/parititons shown? Also sudo parted -l will print out more info. Just find out what drives/partitions present and what is there current name, and what are missing. After you have the missing drive, run tail -f /var/log/syslog (this will show changes in the log live) and while it is running I would try connecting that drive to another port if it shows up there or error messages are printed to the log when connected.
    – falconer
    Jan 24, 2014 at 7:14
  • @biohazard Also even if the Mac cannot access the partition for reading/writing but it could show that the drive at least shows up.
    – falconer
    Jan 24, 2014 at 7:15
  • I found out what the problem was. The power for one of the hard drives (/dev/sdd) was shut off (phew). I'll make sure to change the last three lines to UUID. Thanks a lot!!
    – biohazard
    Jan 24, 2014 at 7:49
  • @biohazard I'm happy it wasn't a hardware failure. And yes, change those to UUIDs and next time you will have much less problems in these situations. :)
    – falconer
    Jan 24, 2014 at 7:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .