I am using a Linux host (SLES 15 SP2 with kernel version 5.3.18-24.78-default) in a SAN environment supporting NVMe devices, and so can dynamically add/remove the devices.
I noticed that when I have configured 4000+ NVMe devices to my linux host, and add more devices, the kernel recognizes immediately that a device is added by putting below messages in dmesg –
[49701.992704] nvme nvme2: rescanning namespaces. [49701.992716] nvme nvme1: rescanning namespaces. [49701.992731] nvme nvme3: rescanning namespaces. [49701.992746] nvme nvme4: rescanning namespaces.
But, the actual sysfs and /dev and other device files appear only after a delay, and sometimes this delay is larger than a minute.
I would like to understand why this delay, and is there a way to tune it. Moreover, is this delay dependent on CPU/memory available/usage ?
If somebody can help or give pointer, it will be great.
Thanks & Regards