當系統開機時,devlabel restart 指令是由 /etc/rc.sysinit 程式碼所呼叫,以及由 /etc/hotplug/ 目錄中適當的程式碼呼叫。
devlabel 指令的 restart 參數讀取設定檔案 (/etc/sysconfig/devlabel) 中的裝置清單,並依照符號連結以找出 該裝置是否仍存在於它之前的位置,如 /dev/hdb1。 假如該符號連結 已無效,它將會依據磁碟的 UUID 試著找出該磁碟的新位置,假如找到相同 UUID 的磁碟, 將會更新符號連結以指向該磁碟的新位置,設定檔案也會更新為含括該新的位置,而且會顯示 類似如下的訊息:
Device name incorrectly detected for symlink /dev/work! The device /dev/hdb1 is now /dev/hdd1. The symlink /dev/work will now point to the new device name. |
假如找不到含有相同 UUID 的磁碟(例如該磁碟已經被移除),將會顯示下列訊息:
The device /dev/hdb1 no longer seems to exist. Because of this, the symlink /dev/work -> /dev/hdb1 will not be available. The reference to this symlink in /etc/sysconfig/devlabel will be ignored. |
設定檔案中該裝置的紀錄項將不會被移除,將只會暫時忽略它。