fstab mount fails on boot but works with mount -a [workaround provided]

scyta

New Member
Feb 14, 2024
1
3
3
Hi everyone. Very noob here, first time linux.
On my proxmox host , in fstab i'm having this line "/dev/vg_4tb/lv_4tb /mnt/4tb_data ext4 defaults 0 0"
I was testing this with 'mount -a', and it mounts properly,
BUT
on reboot my system doesn't boot with these error messages:
1 LOGICAL V. IN VG "VG_4TB" NOW ACTive. > this one i suspect that the system can see my device
but then next:
timed out waiting for device dev_vg_4tb...
Dependency failed for mnt-4tb_data.mount
Dependency failed for local-fs.target
no matter what i do.
after all i have created a script (with the help of chatgpt) to mount the drive manually after boot, but i don't like this idea on long term.
Could you help me out?

---------------------------------------------SOLUTION------------------------------------------
It seems that many people have this problem in this forum, weird that there is no official solution (a least I haven't found any)
My idea is to create a service, then run this service at sartup. In my case my drive is 4tb, I will adjust the naming accordingly

First create the service:
nano /etc/systemd/system/data4tb.service

Then inside of this file:
[Unit]
Description=Mount 4TB Data

[Service]
Type=oneshot
ExecStart=/bin/mount /dev/4tb_vg/4tb_data /mnt/data4tb

[Install]
WantedBy=multi-user.target

>>save / close
systemctl daemon-reload

>>enable the service
systemctl enable data4tb.service

hope this help someone
 
Last edited:
I was messing around with this a bit more and I found that by mounting the drive in /etc/fstab with UUID rather than the label or path, it works. I originally figured it shouldn't make a difference since the path wasn't changing after reboots, but UUID mounting just seems to be more reliable in general. Might be worth trying @scyta
 
Hi everyone. Very noob here, first time linux.
On my proxmox host , in fstab i'm having this line "/dev/vg_4tb/lv_4tb /mnt/4tb_data ext4 defaults 0 0"
I was testing this with 'mount -a', and it mounts properly,
BUT
on reboot my system doesn't boot with these error messages:
1 LOGICAL V. IN VG "VG_4TB" NOW ACTive. > this one i suspect that the system can see my device
but then next:
timed out waiting for device dev_vg_4tb...
Dependency failed for mnt-4tb_data.mount
Dependency failed for local-fs.target
no matter what i do.
after all i have created a script (with the help of chatgpt) to mount the drive manually after boot, but i don't like this idea on long term.
Could you help me out?

---------------------------------------------SOLUTION------------------------------------------
It seems that many people have this problem in this forum, weird that there is no official solution (a least I haven't found any)
My idea is to create a service, then run this service at sartup. In my case my drive is 4tb, I will adjust the naming accordingly

First create the service:
nano /etc/systemd/system/data4tb.service

Then inside of this file:
[Unit]
Description=Mount 4TB Data

[Service]
Type=oneshot
ExecStart=/bin/mount /dev/4tb_vg/4tb_data /mnt/data4tb

[Install]
WantedBy=multi-user.target

>>save / close
systemctl daemon-reload

>>enable the service
systemctl enable data4tb.service

hope this help someone
I registered only for say... THANK YOU!!!!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!