Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Odd usb drive unmounting behavior.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
truekaiser
l33t
l33t


Joined: 05 Mar 2004
Posts: 753

PostPosted: Fri Oct 13, 2017 12:03 am    Post subject: Odd usb drive unmounting behavior. Reply with quote

I think this is the right subforum for this, if not feel free to move it. :)

I can't pinpoint when it started but recently I have been having trouble with unmounting usb drives and usb drives alone. They would mount fine, but would hang on unmount causing xfce4 to hang. Happens both on my amd ryzen desktop and the intel skylake laptop. Tried putting a third party usb3 controller into the former but it still acts like this.. I don't know where to look to see what is wrong and googling doesn't seem to help..
_________________
"My father rode a camel. I drive a car. My son flies a jet-plane. His son will ride a camel."
—Saudi saying
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43208
Location: 56N 3W

PostPosted: Fri Oct 13, 2017 9:30 pm    Post subject: Reply with quote

truekaiser,

Depending on what you have been doing, umount needs to call sync to flush written data.
The superblock always needs to be written, as the dirty bit is set by a rw mount.

Some things to try and report back on.
What happens to umount after a ro mount, as there is nothing to flush.

After a rw mount, does the sync command return or hang?

If sync returns, does umount work then?

Are there any hints in dmesg?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
truekaiser
l33t
l33t


Joined: 05 Mar 2004
Posts: 753

PostPosted: Sat Oct 14, 2017 2:02 am    Post subject: Reply with quote

NeddySeagoon wrote:
truekaiser,

Depending on what you have been doing, umount needs to call sync to flush written data.
The superblock always needs to be written, as the dirty bit is set by a rw mount.

Some things to try and report back on.
What happens to umount after a ro mount, as there is nothing to flush.

After a rw mount, does the sync command return or hang?

If sync returns, does umount work then?

Are there any hints in dmesg?


I will get back to you this weekend when i have the time.
_________________
"My father rode a camel. I drive a car. My son flies a jet-plane. His son will ride a camel."
—Saudi saying
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43208
Location: 56N 3W

PostPosted: Sat Oct 14, 2017 9:18 am    Post subject: Reply with quote

truekaiser,

Another question. I suppose the USB port in question is operating at USB 3 or USB 2 speeds?
USB 1 'works' but for a very low value of works, only 1.2MByte/sec.

The output of lsusb, with the drive connected and the dmesg entry showing the drive connecting may be useful.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
truekaiser
l33t
l33t


Joined: 05 Mar 2004
Posts: 753

PostPosted: Sat Oct 14, 2017 6:03 pm    Post subject: Reply with quote

NeddySeagoon wrote:
truekaiser,

Another question. I suppose the USB port in question is operating at USB 3 or USB 2 speeds?
USB 1 'works' but for a very low value of works, only 1.2MByte/sec.

The output of lsusb, with the drive connected and the dmesg entry showing the drive connecting may be useful.


this is a ryzen board. usb 3 and 3.1 only. Seems i also have a deeper problem now, suddenly i am no longer able to mount usb drives as a user but my nfs mounts are fine.. I have no idea what changed either.. they just are slow to unmount.
_________________
"My father rode a camel. I drive a car. My son flies a jet-plane. His son will ride a camel."
—Saudi saying
Back to top
View user's profile Send private message
truekaiser
l33t
l33t


Joined: 05 Mar 2004
Posts: 753

PostPosted: Sat Oct 14, 2017 7:02 pm    Post subject: Reply with quote

forgot to add the dmesg output you wanted. this and the other drive i have been using are known good though.

usb2 drive
Code:

[ 2193.367304] usb 1-7: new high-speed USB device number 9 using xhci_hcd
[ 2193.568270] usb 1-7: New USB device found, idVendor=13fe, idProduct=4200
[ 2193.568272] usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2193.568273] usb 1-7: Product:                 
[ 2193.568274] usb 1-7: Manufacturer:         
[ 2193.568275] usb 1-7: SerialNumber: 07034BD915F92267
[ 2193.571282] usb-storage 1-7:1.0: USB Mass Storage device detected
[ 2193.571423] scsi host11: usb-storage 1-7:1.0
[ 2194.626920] scsi 11:0:0:0: Direct-Access                               PMAP PQ: 0 ANSI: 6
[ 2194.627054] sd 11:0:0:0: Attached scsi generic sg4 type 0
[ 2195.719882] sd 11:0:0:0: [sde] 7831552 512-byte logical blocks: (4.01 GB/3.73 GiB)
[ 2195.721952] sd 11:0:0:0: [sde] Write Protect is off
[ 2195.721954] sd 11:0:0:0: [sde] Mode Sense: 23 00 00 00
[ 2195.723457] sd 11:0:0:0: [sde] No Caching mode page found
[ 2195.723458] sd 11:0:0:0: [sde] Assuming drive cache: write through                                                                                                                                                                       
[ 2195.765268]  sde: sde1                                                                                                                                                                                                                   
[ 2195.772449] sd 11:0:0:0: [sde] Attached SCSI removable disk


usb3 drive
Code:

[ 2280.617595] usb 2-8: new SuperSpeed USB device number 4 using xhci_hcd
[ 2280.633590] usb 2-8: New USB device found, idVendor=058f, idProduct=8468
[ 2280.633591] usb 2-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2280.633592] usb 2-8: Product: Flash Card Reader/Writer
[ 2280.633593] usb 2-8: Manufacturer: Generic
[ 2280.633593] usb 2-8: SerialNumber: 058F84688461
[ 2280.635365] usb-storage 2-8:1.0: USB Mass Storage device detected
[ 2280.635480] scsi host12: usb-storage 2-8:1.0
[ 2281.661616] scsi 12:0:0:0: Direct-Access     Generic- SD/MMC           1.00 PQ: 0 ANSI: 6
[ 2281.661738] sd 12:0:0:0: Attached scsi generic sg5 type 0
[ 2281.662770] scsi 12:0:0:1: Direct-Access     Generic- MicroSD/M2       1.08 PQ: 0 ANSI: 6
[ 2281.662890] sd 12:0:0:1: Attached scsi generic sg9 type 0
[ 2282.535020] sd 12:0:0:1: [sdi] 125089792 512-byte logical blocks: (64.0 GB/59.6 GiB)
[ 2282.537127] sd 12:0:0:1: [sdi] Write Protect is off
[ 2282.537128] sd 12:0:0:1: [sdi] Mode Sense: 23 00 00 00
[ 2282.539345] sd 12:0:0:1: [sdi] Write cache: disabled, read cache: disabled, doesn't support DPO or FUA
[ 2282.540872] sd 12:0:0:0: [sdf] Attached SCSI removable disk
[ 2282.549061]  sdi: sdi1
[ 2282.556370] sd 12:0:0:1: [sdi] Attached SCSI removable disk


edit: scrolling up i found this..

Code:

[ 1099.296676] usb 1-8: new high-speed USB device number 6 using xhci_hcd
[ 1099.498419] usb 1-8: New USB device found, idVendor=13fe, idProduct=4200
[ 1099.498421] usb 1-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1099.498422] usb 1-8: Product:                 
[ 1099.498423] usb 1-8: Manufacturer:         
[ 1099.498424] usb 1-8: SerialNumber: 07034BD915F92267
[ 1099.501618] usb-storage 1-8:1.0: USB Mass Storage device detected
[ 1099.501742] scsi host13: usb-storage 1-8:1.0
[ 1100.561138] scsi 13:0:0:0: Direct-Access                               PMAP PQ: 0 ANSI: 6
[ 1100.561256] sd 13:0:0:0: Attached scsi generic sg9 type 0
[ 1101.661084] sd 13:0:0:0: [sdk] 7831552 512-byte logical blocks: (4.01 GB/3.73 GiB)
[ 1101.663183] sd 13:0:0:0: [sdk] Write Protect is off
[ 1101.663185] sd 13:0:0:0: [sdk] Mode Sense: 23 00 00 00
[ 1101.664598] sd 13:0:0:0: [sdk] No Caching mode page found
[ 1101.664600] sd 13:0:0:0: [sdk] Assuming drive cache: write through                                                                                                                                                                       
[ 1101.709894]  sdk: sdk1                                                                                                                                                                                                                   
[ 1101.716771] sd 13:0:0:0: [sdk] Attached SCSI removable disk
[ 1499.837476] udevd[9342]: inotify_add_watch(7, /dev/sdj1, 10) failed: No such file or directory

from when i left it in at boot..
_________________
"My father rode a camel. I drive a car. My son flies a jet-plane. His son will ride a camel."
—Saudi saying
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43208
Location: 56N 3W

PostPosted: Sat Oct 14, 2017 7:15 pm    Post subject: Reply with quote

truekaiser,

That all looks normal.

What of the sync command and sync followed by umount, after the drive has been written to?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum