Difference between revisions of "Talk:USB storage devices"

From ArchWiki
Jump to: navigation, search
m (rm gap)
 
(16 intermediate revisions by 6 users not shown)
Line 1: Line 1:
I tried to follow the instructions in "Mounting the USB stick as normal user with Fstab," but it didn't work. Said I had permissions errors when I tried to open the /mnt/usbstick. So, I tried replacing: <br>
+
== device descriptor read error ==
/dev/sda1 /mnt/usbstick vfat rw,noauto,async,user 0 0 <br>
+
with <br>
+
/dev/sda1 /mnt/usbstick vfat rw,noauto,async,user,umask=1000 0 0 <br>
+
(because that's what they did in the previous section) <br>
+
I'm not sure if it is worth mentioning (I am an arch noob)- is the current info wrong or is my setup goofy somehow (I don't think I've changed anything that would make this not work...) [[User:Braegan|Braegan]] 20:15, 26 May 2010 (EDT)
+
  
== Fails to detect USB Storage devices ==
+
Some USB controllers will be loaded with the wrong USB standard applied (e.g. a USB 3.0 controller is initialized with a USB 2.0 kernel module assigned) causing a loss of performance and an error message that looks something like "device descriptor read/64, error -32" at boot time. A supposed fix I found involves issuing the following command as root: "echo -1 >/sys/module/usbcore/parameters/autosuspend". Since I don't have a USB storage device handy it's hard for me to verify that the performance impact was fixed, but I can verify that this at least supressed the error message. This also does not specifically pertain to USB storage devices, but there is not a wiki page specifically for general USB controller usage and I didn't find it in order to create one just to add a single troubleshooting step. [[User:Mynis|Mynis]] ([[User talk:Mynis|talk]]) 21:24, 14 December 2013 (UTC)
  
My install failed to detect any USB storage devices until I loaded the scsi-generic driver:
+
== Mount ext4-formatted usb drive so it can be written by the user ==
  
modprobe sg
+
Does [[USB storage devices#As normal user with mount]] work? When trying to use these option I get errors. I think extra steps, like 'chown'ing the directory, are needed. -- [[User:Karol|Karol]] ([[User talk:Karol|talk]]) 02:32, 18 November 2014 (UTC)
  
I made a file in /etc/modules-loaded.d/scsi-generic.conf so that it loads at start up.
+
:It works fine for me, the ownership of the mountpoint is set according to the {{ic|1=gid=}} argument and its permission according to {{ic|1=fmask=}} and {{ic|1=dmask=}} - exactly the same as for the other files on the mounted drive. I.e., I get the following: {{bc|<nowiki>
 
+
# mount -o gid=lahwaacz,fmask=113,dmask=002 /dev/sdb1 /mnt/
[[User:AdmiralAkber|AdmiralAkber]] ([[User talk:AdmiralAkber|talk]]) 02:27, 26 February 2013 (UTC)
+
$ ll /mnt/
 +
total 863M
 +
drwxrwxr-x 14 root lahwaacz 8.0K Jan  1  1970 ./
 +
drwxr-xr-x 18 root root    4.0K Nov  7 19:35 ../
 +
drwxrwxr-x  2 root lahwaacz 8.0K Jun 21 12:25 app/
 +
drwxrwxr-x  5 root lahwaacz 8.0K Sep 13 10:03 boot/
 +
...
 +
$ touch foo
 +
$ ll /mnt/
 +
total 863M
 +
drwxrwxr-x 14 root lahwaacz 8.0K Dec  6 23:00 ./
 +
drwxr-xr-x 18 root root    4.0K Nov  7 19:35 ../
 +
drwxrwxr-x  2 root lahwaacz 8.0K Jun 21 12:25 app/
 +
drwxrwxr-x  5 root lahwaacz 8.0K Sep 13 10:03 boot/
 +
-rw-rw-r--  1 root lahwaacz    0 Dec  6 23:00 foo
 +
...
 +
</nowiki>}}
 +
:What kind of errors do you get?
 +
:'''Edit:''' dumb me, I should have read the title first... I have tried it with a NTFS drive, not with ext4. The problem is likely in the {{ic|1=gid=}} mount option, which is not filesystem independent (see {{ic|mount(8)}}). In fact, it makes sense only on filesystems not storing Linux file permissions.
 +
:-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 22:17, 6 December 2014 (UTC)

Latest revision as of 17:14, 20 April 2015

device descriptor read error

Some USB controllers will be loaded with the wrong USB standard applied (e.g. a USB 3.0 controller is initialized with a USB 2.0 kernel module assigned) causing a loss of performance and an error message that looks something like "device descriptor read/64, error -32" at boot time. A supposed fix I found involves issuing the following command as root: "echo -1 >/sys/module/usbcore/parameters/autosuspend". Since I don't have a USB storage device handy it's hard for me to verify that the performance impact was fixed, but I can verify that this at least supressed the error message. This also does not specifically pertain to USB storage devices, but there is not a wiki page specifically for general USB controller usage and I didn't find it in order to create one just to add a single troubleshooting step. Mynis (talk) 21:24, 14 December 2013 (UTC)

Mount ext4-formatted usb drive so it can be written by the user

Does USB storage devices#As normal user with mount work? When trying to use these option I get errors. I think extra steps, like 'chown'ing the directory, are needed. -- Karol (talk) 02:32, 18 November 2014 (UTC)

It works fine for me, the ownership of the mountpoint is set according to the gid= argument and its permission according to fmask= and dmask= - exactly the same as for the other files on the mounted drive. I.e., I get the following:
# mount -o gid=lahwaacz,fmask=113,dmask=002 /dev/sdb1 /mnt/
$ ll /mnt/
total 863M
drwxrwxr-x 14 root lahwaacz 8.0K Jan  1  1970 ./
drwxr-xr-x 18 root root     4.0K Nov  7 19:35 ../
drwxrwxr-x  2 root lahwaacz 8.0K Jun 21 12:25 app/
drwxrwxr-x  5 root lahwaacz 8.0K Sep 13 10:03 boot/
...
$ touch foo
$ ll /mnt/
total 863M
drwxrwxr-x 14 root lahwaacz 8.0K Dec  6 23:00 ./
drwxr-xr-x 18 root root     4.0K Nov  7 19:35 ../
drwxrwxr-x  2 root lahwaacz 8.0K Jun 21 12:25 app/
drwxrwxr-x  5 root lahwaacz 8.0K Sep 13 10:03 boot/
-rw-rw-r--  1 root lahwaacz    0 Dec  6 23:00 foo
...
What kind of errors do you get?
Edit: dumb me, I should have read the title first... I have tried it with a NTFS drive, not with ext4. The problem is likely in the gid= mount option, which is not filesystem independent (see mount(8)). In fact, it makes sense only on filesystems not storing Linux file permissions.
-- Lahwaacz (talk) 22:17, 6 December 2014 (UTC)