3

I have external hard drive box(with external power) with 8TB disk inside it. I added it to /etc/fstab as follows:

/dev/sdc2 /big ext4 rw,nosuid,nodev,relatime,nofail,data=ordered 0 0

The disk dosn't mount during boot. And I can't mount it manualy using sudo mount /dev/sdc2 beacuse I don't see the disk in /dev/.

Please advise me, what should I do in order to mount the disk automatically. The disk can't be seen in lsusb neigher.

What I have already tried:

  1. I tried removing nofail keyword. This causes that during boot I get the following:

Welcome to emergency mode! After logging in, type "journalctl -xb" to view system logs, "systemctl reboot" to reboot, "systemctl default" to try again to boot into default mode.

  1. I tried to replace /dev/sdc2 with UUID=..., but it doesn't have any impact.

  2. I tried turning the disk on and off using physical power button on the disk box. - This helped! The disk appeared in /dev, it was mounted automatically and it appeard in lsusb as:

    Bus 004 Device 002: ID 174c:55aa ASMedia Technology Inc. ASM1051E SATA 6Gb/s bridge, ASM1053E SATA 6Gb/s bridge, ASM1153 SATA 3Gb/s bridge

I plan to use the computer with the disk remotely, so I need that it is mounted automatically and not manualy by turingn the switch on and off.

Thanks in advance.

EDIT2: I use the following hardware:

External box AKASA AK-TL3SEB-BK Lokstor X31, 3,5"

HDD Seagate Archive, 3,5", SATAIII, 128MB - 8TB

laptop Lenovo IdeaPad U410

EDIT3: I believe that external box was defective. I did tried to connect the enclosure to USB2.0 and it didn't work at all, I tried to connect the enclosure to other computers and to computer with windows and it didn't work. I thank to @LDJames, for his suggestion in comments, that the enclosure might be broken and for his suggestion to buy new enclosure. I brought new one and everything works perfectly. I marked his answer as accepted and I am very greatful.

2 Answers2

2

It's possible the device isn't available during the boot process. You can address your real concern by having the disk available by adding a script to start it to your /etc/rc.local file... a file which is automatically run after the system comes up.

Just make a script such as /usr/local/bin/mountdrive.sh and add that line to the /etc/rc.local file.

/usr/local/bin/mountdrive.sh:

#!/bin/bash
mount /dev/sdc2

Alternatively, to avoid getting the already mounted error you could use this in your mountdrive.sh file:

#!/bin/bash
mountpoint -q /big && mount /big

Results of testing your fstab entry:

I attached a USB Seagate 4 Gig Drive and used the exact entry and got success. After this I modified the entry to use the UUID in case the drive specification changes. You can get the UUID of your /dev/sda1 partition with:

$ lsblk -o name,mountpoint,label,size,uuid,fstype

This is the modified fstab line that also works:

UUID=2a14ecf1-e4f6-45fb-8cb7-5c5317e3189e /big ext4 rw,nosuid,nodev,relatime,nofail,data=ordered 0 0
L. D. James
  • 25,444
0

If you are looking for mounting during boot the other answer by L. D. James and the subsequent comments are the right way to go. However if you wish to automatically mount the drive whenever possible I.e. whenever it is available you need to do two things

  • Use the auto option in the mount options in fstab

  • Use the device mapped using uuid like this /dev/disks/by-uuid/《device uuid》 This will lead to the device usually being mounted whenever you log in.

Notes:

  • When using an external usb device the sda sdb sdc stuff keeps changing so that method will keep failing frequently.

  • If you keep your external device powered on independent of your laptop it might go into sleep mode to conserve power. That would explain the behavior you are seeing.

Sunny
  • 61