Mounting Drives

There’s some really weird stuff going on with my system and I’m going nuts trying to get it to work right…

I have four SSD drives installed in my system.

sda contains Windows.
sdb is the drive with the usual uefi, swap, root and home partitions.
sdc has three partitions for data.
sdd has four partitions for data.

If I add the partitions in /etc/fstab and reboot, the system will not come up and I need to give it the root password and use vim to comment out the partitions on sdc and sdd and reboot.

If I add the data partitions back, one at a time, I can get it to reboot however there is a 3 minute udev process during boot each time and the system is unstable until I again do a cold reboot. When I finally get to the last partition, I can’t get it to boot at all.

So, I changed the settings in /etc/fstab and now, after three cold boots. the system comes up just fine but without the data drives mounted. I can use Konsole and mount the partitions without problems.

Here is /etc/fstab:

bart@UNIVAC:~> cat /etc/fstab
# This is the main drive for UNIVAC  Currently sdb
LABEL=LEAP-SWAP                            swap                swap  defaults           0  0
UUID=59d8fa9a-61b3-4bca-8793-77b51ad832df  /                   ext4  defaults           0  1
UUID=2199df87-4e56-4534-9f44-08da582bfcab  /home               ext4  data=ordered       0  2
LABEL=UEFI                                 /boot/efi           vfat  codepage=437       0  2

# This is the second drive  Currently sdc
UUID=566979f5-22dd-49c3-90ca-7a13d9ddbab5  /mnt/Videos          ext4  noauto,nofail,user,data=ordered  0  2
UUID=8dd702f5-1277-4232-b2e7-b9d6f51f810c  /mnt/Pictures        ext4  noauto,nofail,user,data=ordered  0  2
UUID=fdb7bee5-4e34-4596-b1fd-c089f334f5de  /mnt/Spare-0         ext4  noauto,nofail,user,data=ordered  0  2

# This is the third drive  Currently sdd
UUID=fda7c74b-4c4c-4404-80cf-896d689ac830  /mnt/Modelrailroad   ext4  noauto,nofail,user,data=ordered  0  2
UUID=84d13a86-54bf-4de9-b1b6-8e24e7c887fc  /mnt/Develop         ext4  noauto,nofail,user,data=ordered  0  2
UUID=5ffe3a27-2774-442a-a07b-afcd45618d7b  /mnt/Spare-1         ext4  noauto,nofail,user,data=ordered  0  2
UUID=c2396264-a9d4-46b8-93e1-ea6ea80c69b3  /mnt/Spare-2         ext4  noauto,nofail,user,data=ordered  0  2

# This is the drive on the Server.
Server:/home/common                        /mnt/Server          nfs   noauto,nofail,user               0  0
bart@UNIVAC:~> 

Now, I need to automate the mount process after KDE is completely up, so I created a .desktop file and installed it in /etc/xdg/autostart.

bart@UNIVAC:~> cat /etc/xdg/autostart/DriveMount.desktop 
[Desktop Entry]
Comment[en_US]=
Comment=
Exec=mount Videos
Exec=mount Pictures
Exec=mount Spare-0
Exec=mount Modelrailroad
Exec=mount Develop
Exec=mount Spare-1
Exec=mount Spare-2
Exec=mount Server
GenericName[en_US]=
GenericName=
MimeType=
Name[en_US]=DriveMount
Name=DriveMount
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=
X-KDE-autostart-after=panel
bart@UNIVAC:~> 

It mounts only the last drive in the list. Are you allowed only one exec= statement in a .desktop file?

The sdb site suggests putting an executable script in ~/.kde/Autostart however this directory doesn’t exist. So I did a find for ?utostart and found three potential places: ~/.config/autostart, /usr/share/autostart and /etc/xdg/autostart.

Should I create an executable script, place it somewhere like /usr/bin and call it from the .desktop file in /etc/xdg/autostart?

The man page for fstab says the order of the entries is important. Could I have one wrong?

What is going on with that 3 minute udev start process that takes place when I boot and why is my system unstable for two or three cold boots after?

All suggestions are more than welcome, they’re encouraged!

A couple of other things. I replaced the main drive (sdb) with a new drive and did a fresh install and configuration, saving only the data in /home. the drive sdc had been in use for some time, so I replaced it as well. The processor in this machine is an Intel 8 core, 16 thread thingy so I wonder if there isn’t some race condition during boot as there’s a lot of stuff going on at the same time.

Bart

Shouldn’t you concentrate first on why you have problems at boot with the the /etc/fstab entries to find out what is the problem instead of digging yourself deeper and deeper into by-passes?

For tyhat we need more information then only the contents of /etc/fstab because you use LABEL and UUID identifications of which we can not see what they are (your comment that they are on sda, etc. is of course only your interpretation, which may be correct, but hey we are searching for a computer problem thus we need computer facts).

What would help is:

ls -l /dev/disk/by-label
ls -l /dev/disk/by-uuid

Also, is this the fstab at the moment you have boot problems (because I see noauto options, which should prevent to mounting of those at boot).

And, did you check what happens at boot (e.g. by hitting Esc to see what happnes, or cheking the logs)?

You are, of course, quite correct. I have fought this mess with no success until I finally gave up and decided to try a different track.

For tyhat we need more information then only the contents of /etc/fstab because you use LABEL and UUID identifications of which we can not see what they are (your comment that they are on sda, etc. is of course only your interpretation, which may be correct, but hey we are searching for a computer problem thus we need computer facts).

What would help is:

ls -l /dev/disk/by-label
ls -l /dev/disk/by-uuid

Here they are:

bart@UNIVAC:~> ls -l /dev/disk/by-label
total 0
lrwxrwxrwx 1 root root 10 Nov 20 11:40 Develop -> ../../sdd2
lrwxrwxrwx 1 root root 10 Nov 20 11:40 LEAP15-2-HOME -> ../../sdb4
lrwxrwxrwx 1 root root 10 Nov 20 11:40 LEAP15-2-ROOT -> ../../sdb3
lrwxrwxrwx 1 root root 10 Nov 20 11:40 LEAP-SWAP -> ../../sdb2
lrwxrwxrwx 1 root root 10 Nov 20 11:40 Modelrailroad -> ../../sdd1
lrwxrwxrwx 1 root root 10 Nov 20 11:40 Pictures -> ../../sdc2
lrwxrwxrwx 1 root root 10 Nov 20 11:40 Recovery -> ../../sda1
lrwxrwxrwx 1 root root 10 Nov 20 11:40 Spare-1 -> ../../sdd3
lrwxrwxrwx 1 root root 10 Nov 20 11:40 Spare-2 -> ../../sdd4
lrwxrwxrwx 1 root root 10 Nov 20 11:40 UEFI -> ../../sdb1
lrwxrwxrwx 1 root root 10 Nov 20 11:40 Videos -> ../../sdc1

and

bart@UNIVAC:~> ls -l /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 10 Nov 20 11:40 0920b6df-385f-4e4d-80ca-7dd5552d157d -> ../../sdb2
lrwxrwxrwx 1 root root 10 Nov 20 11:40 16125B81125B64B1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Nov 20 11:40 2199df87-4e56-4534-9f44-08da582bfcab -> ../../sdb4
lrwxrwxrwx 1 root root 10 Nov 20 11:40 59d8fa9a-61b3-4bca-8793-77b51ad832df -> ../../sdb3
lrwxrwxrwx 1 root root 10 Nov 20 11:40 5ffe3a27-2774-442a-a07b-afcd45618d7b -> ../../sdd3
lrwxrwxrwx 1 root root 10 Nov 20 11:40 645B-E77D -> ../../sda2
lrwxrwxrwx 1 root root 10 Nov 20 11:40 789d248e-9a13-47a5-b6a9-578b1d7efd0d -> ../../sdc1
lrwxrwxrwx 1 root root 10 Nov 20 11:40 84d13a86-54bf-4de9-b1b6-8e24e7c887fc -> ../../sdd2
lrwxrwxrwx 1 root root 10 Nov 20 11:40 8dd702f5-1277-4232-b2e7-b9d6f51f810c -> ../../sdc2
lrwxrwxrwx 1 root root 10 Nov 20 11:40 B440666740663072 -> ../../sda5
lrwxrwxrwx 1 root root 10 Nov 20 11:40 BCB25D5BB25D1AEA -> ../../sda4
lrwxrwxrwx 1 root root 10 Nov 20 11:40 c2396264-a9d4-46b8-93e1-ea6ea80c69b3 -> ../../sdd4
lrwxrwxrwx 1 root root 10 Nov 20 11:40 D40E-14F8 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Nov 20 11:40 fda7c74b-4c4c-4404-80cf-896d689ac830 -> ../../sdd1
lrwxrwxrwx 1 root root 10 Nov 20 11:40 fdb7bee5-4e34-4596-b1fd-c089f334f5de -> ../../sdc3
bart@UNIVAC:~> 

All of the entries marked as sdaX are the Windows drive. While I’m at it, the reason I have mixed the fstab entries with LABEL and UUID is because if I use the shown UUID for the uefi and swap partitions sbd1 ans sbd2), the machine will not boot!

Also, is this the fstab at the moment you have boot problems (because I see noauto options, which should prevent to mounting of those at boot).

No, it is not. The machine will boot and run properly with /etc/fstab in the configuration I quoted. If I remove the noauto and nofail entries, it will not boot. With htis configuration, I can boot and, using Konsole issue a mount command for each of the unmounted partitions, one at a time, and they all mount without problems.

And, did you check what happens at boot (e.g. by hitting Esc to see what happnes, or checking the logs)?

I have my system set to verbose so I can watch the boot process. The entry about the udev process, the three minute one, seems to be where I could find something but I can’t find a log file that relates to it.

Bart

your UUID’s don’t match

UUID=566979f5-22dd-49c3-90ca-7a13d9ddbab5 /mnt/Videos ext4 noauto,nofail,user,data=ordered 0 2

should be this
UUID=789d248e-9a13-47a5-b6a9-578b1d7efd0d → …/…/sdc1

This just for one test.

If it cannot find the UUID in /etc/fstab the boot will never continue.

I bet money those are the UUID’s of the old SSD and not the new one.

AHA!

And I know how that happened. I did a mkfs on that drive because I copied some stuff to the wrong spot and it was easier to just wipe the drive and restore. At the time I thought that the UUID was like a mac address. I didn’t know it was generated when you create the file system.

That must have caused that udev process that went on and on and finally just gave up.

I’ll fix that right now!

Thanks! Thanks a bunch!

Bart

OK, I see that, while I slept, @larryr has found a major problem!

This shows again that when you would have asked here about your initial problem, it would most probably have been solved much earlier. IMHO it is typical case of http://www.catb.org/~esr/faqs/smart-questions.html#goal .

You you learned two things:

  • while trying all sorts of things in a search for a problem solution can be interesting and might teaching you things, it is still the original problem that must be solved and that is the one to ask help for;
  • UUIDs are part of a file system, not of a partition and that is one of my "ceterum censeo"s: a file system is the contents of something and that “something” might be a partition, which is a container., they are NOT the same.

BTW, to make things more confusing, GPT also defines uuid’s for partitions, you can use them also, they are in /dev/disk/by-partuuid and can also be seen with lsblk. And GPT also has partition labels (/dev/disk/partlabel). All can be used as device in mounting.

And, as you may understand now, the part-uuid will not change when you create a new file system in it (you found already out that the uuid does). The part-uuid will change however if you change that partition in the disks partition table.

Thank you both for your help.

I have corrected the bad uuid in fstab, removed to noauto and nofail entries and all works as it should! YAY!

I do feel a little foolish though. I should have been more thorough in looking at my files. After all, Larryr found the problem right away when I missed it over and over.

But I learned something! And that’s a good thing.

Bart

Yes, and Henk guided you on posting relevant information to start with! :wink:

But I learned something! And that’s a good thing.

Bart

Resolving an issue and learning from it is always a good thing!

I concur with that. We all do not see sometimes what all others see. That is human. The forums is a good place for such things. So do not feel foolish, but be sure that we all love to help in such cases, special when the OP, like you did, then shows he learned something.

Always use UUIDs and verify them:

**erlangen:~ #** grep /HDD /etc/fstab                              
UUID=f5177cae-4082-44ed-9471-b99030f06866  **/HDD**                    ext4   noauto                        0  0 
**erlangen:~ #** blkid --uuid f5177cae-4082-44ed-9471-b99030f06866 
/dev/sda4 
**erlangen:~ #**

:wink:

Linus’ law : “given enough eyeballs, all bugs are shallow”.