You are not logged in.
Pages: 1
Topic closed
Is there a way to rescan USB Bus in ArcLinux? For example, if I eject a USB Stick or Card by Eject command in XFCE, but won't detach it from the PC, how I can rescan it later to assign device name / number again, so that it can be auto re-mounted, hopefully by UDEV. Is fstab record required to re-mount in this case? I don't want to remove and reinsert the stick each time it was Ejected, as at times its not required for my tasks.
Last edited by sambul13 (2012-10-21 19:42:20)
Offline
read `man udevadm`, specifically the "trigger" section.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Online
Can you suggest some udevadm command examples for a generic USB Stick rescan?
Offline
Have you read the man page trilby recommended? What have you tried?
Please do not expect to be spoonfed here; it doesn't help you and it has a detrimental effect on the community.
Offline
I don't expect to be spoon-fed. The Manual IMHO doesn't remotely resemble that term.
What subsystem a USB Stick belongs too?
What's its list of Attributes and Properties with allowed Values for each? How to find it out at that stage, when its visible as /dev/sdb only?
Anyone actually tried to rescan a USB Bus to remount an ejected USB Stick? What command did you use successfully? This is not an unusual exersize, but rather a typical one. For that reason, Windows Device Manager has command: Rescan Hardware, and its used often by millions. Why its missing in ArchLinux, and nowhere mentioned in any Wiki, including Udev & Systemd?
Last edited by sambul13 (2012-10-20 20:33:20)
Offline
It is missing in Arch Linux because you havne't implemented it.
All your other questions can be answered on the same man page you apparently only read a small part of. So yes, it seems you do expect to be spoon fed.
Offline
You do expect to be spoon fed.
I didn't expect something like that on the forum aimed to share solutions, not try teaching moral without having a teacher diploma. Plenty of aggression with no useful feedback. Meanwhile, searching Google, there is absolutely NO success reported in rescanning USB bus in ArchLinux or other Linux incarnation. I tried udevadm settle & trigger, it just lists devices, nothing more.
One doesn't look smart by merely being rude to others. Show you can do MORE by offering a working tested by you solution, not empty words. Compare number of my posts to yours - and prove, not all your posts were empty garble like the above. Did you help others on this forum with something, they can actually use? Otherwise, what this forum is for - empty replicas with no payload? One won't succeed in that, only diminish of what "number of posts" here actually means.
Last edited by sambul13 (2012-10-21 11:11:43)
Offline
One doesn't look smart by merely being rude to others.
You are absolutely right, so stop.
Show you can do MORE by offering a working tested by you solution
I have no desire to show you anything. Do you really normally treat people this way? We are not your employees - even if we were, you'd be a pretty nasty boss.
Perhaps my suggestion wasn't perfect. I won't defend it. But I no longer have any interest in following up and helping you come up with anything better.
Good luck on your own.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Online
@Trilby, word.
Offline
What subsystem a USB Stick belongs too?
What's its list of Attributes and Properties with allowed Values for each? How
to find it out at that stage, when its visible as /dev/sdb only?
As the man page makes clear, these questions can be answered using udevadm info.
You accuse the people tying to help you of being rude, but you (a) do not extend
the courtesy of actually following the suggestions that have been provided, and
(b) couch your comments as explicit criticisms of the shortcomings of Linux
generally and the Arch wiki specifically.
If you want help from a community of volunteers, you might want to seek that
help a little more graciously.
Offline
@Trilby, word.
Thanks to all above. Going back to the subject of this thread, was anyone successful in rescanning a USB Bus in ArcLinux and remounting an ejected USB Stick? Suggested udevadm command doesn't seem to do that, but another approach may exist.
This thread is depersonalized now. Share your own success story in a way others can replicate, including Linux novices. Talk about your own solution, you will be the first on the web to report it. Of course, you read some Manual, but did you manage to remount USB Stick - how? Don't give anyone here a warm advice of any kind, just post the code you used to rescan USB bus and remount own USB Stick. We know, the folks giving irrelevant advice without testing it first, don't honor themselves and Linux community.
Don't shame yourself by claiming superiority you don't have - all community members are equal, despite having different knowledge and skills. Don't paint others as lazy and ungrateful, if your own contribution to this topic is zero.
Last edited by sambul13 (2012-10-21 13:54:12)
Offline
Seriously? You don't know when to quit, do you? Please go read the man page, it is all there.
Offline
do not expect to be spoonfed here; it doesn't help you and it has a detrimental effect on the community.
Attempting to teach morals and giving wrong advice while incapable to offer real solution is a lot more detrimental to the community.
you (a) do not extend
the courtesy of actually following the suggestions that have been provided
As mentioned several times above, I tried udevadm command and it doesn't seem to do the task. Are you able to post the CODE (not moral) allowing to rescan USB Bus and remount USB Stick or Card? Lets forget about the Manual - its irrelevant as udevamd can't do the task discussed here, unless you show otherwise. Should I file a bug report?
you (b) couch your comments as explicit criticisms of the shortcomings of Linux
generally and the Arch wiki specifically.
Does any ArchLinux Wiki address this typical task now? No, since there is no solution. Did you find required code in any other Linux package? No, unless you can give a reference. Once the solution is found, I'll try making it accessible to the community. It may require some rewrite of udevadm code or adding a new package, which I can't do being not a programmer, just like most other members of this community.
Last edited by sambul13 (2012-10-21 17:16:45)
Offline
Hello, I'm having a problem with removing USB devices on Linux Mint Debian Edition 12. I found this thread while searching for solutions, and I just registered to comment that this is the worst treatment of a new Linux user I have ever seen. Granted, I haven't looked much, but this must be one big reason why so many people use Windows and so few use Linux.
Now, I am a programmer, I have been using BSD and Linux for the past 15 years, and I did look at the udevadm man page. The man page is dense, the info section does not explain how to use the path or name options to identify a device, and worst of all there is no "Examples" section. I think udevadm may help with my problem, but it's going to take either a lot more help or a lot more research to solve it.
Now, for sambul13's problem, I may have some other ideas. First, the Xfce eject command may simply have unmounted your device. Which means you simply need to mount it again. The easiest way to figure out how to mount it properly is probably to find its /etc/mtab entry while it's mounted, copy that to /etc/fstab, and then type "mount" followed by the path the device was mounted on.
If that doesn't work, I did come across these instructions, which didn't work for me (the first modprobe simply froze), but may work for you.
Offline
Let's say your USB disk shows up as /dev/sdc, with partitions such as /dev/sdc1. After running "eject /dev/sdc", you won't see sdc in /proc/partitions -- but you do still see a /dev/sdc entry (but not /dev/sdc1 or any other partitions).
At this point, you can run "eject -t /dev/sdc", and your partitions come back, as if you removed and re-inserted your USB device.
If you don't know which "/dev/sdX" device to use, look for any /dev/sdX that isn't in /proc/partitions.
Offline
Thanks for the input derekp7, but please keep an eye on thread dates - this thread is over two years old. As the OP hasn't even been around in a year or so, we can close this thread.
Closed.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Online
Pages: 1
Topic closed