User avatar
makem2
Posts: 233
Joined: Tue Jul 02, 2013 9:12 am
Location: Essex
Contact: Website

Trailing underscores on USB drive names SOLVED

Thu Oct 23, 2014 10:04 am

I have 2 1T USB hard drives attached to my pi and they were mounted as HDD1 and HDD2. Both drives are formatted ext4 and each has only one directory, "shares".

They are mounted at each boot by an fstab entry:

Code: Select all

UUID=86D8F0FED8F0ED75 /media/HDD1 ext4  noatime 0 0
UUID=4A7E9DD27E9DB6E3 /media/HDD2 ext4  noatime 0 0
For some reason unkown to me they have acquired a trailing underscore and are now show as HDD1_ and HDD2_ and must be referred to as such in any operation..

I think the operating system would encounter a, "If xxxxx then add underscore to the drive name(s)"

Can anyone enlighten me as to what the "xxxxx" condition could be?

I see many posts about this but none that I can find answer this question.
Last edited by makem2 on Fri Oct 24, 2014 3:57 pm, edited 1 time in total.

User avatar
lmarmisa
Posts: 1251
Joined: Thu Feb 14, 2013 2:22 am
Location: Jávea, Spain

Re: Trailing underscores on USB drive names

Thu Oct 23, 2014 12:12 pm

Maybe those usb drives were automatically mounted at startup and the system created dynamically two alternative folders (adding a trailing underscore to the labels) because the folders /media/HDD1 and /media/HDD2 already existed. If automount option is enabled, you should not use /etc/fstab.

Are you using raspbian, openelec or other distro?.

Anyway, the entries defined on the file /etc/fstab are not changed in any way while the system mounts the drives. Therefore, fstab is not the cause of your trailing underscores.

Try this command and check where the usb devices are been mounted:

Code: Select all

mount | grep HDD
If they are mounted on /media/HDD1_ and /media/HDD2_ try these commands:

Code: Select all

sudo umount /media/HDD1_ /media/HDD2_
sudo mount -a

User avatar
DougieLawson
Posts: 37073
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Trailing underscores on USB drive names

Thu Oct 23, 2014 12:24 pm

It's probably an annoying feechur of your automouter. The most likely condition will be "if /media/FOO already exists create /media/FOO_".
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

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

Re: Trailing underscores on USB drive names

Thu Oct 23, 2014 12:36 pm

maybe you can try to give your ext4 filesystems a label HDD1 and the other HDD2 with

Code: Select all

e2label /dev/sdX HDD1
e2label /dev/sdY HDD2
(where you have to replace sdX and sdY with your devicenames)

and then use these labels in the fstab to identify your mount points

Code: Select all

LABEL=HDD1  /media/HDD1  ext4  noatime  0  0
LABEL=HDD2  /media/HDD2  ext4  noatime  0  0
... maybe that makes the difference.
{ I only give negative feedback }
RPi B (256MB), B (512MB), B+, ZeroW; 2B; 3B, 3B+; 4B (4GB)

DirkS
Posts: 10127
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Trailing underscores on USB drive names

Thu Oct 23, 2014 12:44 pm

beta-tester wrote:maybe you can try to give your ext4 filesystems a label HDD1 and the other HDD2 with

Code: Select all

e2label /dev/sdX HDD1
e2label /dev/sdY HDD2
(where you have to replace sdX and sdY with your devicenames)

and then use these labels in the fstab to identify your mount points

Code: Select all

LABEL=HDD1  /media/HDD1  ext4  noatime  0  0
LABEL=HDD2  /media/HDD2  ext4  noatime  0  0
... maybe that makes the difference.
OP is using the UUID and I don't think switching to labels will make a difference...

Gr.
Dirk.

User avatar
makem2
Posts: 233
Joined: Tue Jul 02, 2013 9:12 am
Location: Essex
Contact: Website

Re: Trailing underscores on USB drive names

Thu Oct 23, 2014 12:46 pm

lmarmisa wrote:Maybe those usb drives were automatically mounted at startup and the system created dynamically two alternative folders (adding a trailing underscore to the labels) because the folders /media/HDD1 and /media/HDD2 already existed. If automount option is enabled, you should not use /etc/fstab.

Are you using raspbian, openelec or other distro?.

Anyway, the entries defined on the file /etc/fstab are not changed in any way while the system mounts the drives. Therefore, fstab is not the cause of your trailing underscores.

Try this command and check where the usb devices are been mounted:

Code: Select all

mount | grep HDD
If they are mounted on /media/HDD1_ and /media/HDD2_ try these commands:

Code: Select all

sudo umount /media/HDD1_ /media/HDD2_
sudo mount -a
I am using Raspbian.

I must first point out that since starting this thread to get copying moving I have changed the fstab to:

Code: Select all

UUID=86D8F0FED8F0ED75 /media/HDD1_ ext4  noatime 0 0
UUID=4A7E9DD27E9DB6E3 /media/HDD2_ ext4  noatime 0 0
I have also changed the smb.conf to:

Code: Select all

[Backup]
comment = Backup Folder
path = /media/HDD1_/shares
valid users = @users
force group = users
create mask = 0777
directory mask = 0777
read only = no

[Backup2]
comment = Backup Folder2
path = /media/HDD2_/shares
valid users = @users
force group = users
create mask = 0777
directory mask = 0777
read only = no
The result is now:

Code: Select all

pi@raspberrypi ~ $ mount | grep HDD
/dev/sda1 on /media/HDD2_ type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks)
/dev/sdb1 on /media/HDD1_ type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks)

# I cannot do the following until copying of a large amount of data has completed.

sudo umount /media/HDD1_ /media/HDD2_
sudo mount -a

The copying I am doing is working correctly and the mapped shares are also seen correctly from Windows 7.

As soon as the copying has finished (maybe 5 hours), I will do the unmount and mount -a. In the meantime I will read man mount to see what effect mount -a has and also check if I have automount enabled.

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

Re: Trailing underscores on USB drive names

Thu Oct 23, 2014 12:50 pm

DirkS wrote:... OP is using the UUID and I don't think switching to labels will make a difference...
the given labels will make a difference in case, automount is enabled and the folder /media/<LABEL> or /media/<USER>/<LABEL> does not exist already at mount time. then the automount will name the mount folder like its filesystem label, if it has a label, if it does not has a laben, then the uuid is used instead.
(it its like this on my linux system - i thought that information would be helpful)
Last edited by beta-tester on Thu Oct 23, 2014 12:58 pm, edited 1 time in total.
{ I only give negative feedback }
RPi B (256MB), B (512MB), B+, ZeroW; 2B; 3B, 3B+; 4B (4GB)

User avatar
makem2
Posts: 233
Joined: Tue Jul 02, 2013 9:12 am
Location: Essex
Contact: Website

Re: Trailing underscores on USB drive names

Thu Oct 23, 2014 12:57 pm

DirkS wrote:
beta-tester wrote:maybe you can try to give your ext4 filesystems a label HDD1 and the other HDD2 with

Code: Select all

e2label /dev/sdX HDD1
e2label /dev/sdY HDD2
(where you have to replace sdX and sdY with your devicenames)

and then use these labels in the fstab to identify your mount points

Code: Select all

LABEL=HDD1  /media/HDD1  ext4  noatime  0  0
LABEL=HDD2  /media/HDD2  ext4  noatime  0  0
... maybe that makes the difference.
OP is using the UUID and I don't think switching to labels will make a difference...

Gr.
Dirk.
In effect I have done that by matching up the fstab and the smb.conf so that Windows sees the correct data.

I am manually copying using:

Code: Select all

rsync -avx --delete /media/HDD2_/shares /media/HDD1_/shares
The copy is done correctly and df -h shows the correct drive size and used portion size.

If I remove all the trailing underscores from the fstab, smb.conf and the rsync I end up with df -h showing a disc size of 30gb with only a small amount unused. I then get a copying error, "Not enough disk space". If this occurs again I will save the output as I cannot remember exactly what it showed.

User avatar
RaTTuS
Posts: 10531
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Trailing underscores on USB drive names

Thu Oct 23, 2014 1:07 pm

umount all the drives in /media
delete the files there [making sure you have umounted correctly]
re-create the USB drives
mount then back as they should be
...

you have at some stage copied files to a mount position before you had mounted a drive and it has filled up your 32GB SD card [mostly]
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

User avatar
makem2
Posts: 233
Joined: Tue Jul 02, 2013 9:12 am
Location: Essex
Contact: Website

Re: Trailing underscores on USB drive names

Thu Oct 23, 2014 1:08 pm

DougieLawson wrote:It's probably an annoying feechur of your automouter. The most likely condition will be "if /media/FOO already exists create /media/FOO_".
Can I turn off the automount feature to gain control?

User avatar
makem2
Posts: 233
Joined: Tue Jul 02, 2013 9:12 am
Location: Essex
Contact: Website

Re: Trailing underscores on USB drive names

Thu Oct 23, 2014 1:17 pm

RaTTuS wrote:umount all the drives in /media
delete the files there [making sure you have umounted correctly]
re-create the USB drives
mount then back as they should be
...

you have at some stage copied files to a mount position before you had mounted a drive and it has filled up your 32GB SD card [mostly]
Ah, I did wonder it the SD card was involved.

You say, "delete the files there", do you mean files in /media or the files existing on the HDs?

EDIT: Now df -h is showind:

Code: Select all

pi@raspberrypi /media $ ls -la
total 32
drwxr-xr-x  8 root root 4096 Oct 23 12:12 .
drwxr-xr-x 23 root root 4096 Nov 29  2013 ..
drwxr-xr-x  3 root root 4096 Oct 22 12:06 HDD1
drwxr-xr-x  4 root root 4096 Oct 23 10:40 HDD1_
drwxr-xr-x  3 root root 4096 Nov  1  2013 HDD2
drwxr-xr-x  4 root root 4096 Oct 23 00:36 HDD2_
drwxr-xr-x  2 root root 4096 Sep  6  2013 humax
drwxr-xr-x  2 root root 4096 Sep  6  2013 lappy
:o

User avatar
RaTTuS
Posts: 10531
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Trailing underscores on USB drive names

Thu Oct 23, 2014 1:36 pm

sudo mount
for a in HDD1 HDD1_ HDD2 HDD2_ ; do sudo umount /media/$a ; done
pull them [the extremal drives] just to be sure
sudo rm -fr /media/HDD1_ /media/HDD1 /media/HDD2_ /media/HDD2
sudo mkdir /media/HDD1 /media/HDD2
plug them back in and see what is reported in
dmesg
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

User avatar
makem2
Posts: 233
Joined: Tue Jul 02, 2013 9:12 am
Location: Essex
Contact: Website

Re: Trailing underscores on USB drive names

Thu Oct 23, 2014 4:33 pm

Before carrying out the last suggestion by RaTTuS, I thought it may be of value to see the output from dmesg now, for comparison with the output later:

Code: Select all

[    3.366405] usb 1-1.3: new high-speed USB device number 5 using dwc_otg
[    3.508464] usb 1-1.3: New USB device found, idVendor=0930, idProduct=0b1a
[    3.533744] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    3.556203] usb 1-1.3: Product: STOR.E ALU 2S
[    3.565323] usb 1-1.3: Manufacturer: TOSHIBA
[    3.580905] usb 1-1.3: SerialNumber: 201301070214
[    3.595829] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[    3.626803] scsi0 : usb-storage 1-1.3:1.0
[    4.206380] usb 1-1.2: new high-speed USB device number 6 using dwc_otg
[    4.338314] usb 1-1.2: New USB device found, idVendor=0930, idProduct=0b1a
[    4.366130] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    4.385557] usb 1-1.2: Product: STOR.E ALU 2S
[    4.404465] usb 1-1.2: Manufacturer: TOSHIBA
[    4.416911] usb 1-1.2: SerialNumber: 201205183468
[    4.427761] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[    4.440571] scsi1 : usb-storage 1-1.2:1.0
[    4.606598] udevd[182]: starting version 175
pi@raspberrypi / $ dmesg | less
[    7.246212] sd 0:0:0:0: [sda] Mode Sense: 1f 00 00 08
[    7.247262] sd 0:0:0:0: [sda] No Caching mode page found
[    7.268738] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    7.299645] sd 0:0:0:0: [sda] No Caching mode page found
[    7.318313] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    7.354245]  sda: sda1
[    7.371887] sd 0:0:0:0: [sda] No Caching mode page found
[    7.396112] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    7.416071] sd 0:0:0:0: [sda] Attached SCSI disk
[   12.597506] scsi 1:0:0:0: Direct-Access     TOSHIBA  STOR.E ALU 2S    0001 PQ: 0 ANSI: 6
[   12.615128] sd 1:0:0:0: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
[   12.646870] sd 1:0:0:0: [sdb] Write Protect is off
[   12.666242] sd 1:0:0:0: [sdb] Mode Sense: 1f 00 00 08
[   12.667246] sd 1:0:0:0: [sdb] No Caching mode page found
[   12.686163] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[   12.714246] sd 1:0:0:0: [sdb] No Caching mode page found
[   12.734364] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[   13.756860]  sdb: sdb1
[   13.775126] sd 1:0:0:0: [sdb] No Caching mode page found
[   13.796133] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[   13.816131] sd 1:0:0:0: [sdb] Attached SCSI disk
[   14.776815] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[   15.477864] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[   23.044413] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[   26.040029] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[   27.574877] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1
[   28.652351] Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
[   28.652424] CIFS VFS: Send error in SessSetup = -13
[   28.652828] CIFS VFS: cifs_mount failed w/return code = -13
[   34.686569] CIFS VFS: Error connecting to socket. Aborting operation.
[   34.688699] CIFS VFS: cifs_mount failed w/return code = -113
[   36.395812] Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
[   36.395880] CIFS VFS: Send error in SessSetup = -13
[   36.398256] CIFS VFS: cifs_mount failed w/return code = -13
[   40.686522] CIFS VFS: Error connecting to socket. Aborting operation.
[   40.688665] CIFS VFS: cifs_mount failed w/return code = -113
[   63.960577] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[   65.541572] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
There are errors reported.

DirkS
Posts: 10127
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Trailing underscores on USB drive names

Thu Oct 23, 2014 4:37 pm

If you mean the CIFS errors: they're from cifs / samba, not from the usb / drives.

Gr.
Dirk.

User avatar
makem2
Posts: 233
Joined: Tue Jul 02, 2013 9:12 am
Location: Essex
Contact: Website

Re: Trailing underscores on USB drive names

Thu Oct 23, 2014 5:23 pm

Yes, I should have shown the output relating to usb:

Code: Select all

pi@raspberrypi / $ dmesg | grep -1 usb
[    0.899988] SCSI subsystem initialized
[    0.904063] usbcore: registered new interface driver usbfs
[    0.909769] usbcore: registered new interface driver hub
[    0.915345] usbcore: registered new device driver usb
[    0.921954] Switching to clocksource stc
--
[    1.374404] Loading iSCSI transport class v2.0-870.
[    1.380503] usbcore: registered new interface driver ax88179_178a
[    1.386969] usbcore: registered new interface driver smsc95xx
[    1.392894] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
--
[    1.836621] dwc_otg: Microframe scheduler enabled
[    1.836863] dwc_otg bcm2708_usb: DWC OTG Controller
[    1.841911] dwc_otg bcm2708_usb: new USB bus registered, assigned bus number     1
[    1.849383] dwc_otg bcm2708_usb: irq 32, io mem 0x00000000
[    1.855001] Init: Port Power? op_state=1
[    1.859039] Init: Power Port (0)
[    1.862473] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.873578] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=    1
[    1.885016] usb usb1: Product: DWC OTG Controller
[    1.893858] usb usb1: Manufacturer: Linux 3.10.22+ dwc_otg_hcd
[    1.903835] usb usb1: SerialNumber: bcm2708_usb
[    1.913240] hub 1-0:1.0: USB hub found
--
[    1.929773] Module dwc_common_port init
[    1.930239] usbcore: registered new interface driver usb-storage
[    1.941043] mousedev: PS/2 mouse device common for all mice
[    1.950944] usbcore: registered new interface driver xpad
[    1.961250] bcm2835-cpufreq: min=700000 max=700000 cur=700000
--
[    2.136035] hidraw: raw HID events driver (C) Jiri Kosina
[    2.145686] usbcore: registered new interface driver usbhid
[    2.179064] usbhid: USB HID core driver
[    2.196513] TCP: cubic registered
--
[    2.371165]  mmcblk0: p1 p2
[    2.446040] usb 1-1: new high-speed USB device number 2 using dwc_otg
[    2.457061] Indeed it is in host mode hprt0 = 00001101
--
[    2.563961] Freeing unused kernel memory: 140K (c056a000 - c058d000)
[    2.706758] usb 1-1: New USB device found, idVendor=0424, idProduct=9512
[    2.718192] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.731709] hub 1-1:1.0: USB hub found
[    2.741649] hub 1-1:1.0: 3 ports detected
[    3.026284] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[    3.136989] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[    3.149034] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber    =0
[    3.165923] smsc95xx v1.0.4
[    3.231524] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-bcm2708_usb-1    .1, smsc95xx USB 2.0 Ethernet, b8:27:eb:0a:4f:7c
[    3.366405] usb 1-1.3: new high-speed USB device number 5 using dwc_otg
[    3.508464] usb 1-1.3: New USB device found, idVendor=0930, idProduct=0b1a
[    3.533744] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber    =3
[    3.556203] usb 1-1.3: Product: STOR.E ALU 2S
[    3.565323] usb 1-1.3: Manufacturer: TOSHIBA
[    3.580905] usb 1-1.3: SerialNumber: 201301070214
[    3.595829] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[    3.626803] scsi0 : usb-storage 1-1.3:1.0
[    4.206380] usb 1-1.2: new high-speed USB device number 6 using dwc_otg
[    4.338314] usb 1-1.2: New USB device found, idVendor=0930, idProduct=0b1a
[    4.366130] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber    =3
[    4.385557] usb 1-1.2: Product: STOR.E ALU 2S
[    4.404465] usb 1-1.2: Manufacturer: TOSHIBA
[    4.416911] usb 1-1.2: SerialNumber: 201205183468
[    4.427761] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[    4.440571] scsi1 : usb-storage 1-1.2:1.0
[    4.606598] udevd[182]: starting version 175

User avatar
makem2
Posts: 233
Joined: Tue Jul 02, 2013 9:12 am
Location: Essex
Contact: Website

Re: Trailing underscores on USB drive names

Thu Oct 23, 2014 6:54 pm

RaTTuS wrote:sudo mount
for a in HDD1 HDD1_ HDD2 HDD2_ ; do sudo umount /media/$a ; done
pull them [the extremal drives] just to be sure
sudo rm -fr /media/HDD1_ /media/HDD1 /media/HDD2_ /media/HDD2
sudo mkdir /media/HDD1 /media/HDD2
plug them back in and see what is reported in
dmesg
As suggested:

Code: Select all

pi@raspberrypi / $ sudo umount /media/HDD1
umount: /media/HDD1: not mounted
pi@raspberrypi / $ sudo umount /media/HDD1_
pi@raspberrypi / $ sudo umount /media/HDD2
umount: /media/HDD2: not mounted
pi@raspberrypi / $ sudo umount /media/HDD2_
pi@raspberrypi / $ sudo rm -fr /media/HDD1_ /media/HDD1 /media/HDD2_ /media/HDD2
rm: cannot remove `/media/HDD1/shares/shares/_SYNCAPP': Directory not empty
pi@raspberrypi / $ sudo rm -fr /media/HDD1_
pi@raspberrypi / $ sudo rm -fr /media/HDD1
pi@raspberrypi / $ sudo rm -fr /media/HDD2
pi@raspberrypi / $ sudo rm -fr /media/HDD2_

pi@raspberrypi / $ sudo mkdir /media/HDD1 /media/HDD2

pi@raspberrypi /media $ ls -la
total 24
drwxr-xr-x  6 root root 4096 Oct 23 19:45 .
drwxr-xr-x 23 root root 4096 Nov 29  2013 ..
drwxr-xr-x  2 root root 4096 Oct 23 19:45 HDD1
drwxr-xr-x  2 root root 4096 Oct 23 19:45 HDD2
drwxr-xr-x  2 root root 4096 Sep  6  2013 humax
drwxr-xr-x  2 root root 4096 Sep  6  2013 lappy

pi@raspberrypi / $ dmesg | grep -1 usb
[    0.899988] SCSI subsystem initialized
[    0.904063] usbcore: registered new interface driver usbfs
[    0.909769] usbcore: registered new interface driver hub
[    0.915345] usbcore: registered new device driver usb
[    0.921954] Switching to clocksource stc
--
[    1.374404] Loading iSCSI transport class v2.0-870.
[    1.380503] usbcore: registered new interface driver ax88179_178a
[    1.386969] usbcore: registered new interface driver smsc95xx
[    1.392894] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
--
[    1.836621] dwc_otg: Microframe scheduler enabled
[    1.836863] dwc_otg bcm2708_usb: DWC OTG Controller
[    1.841911] dwc_otg bcm2708_usb: new USB bus registered, assigned bus number 1
[    1.849383] dwc_otg bcm2708_usb: irq 32, io mem 0x00000000
[    1.855001] Init: Port Power? op_state=1
[    1.859039] Init: Power Port (0)
[    1.862473] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.873578] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.885016] usb usb1: Product: DWC OTG Controller
[    1.893858] usb usb1: Manufacturer: Linux 3.10.22+ dwc_otg_hcd
[    1.903835] usb usb1: SerialNumber: bcm2708_usb
[    1.913240] hub 1-0:1.0: USB hub found
--
[    1.929773] Module dwc_common_port init
[    1.930239] usbcore: registered new interface driver usb-storage
[    1.941043] mousedev: PS/2 mouse device common for all mice
[    1.950944] usbcore: registered new interface driver xpad
[    1.961250] bcm2835-cpufreq: min=700000 max=700000 cur=700000
--
[    2.136035] hidraw: raw HID events driver (C) Jiri Kosina
[    2.145686] usbcore: registered new interface driver usbhid
[    2.179064] usbhid: USB HID core driver
[    2.196513] TCP: cubic registered
--
[    2.371165]  mmcblk0: p1 p2
[    2.446040] usb 1-1: new high-speed USB device number 2 using dwc_otg
[    2.457061] Indeed it is in host mode hprt0 = 00001101
--
[    2.563961] Freeing unused kernel memory: 140K (c056a000 - c058d000)
[    2.706758] usb 1-1: New USB device found, idVendor=0424, idProduct=9512
[    2.718192] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.731709] hub 1-1:1.0: USB hub found
[    2.741649] hub 1-1:1.0: 3 ports detected
[    3.026284] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[    3.136989] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[    3.149034] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    3.165923] smsc95xx v1.0.4
[    3.231524] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:0a:4f:7c
[    3.366405] usb 1-1.3: new high-speed USB device number 5 using dwc_otg
[    3.508464] usb 1-1.3: New USB device found, idVendor=0930, idProduct=0b1a
[    3.533744] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    3.556203] usb 1-1.3: Product: STOR.E ALU 2S
[    3.565323] usb 1-1.3: Manufacturer: TOSHIBA
[    3.580905] usb 1-1.3: SerialNumber: 201301070214
[    3.595829] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[    3.626803] scsi0 : usb-storage 1-1.3:1.0
[    4.206380] usb 1-1.2: new high-speed USB device number 6 using dwc_otg
[    4.338314] usb 1-1.2: New USB device found, idVendor=0930, idProduct=0b1a
[    4.366130] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    4.385557] usb 1-1.2: Product: STOR.E ALU 2S
[    4.404465] usb 1-1.2: Manufacturer: TOSHIBA
[    4.416911] usb 1-1.2: SerialNumber: 201205183468
[    4.427761] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[    4.440571] scsi1 : usb-storage 1-1.2:1.0
[    4.606598] udevd[182]: starting version 175
--
[   65.541572] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
[26856.389057] usb 1-1.2: USB disconnect, device number 6
[26858.181414] usb 1-1.3: USB disconnect, device number 5
[27610.135190] usb 1-1.3: new full-speed USB device number 7 using dwc_otg
[27610.215270] usb 1-1.3: device descriptor read/64, error -32
[27610.405094] usb 1-1.3: device descriptor read/64, error -32
[27610.595469] usb 1-1.3: new full-speed USB device number 8 using dwc_otg
[27610.675132] usb 1-1.3: device descriptor read/64, error -32
[27610.865179] usb 1-1.3: device descriptor read/64, error -32
[27611.055439] usb 1-1.3: new full-speed USB device number 9 using dwc_otg
[27611.475070] usb 1-1.3: device not accepting address 9, error -32
[27611.555253] usb 1-1.3: new full-speed USB device number 10 using dwc_otg
[27611.974996] usb 1-1.3: device not accepting address 10, error -32
[27611.975305] hub 1-1:1.0: unable to enumerate USB device on port 3
[27614.485318] usb 1-1.2: new full-speed USB device number 11 using dwc_otg
[27614.565313] usb 1-1.2: device descriptor read/64, error -32
[27614.755323] usb 1-1.2: device descriptor read/64, error -32
[27614.945347] usb 1-1.2: new full-speed USB device number 12 using dwc_otg
[27615.025351] usb 1-1.2: device descriptor read/64, error -32
[27615.215246] usb 1-1.2: device descriptor read/64, error -32
[27615.405292] usb 1-1.2: new full-speed USB device number 13 using dwc_otg
[27615.825081] usb 1-1.2: device not accepting address 13, error -32
[27615.905341] usb 1-1.2: new full-speed USB device number 14 using dwc_otg
[27616.325105] usb 1-1.2: device not accepting address 14, error -32
[27616.325400] hub 1-1:1.0: unable to enumerate USB device on port 2
pi@raspberrypi / $
EDIT:

Code: Select all

pi@raspberrypi /media/HDD1 $ df -h
Filesystem      Size  Used Avail Use% Mounted on
rootfs           30G  1.9G   27G   7% /
/dev/root        30G  1.9G   27G   7% /
devtmpfs        235M     0  235M   0% /dev
tmpfs            49M  1.5M   48M   4% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs            98M     0   98M   0% /run/shm
/dev/mmcblk0p1   56M   19M   38M  34% /boot
/dev/root        30G  1.9G   27G   7% /var/log.hdd
ramlog-tmpfs    243M  8.9M  234M   4% /var/log
After a reboot with the fstab set at HDD1 and HDD2 also smb.conf HDD1 and HDD2:

Code: Select all

pi@raspberrypi / $ df -h
Filesystem      Size  Used Avail Use% Mounted on
rootfs           30G  1.9G   27G   7% /
/dev/root        30G  1.9G   27G   7% /
devtmpfs        235M     0  235M   0% /dev
tmpfs            49M  364K   49M   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs            98M     0   98M   0% /run/shm
/dev/mmcblk0p1   56M   19M   38M  34% /boot
/dev/root        30G  1.9G   27G   7% /var/log.hdd
ramlog-tmpfs    243M  9.0M  234M   4% /var/log

User avatar
makem2
Posts: 233
Joined: Tue Jul 02, 2013 9:12 am
Location: Essex
Contact: Website

Re: Trailing underscores on USB drive names

Thu Oct 23, 2014 7:41 pm

Code: Select all

pi@raspberrypi / $ sudo mount -a
mount: special device UUID=86D8F0FED8F0ED75 does not exist
mount: special device UUID=4A7E9DD27E9DB6E3 does not exist
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error(38): Function not implemented
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
The USB drives have disappeared!

After a shutdown and restart:

Code: Select all

pi@raspberrypi ~ $ df -h
Filesystem      Size  Used Avail Use% Mounted on
rootfs           30G  1.9G   27G   7% /
/dev/root        30G  1.9G   27G   7% /
devtmpfs        235M     0  235M   0% /dev
tmpfs            49M  392K   49M   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs            98M     0   98M   0% /run/shm
/dev/mmcblk0p1   56M   19M   38M  34% /boot
/dev/root        30G  1.9G   27G   7% /var/log.hdd
ramlog-tmpfs    243M  9.2M  234M   4% /var/log
/dev/sdb1       917G  129G  742G  15% /media/HDD2_
/dev/sda1       917G  129G  742G  15% /media/HDD1_
The drives are back with thier trailing underscores.

Code: Select all

pi@raspberrypi ~ $ ls -la /media
total 32
drwxr-xr-x  8 root root 4096 Oct 23 20:34 .
drwxr-xr-x 23 root root 4096 Nov 29  2013 ..
drwxr-xr-x  2 root root 4096 Oct 23 19:45 HDD1
drwxr-xr-x  4 root root 4096 Oct 23 10:40 HDD1_
drwxr-xr-x  2 root root 4096 Oct 23 19:45 HDD2
drwxr-xr-x  4 root root 4096 Oct 23 00:36 HDD2_
drwxr-xr-x  2 root root 4096 Sep  6  2013 humax
drwxr-xr-x  2 root root 4096 Sep  6  2013 lappy
HDD1 and HDD2 are present too but are empty. HDD1_ and HDD2_ contain the data.

I still get the error that the drives referred to by UUID do not exist - hence the underscores. But, why don't they exist?

RobHenry
Posts: 452
Joined: Fri Sep 21, 2012 9:04 pm
Location: UK

Re: Trailing underscores on USB drive names

Thu Oct 23, 2014 7:46 pm

The UUID entries you have in /etc/fstab are incorrect. Check them with blkid.

Are you running the GUI? That is the only way I know of that the drives will auto mount and it must be mounting them to the location based on the disk label but adding underscore because there is an entry in fstab for a different drive (based on UUID) to mount at the location that would otherwise be used.

Fix fstab and all your problems will go away.

Edit: My UUID entries look like this, for example: UUID=fdb32621-dbc7-468f-8991-6b655266c8b4

User avatar
makem2
Posts: 233
Joined: Tue Jul 02, 2013 9:12 am
Location: Essex
Contact: Website

Re: Trailing underscores on USB drive names

Thu Oct 23, 2014 8:00 pm

RobHenry wrote:The UUID entries you have in /etc/fstab are incorrect. Check them with blkid.

Are you running the GUI? That is the only way I know of that the drives will auto mount and it must be mounting them to the location based on the disk label but adding underscore because there is an entry in fstab for a different drive (based on UUID) to mount at the location that would otherwise be used.

Fix fstab and all your problems will go away.

Edit: My UUID entries look like this, for example: UUID=fdb32621-dbc7-468f-8991-6b655266c8b4
You are correct, the UUIDs are wrong! But, that is very strange because this has been running for over a year.

The only thing I can think of is that during the learning curve the drives were mounted by another method and the fstab was ignored. Since then, in 'tuning' (what a laugh) the system, I could have taken out the original mount method, relying on the incorrect UUIDs.

I will report back when I make the corrections.

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

Re: Trailing underscores on USB drive names

Thu Oct 23, 2014 8:10 pm

makem2 wrote:HDD1 and HDD2 are present too but are empty. HDD1_ and HDD2_ contain the data.
what you tell, sounds to me like,

1. the automount is enabled and your ext4 filesystems have labels (HDD1 and HDD2) and you created the folders /media/HDD1 and /media/HDD2 by hand and you added these mountpoints in the fstab. so the automount wants to mount the filesystem by their label, but can not autocreate the folder, because the filder is already there and uses an alternative folder.

or

2. the ext4 filesystems do not have a label and automount is not enabled or do not take affect, because you created the folders already by hand, but you created the folders under an unproper user/group, so the mount process is using an alternative folder.


when you type in

Code: Select all

sudo blkid
will your harddrives are shown with LABEL=... oder is is shown with UUID=... - means, does it have a label or only an uuid?
only to clarify, if your filesystems have only uuid or also have a label.

does the folder /media and your handmade subfolder /media/HDD1 and /media/HDD2 have root as user and group?
if not, try change the user and group to root.

in case automount is enabled, what happends, when you remove the mount entries in the fstab and also remove the empty HDD1 and HDD2 folders and boot the system again or sudo mount -a...
when it creates the folders /media/HDD1 and HDD2 or instead of HDD1/HDD2 folders with their UUID?
if yes, then keep the fstab free of handmade mount options for these hdd drvices and let the automount do its job. in case only the uuid is used as foldername, give the filesystems a label with e2label, then automount should use the label as foldername.

thats only my final suggestions.
{ I only give negative feedback }
RPi B (256MB), B (512MB), B+, ZeroW; 2B; 3B, 3B+; 4B (4GB)

User avatar
makem2
Posts: 233
Joined: Tue Jul 02, 2013 9:12 am
Location: Essex
Contact: Website

Re: Trailing underscores on USB drive names

Thu Oct 23, 2014 8:14 pm

I have corrected the UUIDs in fstab and there has been no change:

Code: Select all

pi@raspberrypi ~ $ ls -la /media
total 32
drwxr-xr-x  8 root root 4096 Oct 23 21:07 .
drwxr-xr-x 23 root root 4096 Nov 29  2013 ..
drwxr-xr-x  2 root root 4096 Oct 23 19:45 HDD1
drwxr-xr-x  4 root root 4096 Oct 23 10:40 HDD1_
drwxr-xr-x  2 root root 4096 Oct 23 19:45 HDD2
drwxr-xr-x  4 root root 4096 Oct 23 00:36 HDD2_
drwxr-xr-x  2 root root 4096 Sep  6  2013 humax
drwxr-xr-x  2 root root 4096 Sep  6  2013 lappy
I think I must go back and follow the suggestion by RaTTuS with the correct UUIDs

I am not using a GUI, using puTTy remotely.

RobHenry
Posts: 452
Joined: Fri Sep 21, 2012 9:04 pm
Location: UK

Re: Trailing underscores on USB drive names

Thu Oct 23, 2014 8:19 pm

ls -la /media will tell nothing because the directories have already been created. What is the output of df -h and cat /etc/fstab | grep UUID?

User avatar
makem2
Posts: 233
Joined: Tue Jul 02, 2013 9:12 am
Location: Essex
Contact: Website

Re: Trailing underscores on USB drive names

Thu Oct 23, 2014 8:25 pm

RobHenry wrote:ls -la /media will tell nothing because the directories have already been created. What is the output of df -h and cat /etc/fstab | grep UUID?

Code: Select all

pi@raspberrypi ~ $ df -h
Filesystem      Size  Used Avail Use% Mounted on
rootfs           30G  1.9G   27G   7% /
/dev/root        30G  1.9G   27G   7% /
devtmpfs        235M     0  235M   0% /dev
tmpfs            49M  392K   49M   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs            98M     0   98M   0% /run/shm
/dev/mmcblk0p1   56M   19M   38M  34% /boot
/dev/root        30G  1.9G   27G   7% /var/log.hdd
ramlog-tmpfs    243M  9.3M  234M   4% /var/log
/dev/sdb1       917G  129G  742G  15% /media/HDD1_
/dev/sda1       917G  129G  742G  15% /media/HDD2_

#UUID=86D8F0FED8F0ED75 /media/HDD1 ext4  noatime 0 0
#UUID=4A7E9DD27E9DB6E3 /media/HDD2 ext4  noatime 0 0
UUID=a00d40c4-457b-4030-bb71-8f8b08e95e475 /media/HDD1 ext4  noatime 0 0
UUID=f06c9e00-bace-4412-8d02-68c7ed7490fb /media/HDD2 ext4  noatime 0 0

pi@raspberrypi ~ $ blkid
/dev/mmcblk0p1: SEC_TYPE="msdos" LABEL="boot" UUID="5D2D-B09A" TYPE="vfat"
/dev/mmcblk0p2: UUID="41cd5baa-7a62-4706-b8e8-02c43ccee8d9" TYPE="ext4"
/dev/sda1: LABEL="HDD2" UUID="55ae856b-910c-48fa-878f-69a9b88df60e" TYPE="ext4"
/dev/sdb1: LABEL="HDD1_" UUID="a00d40c4-457b-4030-bb71-8f8b08e95e47" TYPE="ext4"
The UUIDs are different!

User avatar
makem2
Posts: 233
Joined: Tue Jul 02, 2013 9:12 am
Location: Essex
Contact: Website

Re: Trailing underscores on USB drive names

Thu Oct 23, 2014 8:42 pm

After re-correcting the UUIDs:

Code: Select all

pi@raspberrypi ~ $ df -h
Filesystem      Size  Used Avail Use% Mounted on
rootfs           30G  1.9G   27G   7% /
/dev/root        30G  1.9G   27G   7% /
devtmpfs        235M     0  235M   0% /dev
tmpfs            49M  388K   49M   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs            98M     0   98M   0% /run/shm
/dev/mmcblk0p1   56M   19M   38M  34% /boot
/dev/sdb1       917G  129G  742G  15% /media/HDD1
/dev/sda1       917G  129G  742G  15% /media/HDD2
/dev/root        30G  1.9G   27G   7% /var/log.hdd
ramlog-tmpfs    243M  9.3M  234M   4% /var/log

pi@raspberrypi ~ $ cat /etc/fstab | grep UUID
#UUID=86D8F0FED8F0ED75 /media/HDD1 ext4  noatime 0 0
#UUID=4A7E9DD27E9DB6E3 /media/HDD2 ext4  noatime 0 0
#UUID=a00d40c4-457b-4030-bb71-8f8b08e95e475 /media/HDD1 ext4  noatime 0 0
#UUID=f06c9e00-bace-4412-8d02-68c7ed7490fb /media/HDD2 ext4  noatime 0 0
UUID=a00d40c4-457b-4030-bb71-8f8b08e95e47 /media/HDD1 ext4  noatime 0 0
UUID=55ae856b-910c-48fa-878f-69a9b88df60e /media/HDD2 ext4  noatime 0 0
This time it appears to be correct but you can see the UUIDs are differing.

Thank you for spotting the error in the UUIDs. I would never have look there because they had been working.

Can UUIDs change? I would think not but I didn't invent these numbers.

User avatar
DougieLawson
Posts: 37073
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Trailing underscores on USB drive names

Thu Oct 23, 2014 8:49 pm

The UUID is part of the partition table so if you move partitions with fdisk or parted or gparted you can change the UUID. I even hacked one on a FAT32 partition using hexedit.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Return to “Troubleshooting”