hydra3333
Posts: 286
Joined: Thu Jan 10, 2013 11:48 pm

Pi 2 fstab not mounting usb disk

Tue Feb 10, 2015 11:05 am

Hello.
I have an old model B into which I plug a 4Tb external USB drive.
The build is a few months old, but it works perfectly, mounting it with this entry in /etc/fstab

Code: Select all

UUID=9AF2BF43F2BF2285 /media/USB4TB ntfs-3g auto,rw,uid=1000,gid=1000,umask=000 0 0
the UUID was found by doing these commands

Code: Select all

sudo mkdir /media/USB4TB
sudo chmod 777 /media/USB4TB
sudo mount -t ntfs-3g -o auto,rw,uid=1000,gid=1000,umask=000 /dev/sda1 /media/USB4TB
df -h
ls -l /dev/disk/by-uuid/
I bought a new Pi 2 B+. I plug the same USB drive in, try those same commands and get the identical UUID, and so I copied the UUID line into the /etc/fstab of the Pi 2. I know the manual "mount" command works perfectly as I can see the files on the drive with

Code: Select all

ls -al /media/USB4TB
However when I reboot the Pi2, it ignores the fstab line and does not mount the drive.
A DMESG command does not help, however I noticed an error message at boot time indicating something along the lines unknown UUID.

Help and advice welcomed.

edit: well, well, without explanation or reason a reboot and it suddenly just mounted ! No idea why if didn't on 4 prior reboots over 2 days. Anyone have any ideas ?

hydra3333
Posts: 286
Joined: Thu Jan 10, 2013 11:48 pm

Re: Pi 2 fstab not mounting usb disk

Tue Feb 10, 2015 11:27 am

I waited 10 minutes and rebooted and the dive didn't mount this time.
a DMESG gave this sort of error message:

Code: Select all

[    3.998331] udevd[175]: starting version 175
[    3.999126] usb 1-1.5: new high-speed USB device number 5 using dwc_otg
[    4.100650] usb 1-1.5: New USB device found, idVendor=0bc2, idProduct=3312
[    4.114547] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    4.114559] usb 1-1.5: Product: Expansion Desk
[    4.114569] usb 1-1.5: Manufacturer: Seagate
[    4.114578] usb 1-1.5: SerialNumber: NA4M3K0R
[    4.115846] usb 1-1.5: The driver for the USB controller dwc_otg_hcd does not support scatter-gather which is
[    4.115858] usb 1-1.5: required by the UAS driver. Please try an other USB controller if you wish to use UAS.
[    4.115869] usb-storage 1-1.5:1.0: USB Mass Storage device detected
[    4.128511] usb-storage 1-1.5:1.0: Quirks match for vid 0bc2 pid 3312: 2000000
[    4.128649] scsi host0: usb-storage 1-1.5:1.0
[    4.288344] usbcore: registered new interface driver uas
[    5.129996] scsi 0:0:0:0: Direct-Access     Seagate  Expansion Desk   0740 PQ: 0 ANSI: 6
[    5.147809] sd 0:0:0:0: [sda] Spinning up disk...
[    5.174585] sd 0:0:0:0: Attached scsi generic sg0 type 0
and I can't do a ls -al /media/USB4TB and see any files.

I wonder what is happening ? The old Pi B gives reliable mount results with the same drive.

User avatar
RaTTuS
Posts: 10828
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Pi 2 fstab not mounting usb disk

Tue Feb 10, 2015 11:35 am

how is it powered
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

shadzik
Posts: 3
Joined: Tue Feb 10, 2015 4:59 pm

Re: Pi 2 fstab not mounting usb disk

Tue Feb 10, 2015 5:02 pm

Hi,

I've noticed the same behaviour on my Raspberry Pi 2, with the current Raspbian system.
It worked fine on my RPI 1.

Now I have to mount my USB drive manually after each reboot or in rc.local which kind of sucks.

hydra3333
Posts: 286
Joined: Thu Jan 10, 2013 11:48 pm

Re: Pi 2 fstab not mounting usb disk

Wed Feb 11, 2015 2:57 am

RaTTuS wrote:how is it powered
The 4TB external USB is powered by it's own full power supply.
The Pi2 is powered by a 5W 2A supply used to power the old model B mentioned above.

Given shadzik mentioned the same issue, I guesss it is an issue with the current Raspbian version ...

How to I report the issue ?

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Pi 2 fstab not mounting usb disk

Wed Feb 11, 2015 4:08 am

Do you have busybox installed?

Did you try this way in fstab?
/dev/disk/by-uuid/9AF2BF43F2BF2285

beta-tester
Posts: 1562
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: Pi 2 fstab not mounting usb disk

Wed Feb 11, 2015 6:04 am

hydra3333 wrote: the UUID was found by doing these commands

Code: Select all

sudo mkdir /media/USB4TB
sudo chmod 777 /media/USB4TB
sudo mount -t ntfs-3g -o auto,rw,uid=1000,gid=1000,umask=000 /dev/sda1 /media/USB4TB
df -h
ls -l /dev/disk/by-uuid/
you can get the UUIDs way faster by this command:

Code: Select all

sudo blkid
However when I reboot the Pi2, it ignores the fstab line and does not mount the drive.
A DMESG command does not help, however I noticed an error message at boot time indicating something along the lines unknown UUID
in your fstab file, maybe you can try to use the label of the USB HDD like

Code: Select all

LABEL="myUSB-HDD" ...
BTW: does it mount after booting, when you type in the following command?

Code: Select all

sudo mount -a
... if not, then the fstab is not correct i guess
{ I only give negative feedback }
RPi B (256MB), B (512MB), B+, ZeroW; 2B; 3B, 3B+; 4B (4GB)

hydra3333
Posts: 286
Joined: Thu Jan 10, 2013 11:48 pm

Re: Pi 2 fstab not mounting usb disk

Wed Feb 11, 2015 8:49 am

beta-tester wrote:BTW: does it mount after booting, when you type in the following command?

Code: Select all

sudo mount -a
... if not, then the fstab is not correct i guess
Yes, "sudo mount -a" successfully mounts it since a "ls -al /media/USB4TB" then successfully shows me files on the drive.

I just saw the boot message again and it is

Code: Select all

Mounting local file systems ... ntfs-3G : Failed to access volume "UUID=9AF2BF43F2BF2285" : no such file or directory
just fyi, the USB drive is not powered off between reboots (out of 5 or 6 boots, so far it seemed to mount OK once).
beta-tester wrote:in your fstab file, maybe you can try to use the label of the USB HDD like

Code: Select all

LABEL="myUSB-HDD" ...
OK I will try that.

hydra3333
Posts: 286
Joined: Thu Jan 10, 2013 11:48 pm

Re: Pi 2 fstab not mounting usb disk

Wed Feb 11, 2015 8:52 am

ktb wrote:Do you have busybox installed?
Did you try this way in fstab?
/dev/disk/by-uuid/9AF2BF43F2BF2285
busybox not installed, and I will try that in fstab, thanks.

edit:the same result:

Code: Select all

Mounting local file systems ... ntfs-3G : Failed to access volume "/dev/disk/by-uuid/9AF2BF43F2BF2285" : no such file or directory
Then doing a "sudo mount -a" successfully mounts it since a "ls -al /media/USB4TB" then successfully shows me files on the drive...
fyi, no power-off involved - a simple "sudo reboot" so it may not be related to waiting for USB drive hardware to initialize.

leigh2
Posts: 1
Joined: Wed Feb 11, 2015 9:14 am

Re: Pi 2 fstab not mounting usb disk

Wed Feb 11, 2015 9:28 am

I'm also having this problem with an ext4 formatted externally powered HDD.
no luck using

Code: Select all

LABEL="WD1021"  /media/extHDD   ext4    defaults          0       0
or UUID or /dev/sda in fstab

but a manual

Code: Select all

sudo mount -a
mounts the drive fine

beta-tester
Posts: 1562
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: Pi 2 fstab not mounting usb disk

Wed Feb 11, 2015 9:33 am

then i guess it is more an issue of the new kernel for the RPi2...
maybe an event at plugging an USB disk is not fired or not handled in the right way or the file system driver are loaded at an other time than on the older kernel :?
{ I only give negative feedback }
RPi B (256MB), B (512MB), B+, ZeroW; 2B; 3B, 3B+; 4B (4GB)

shadzik
Posts: 3
Joined: Tue Feb 10, 2015 4:59 pm

Re: Pi 2 fstab not mounting usb disk

Wed Feb 11, 2015 9:42 am

beta-tester wrote:then i guess it is more an issue of the new kernel for the RPi2...
maybe an event at plugging an USB disk is not fired or not handled in the right way or the file system driver are loaded at an other time than on the older kernel :?
Yes, could be related to the 3.18.x (tested with .5 and .6, both don't mount the USB drive automatically) kernel for ARMv7.
The one for ARMv6 seems to work just fine.
Could be also something related to udev.

lekkerduidelijk
Posts: 1
Joined: Wed Feb 11, 2015 8:05 pm

Re: Pi 2 fstab not mounting usb disk

Wed Feb 11, 2015 8:07 pm

Same here. I actually use the same Seagate 4TB disc with a Pi 2.

pirullo
Posts: 3
Joined: Wed Feb 11, 2015 9:12 pm

Re: Pi 2 fstab not mounting usb disk

Wed Feb 11, 2015 9:21 pm

Same here.

/etc/fstab doesn't work

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6504
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Pi 2 fstab not mounting usb disk

Wed Feb 11, 2015 9:33 pm

Can we confirm if this is a 3.18 issue, or a Pi 2 issue?

i.e. can someone with the problem try on a Pi 1 with 3.18 kernel and report if that works reliably?

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5066
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Pi 2 fstab not mounting usb disk

Wed Feb 11, 2015 9:39 pm

Can you also shout up if you have seen this problem without using either LABEL= or UUID= at the start of your /etc/fstab line? The error message suggests that the prefix may be being misinterpreted.

hydra3333
Posts: 286
Joined: Thu Jan 10, 2013 11:48 pm

Re: Pi 2 fstab not mounting usb disk

Wed Feb 11, 2015 9:58 pm

PhilE wrote:Can you also shout up if you have seen this problem without using either LABEL= or UUID= at the start of your /etc/fstab line? The error message suggests that the prefix may be being misinterpreted.
this didn't work

Code: Select all

/dev/disk/by-uuid/9AF2BF43F2BF2285

pirullo
Posts: 3
Joined: Wed Feb 11, 2015 9:12 pm

Re: Pi 2 fstab not mounting usb disk

Wed Feb 11, 2015 10:09 pm

dom wrote:Can we confirm if this is a 3.18 issue, or a Pi 2 issue?

i.e. can someone with the problem try on a Pi 1 with 3.18 kernel and report if that works reliably?
I can confirm it's a PI2 issue.

Here you can find other infos
https://github.com/raspberrypi/linux/issues/824

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6504
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Pi 2 fstab not mounting usb disk

Wed Feb 11, 2015 11:08 pm

Seems adding "rootdelay=5" to end of cmdline.txt is our best solution to this. (Increase to 10 if that doesn't work).

Seems to be a general linux issue if boot is faster than USB detection time.
Pi1 took long enough to boot that the USB was there when it was time to mount, but that's not guaranteed with Pi2.

hydra3333
Posts: 286
Joined: Thu Jan 10, 2013 11:48 pm

Re: Pi 2 fstab not mounting usb disk

Thu Feb 12, 2015 11:10 am

Thank you.

EvanL
Posts: 2
Joined: Thu Oct 16, 2014 12:49 pm

Re: Pi 2 fstab not mounting usb disk

Thu Feb 12, 2015 6:49 pm

dom wrote:Seems adding "rootwait=5" to end of cmdline.txt is our best solution to this. (Increase to 10 if that doesn't work).

Seems to be a general linux issue if boot is faster than USB detection time.
Pi1 took long enough to boot that the USB was there when it was time to mount, but that's not guaranteed with Pi2.
Thanks for the info. Regarding the command, did you mean "rootdelay=5" instead of rootwait?

hydra3333
Posts: 286
Joined: Thu Jan 10, 2013 11:48 pm

Re: Pi 2 fstab not mounting usb disk

Sat Feb 14, 2015 1:19 am

EvanL wrote:
dom wrote:Seems adding "rootwait=5" to end of cmdline.txt is our best solution to this. (Increase to 10 if that doesn't work).

Seems to be a general linux issue if boot is faster than USB detection time.
Pi1 took long enough to boot that the USB was there when it was time to mount, but that's not guaranteed with Pi2.
Thanks for the info. Regarding the command, did you mean "rootdelay=5" instead of rootwait?
rootwait was already at the end of the line in /boot/cmdline.txt
so I tried changing it to "rootwait=5" and after that the Pi2 would not finish booting any more.
I had to re-image the SD card and then try adding "rootdelay=5".
That seems to work and it boots OK and the USB drive is mounted per fstab entry.
Thanks.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6504
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Pi 2 fstab not mounting usb disk

Sat Feb 14, 2015 12:40 pm

EvanL wrote:Thanks for the info. Regarding the command, did you mean "rootdelay=5" instead of rootwait?
Thanks. Corrected now.

shadzik
Posts: 3
Joined: Tue Feb 10, 2015 4:59 pm

Re: Pi 2 fstab not mounting usb disk

Mon Feb 16, 2015 9:48 am

Just FYI, after upgrading to Jessie, all those problems went away, even without rootdelay=XX (which somehow didn't work for me, even when I set it to 30 seconds).

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6504
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Pi 2 fstab not mounting usb disk

Mon Feb 16, 2015 11:43 am

shadzik wrote:Just FYI, after upgrading to Jessie, all those problems went away, even without rootdelay=XX (which somehow didn't work for me, even when I set it to 30 seconds).
Thanks for reporting. That's likely to be due to the move to systemd for running startup scripts I believe it handles parallelism and dependencies better.

The good news is that moving to jessie as standard is something we are planning.

Return to “Troubleshooting”