XU4 drive mounting problem

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

XU4 drive mounting problem

Post by johnvick »

This is the relevant section of FSTAB:

#Internal Drives---------------------------------------------------
proc /proc proc defaults 0 0

UUID=96C3-9298 /boot vfat defaults,noatime,discard 0 2
UUID=ff31ef97-52c2-4ac4-95c8-20e0d3ca064f / ext4 defaults,noatime,discard 0 1 #SSD
UUID=923cb99c-a4fd-47e7-99ca-eb260494eea7 /mnt/usb_1 ext4 defaults,noatime,nofail 0 0 #USB flash

The USB flash does not mount after a power off and power back on. After mounting it with mount -a and rebooting, it mounts.

I've got round this by using a cron @reboot job but I'm curious to know why this is happening?
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: XU4 drive mounting problem

Post by Fourdee »

johnvick wrote:The USB flash does not mount after a power off and power back on. After mounting it with mount -a and rebooting, it mounts.
Hi John,

It could be:
- Drive is not ready when systemD attempts mount.
- Drive not provided sufficient power.

Either way, you can check the status of mounts after a reboot in SystemD by running:

Code: Select all

systemctl status *.mount
Check for a failed state.

As a comparison, this is what I get on XU4:

Code: Select all

root@DietPi-XU4:~# systemctl status *.mount | grep usb_1
● mnt-usb_1.mount - /mnt/usb_1
    Where: /mnt/usb_1
  Process: 547 ExecMount=/bin/mount -n /dev/sda1 /mnt/usb_1 -t ext4 -o defaults,noatime,nofail (code=exited, status=0/SUCCESS)
Jun 25 12:52:13 DietPi-XU4 systemd[1]: Mounted /mnt/usb_1.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

Re: XU4 drive mounting problem

Post by johnvick »

Hi Fourdee,

Thanks again for your input. I killed the cron job, shut down, restarted. The USB drive now mounts fine - I replaced the stock power supply with a 6A one yesterday so this must be the reason it now works.

John
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: XU4 drive mounting problem

Post by Fourdee »

johnvick wrote:Hi Fourdee,

Thanks again for your input. I killed the cron job, shut down, restarted. The USB drive now mounts fine - I replaced the stock power supply with a 6A one yesterday so this must be the reason it now works.

John
Excellent, good to hear :) I went for a 8A on mine lol.
Curious, is the drive SSD or platter based?
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

Re: XU4 drive mounting problem

Post by johnvick »

The main drive is an SSD but the drive that didn't mount was a 16 GB USB 3.0 flash.
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: XU4 drive mounting problem

Post by Fourdee »

johnvick wrote:The main drive is an SSD but the drive that didn't mount was a 16 GB USB 3.0 flash.
Ah, are you using putting both the SSD and USB flash into the USB3.0 sockets?

Be interesting to know what the Amp requirements are for each of those, and, if they both get the required power from a single 900ma USB3.0 hub on the XU4.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

Re: XU4 drive mounting problem

Post by johnvick »

It's all working fine - the flash drive is only in use for a brief period daily to receive a backup.
Post Reply