Score:0

Unable to auto mount a data disk from /etc/fstab but mounts with mount -a command

sb flag

Here are the commands I ran:

~$ lsblk
NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
loop0     7:0    0 63.3M  1 loop /snap/core20/1852
loop1     7:1    0 49.9M  1 loop /snap/snapd/18596
loop2     7:2    0 91.9M  1 loop /snap/lxd/24061
sda       8:0    0   30G  0 disk
├─sda1    8:1    0 29.9G  0 part /
├─sda14   8:14   0    4M  0 part
└─sda15   8:15   0  106M  0 part /boot/efi
sdb       8:16   0   75G  0 disk
└─sdb1    8:17   0   75G  0 part /mnt
sdc       8:32   0  128G  0 disk
└─sdc1    8:33   0  128G  0 part

as you see, sdc1 is not mounted then I run

dev-mio-admin@mio-vm:~$ sudo mount -a

and

dev-mio-admin@mio-vm:~$ lsblk

and we can see sdc1 is mounted to /mnt/disk1

NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
loop0     7:0    0 63.3M  1 loop /snap/core20/1852
loop1     7:1    0 49.9M  1 loop /snap/snapd/18596
loop2     7:2    0 91.9M  1 loop /snap/lxd/24061
sda       8:0    0   30G  0 disk
├─sda1    8:1    0 29.9G  0 part /
├─sda14   8:14   0    4M  0 part
└─sda15   8:15   0  106M  0 part /boot/efi
sdb       8:16   0   75G  0 disk
└─sdb1    8:17   0   75G  0 part /mnt
sdc       8:32   0  128G  0 disk
└─sdc1    8:33   0  128G  0 part /mnt/disk1

Here is the line in my /etc/fstab file

UUID=1c0adda6-1cc1-450d-89ee-76d26d384b13  /mnt/disk1   ext4   defaults   0 1

Why wouldn't it get attached automatically?

Thanks beforehand.

mook765 avatar
cn flag
Why would you use `/mnt/disk1` as mountpoint for one partition while using `/mnt` as mountpoint for another partition? Maybe `sdc1` was mounted on `/mnt/disk1` during boot but the mount was superseeded then by mounting `sbd1` on `/mnt`?
Score:1
sb flag

It seems that you are mounting /mnt and then /mnt/disk1 which are different drives. Sometimes it appears /mnt mounts first and then /mnt/disk1 second. However, in some cases it’s trying to mount /mnt/disk1 which fails.  So I changed the mount point to /data/disk1 and all works fine now.

Thanks @mook765

ar flag
It is a good practice to make different folders inside `/mnt/` as different mount points to different disks/partitions and not use `/mnt/` as a mount point. Just as it is a good practice not to keep your documents directly like this: `C:\My_Resume.docx`.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.