How to Fix Missing UUID for a Newly Added Disk Without Rebooting?

0
0
Asked By CuriousCoder42 On

I recently added a new disk to my system, and while I can see it after rescanning, it unfortunately doesn't have a UUID. I've tried using the commands `pvscan` and `pvscan --cache`, but the UUID still doesn't show up. The only time it displays the UUID is after I reboot the system. Is there a way to resolve the missing UUID issue without needing to restart the machine? I've looked online, and most of the solutions I found involve those same commands or just doing a rescan.

3 Answers

Answered By DataDynamo88 On

UUIDs need to be written to the drive, and they won't just appear out of nowhere. If there are no physical volumes (PVs) created on that disk, then `pvscan` won't show a UUID for it. After you've added the disk, if the system doesn't automatically recognize it, try running a command to rescan the SCSI bus, like `for tmp in /sys/class/scsi_host/host*/scan; do echo '- - -' >> "$tmp"; done`. This should help the OS see the new drive without needing a system reboot.

Answered By FluxMasterX On

Have you checked the `/dev/disk/by-uuid` directory? It could give you some insight into what UUIDs are currently recognized by your system. Sometimes, drives take a bit to register properly without a reboot.

Answered By PartitionGuru77 On

Just a note: if the new disk is blank and doesn't have a partition table yet, it won't have a UUID. You'd need to run `pvcreate` on it to format it as a physical volume, which will generate the UUID at that point. Would you consider partitioning first, or are you looking to use the entire disk as it is?

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.