Modify

Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#12056 closed defect (fixed)

AR71xx when re-plugging USBstick a new /dev/sd* is created

Reported by: Surfy Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: kernel Version: Trunk
Keywords: usb replugging second device Cc: nbd

Description

Basically, USB works fine:

Plug in the USB stick and it will come up as /dev/sda.
The issue is when unplugging it and plugging it back in, instead of going back to /dev/sda, /dev/sdb is created. This breaks automounting and therefore the automatic use the the USB drive.

Attachments (1)

40-mount.patch (382 bytes) - added by sebkinne@… 5 years ago.
Temporary fix for unmounting issue.

Download all attachments as: .zip

Change History (14)

comment:1 Changed 5 years ago by hnyman <hannu.nyman@…>

Sounds like another symptom of #12043, which I reported 2 days ago. I had similar experience with /dev/sdb being created (as /dev/sda was not freed properly).

comment:2 follow-up: Changed 5 years ago by Surfy

Yeah, it seems that way.

It continues though, if I re-plug the USB stick again, I get /dev/sdc and so on.

comment:3 in reply to: ↑ 2 ; follow-up: Changed 5 years ago by hnyman <hannu.nyman@…>

Replying to Surfy:

Yeah, it seems that way.

It continues though, if I re-plug the USB stick again, I get /dev/sdc and so on.

Sure, as the automatic umount does not work and the existing device(s) stays reserved. If you manually unmount it using the directory name (as using device name does not work), then /dev/sda will be reused. (e.g. 'umount /mnt' or whatever is your mounted path)

comment:4 in reply to: ↑ 3 Changed 5 years ago by Surfy

Replying to hnyman <hannu.nyman@…>:

Sure, as the automatic umount does not work and the existing device(s) stays reserved. If you manually unmount it using the directory name (as using device name does not work), then /dev/sda will be reused. (e.g. 'umount /mnt' or whatever is your mounted path)

Hmm, any way we could automate that? Even if it isn't a permanent fix? Have you done some digging?

comment:5 follow-up: Changed 5 years ago by anonymous

With 1043nd is ok, your hardware?

comment:6 Changed 5 years ago by Surfy

Alfa's Hornet-UB board.

comment:7 in reply to: ↑ 5 ; follow-up: Changed 5 years ago by hnyman <hannu.nyman@…>

Replying to anonymous:

With 1043nd is ok, your hardware?

I experience this error with my ar71xx based WNDR3700.

Which USB/mount related packages does your working config include? I have: block-mount, mount-utils, kmod-usb-storage and the fs & nls packages

https://dev.openwrt.org/ticket/11618#comment:2 suggested that the reason is faulty umount from util-linux/mount-utils, but I havnet yet tested creating a symlink to busybox.

comment:8 in reply to: ↑ 7 Changed 5 years ago by anonymous

Replying to hnyman <hannu.nyman@…>:

Replying to anonymous:

With 1043nd is ok, your hardware?

I experience this error with my ar71xx based WNDR3700.

Which USB/mount related packages does your working config include? I have: block-mount, mount-utils, kmod-usb-storage and the fs & nls packages

https://dev.openwrt.org/ticket/11618#comment:2 suggested that the reason is faulty umount from util-linux/mount-utils, but I havnet yet tested creating a symlink to busybox.

I have block-mount, kmod-usb-storage, fs packages and is ok (r33207).
Try without mount-utils

Changed 5 years ago by sebkinne@…

Temporary fix for unmounting issue.

comment:9 Changed 5 years ago by sebkinne@…

I have a solution for the problem above.

It may not be the best as it uses the following command, but it does the trick:
mount | grep $device | awk '{print $3}'

I have attached a patch for https://dev.openwrt.org/browser/trunk/package/block-mount/files/40-mount.

comment:10 Changed 5 years ago by hnyman <hannu.nyman@…>

I tested removing mount-utils and using just busybox umount: that did not help. hotplug still failed to unmount the disk.

But the patch above making hotplug to additionally use the path for umount works for me.

comment:11 Changed 5 years ago by jow

  • Resolution set to fixed
  • Status changed from new to closed

Should be fixed with r33357

comment:12 Changed 5 years ago by hnyman

Please mark also #12043 fixed. It is about this same issue.

comment:13 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.