Results 1 to 5 of 5
Greetings, everyone. I have a question which may not seem very practical but nevertheless piqued my curiousity - is there a way to reintroduce a block device (e.g. an external ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-28-2012 #1Just Joined!
- Join Date
- Jul 2012
- Posts
- 3
Reintroduce a block device to Linux without reattaching it manually
Greetings, everyone. I have a question which may not seem very practical but nevertheless piqued my curiousity - is there a way to reintroduce a block device (e.g. an external HDD) to Linux kernel without reattaching it manually? What I mean is not just umount and mount it again but rather go deeper - make the kernel "think" that the device is detached from the system and is attached again. Thanks in advance.
- 07-28-2012 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,141
Is there any particular reason why you want to do this? So, you want it to release the /dev/name such as /dev/sdn, and then reassign it at your command?
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 07-28-2012 #3Just Joined!
- Join Date
- Jul 2012
- Posts
- 3
Thank you for reply, Rubberman.
It's a mere curiosity. Also, I'd like to understand better how the kernel discovers new hardware and configures it.Is there any particular reason why you want to do this?
Well, sort of. Since I'm not familiar very well with Linux kernel's way of doing this work, I can't say if your words are exact paraphrase of my question. Simply put, I'm interested in "simulating" disconnection of a hardware using shell command or system call so it would appear to the OS as I physically reattached the device. Besides, it'd be convenient to make the kernel rediscover and automatically remount my external HDD without having to reattach it manually. I know that I can just remount it, but I'm looking for another way. In other words, I want more control over this process. It's always good to have more than 1 option.So, you want it to release the /dev/name such as /dev/sdn, and then reassign it at your command?
- 07-28-2012 #4Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,141
You might want to look at these resources for more information about this subject:
1. Chapter*8.*Dynamic Kernel Device Management with udev
2. http://www.kernel.org/doc/ols/2002/o...es-368-375.pdf
FWIW, two sites that are very useful for learning about low-level Linux cruft are these:
www.kernel.org
www.tldp.orgSometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 07-28-2012 #5Just Joined!
- Join Date
- Jul 2012
- Posts
- 3
Much appreciated, Rubberman.


Reply With Quote
