Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I would think that disks are assigned when udev runs at boot, so maybe running start_udev as root would do the trick.
Thanks for the response.
I just created another disk for this VM to test your suggestion and this time the device file is created automatically and the disk is available to use I'm more confused now!
I ran the same commands and saw the same output in syslog and dmesg.
Does anybody have experience of this not always working and if so, what to do (other than reboot!) in those circumstances?
Try doing a partprobe -s after you rescan the scsi bus. I'm not able to test myself.
When I did the test fdisk -l (which I think is the equivalent) it did not list this disk. If there is no device file, I'm not sure tools such as these can attempt to read partition information.
When I did the test fdisk -l (which I think is the equivalent) it did not list this disk. If there is no device file, I'm not sure tools such as these can attempt to read partition information.
Fdisk provides the kernel's view of the partition table. Partprobe syncs the scsi midlayer changes witth the kernel. So no, they are not equivalent.
Since your new disk was visible to the scsi mid layer (/proc/scsi/scsi) it seemed to me that this could work. But it seems there is some flaky behavior from your description
Fdisk provides the kernel's view of the partition table. Partprobe syncs the scsi midlayer changes witth the kernel. So no, they are not equivalent.
Since your new disk was visible to the scsi mid layer (/proc/scsi/scsi) it seemed to me that this could work. But it seems there is some flaky behavior from your description
Thanks for highlighting this difference to me; so I guess fdisk -l just reports the contents of /proc/partitions
Whilst, partprobe -s, as per the man page will:
"partprobe is a program that informs the operating system kernel of partition table changes, by requesting that the operating system re-read the partition table."
So from what you're saying and the man page info above the difference is that the OS will re-read disk partitions to re-populate the kernels view with the latest data - would this then have udev create device files for devices with no entries?
In other Unix flavours there are specific commands to create new device files for new hardware (aside from mknod), such as insf in HP-UX. Is there any equivalent for RHEL?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.