如下是翻译自redhat官网:
基于路径的方式指定的设备名称是不持久的。任何时候都可能随着系统的重新配置而发生改变,可能是手动的操作,亦或是系统重启。(本人在这一点是无法理解的。实际上基于设备扫描的顺序而定义的设备名称确实是容易发生改变的,但是基于路径或者说是实际的PCI地址确实毋庸置疑的) It is even possible for the path identifiers to change when no physical reconfiguration has been done, as a result of timing variations during the discovery process when the system boots, or when a bus is re-scanned.(总线被重新扫描,系统重启的构成中,发现进程确实会对路径的认知发生改变)
For iSCSI devices, by-path/ names map from the target name and portal information to the sd name.
It is generally not appropriate for applications to use these path-based names. This is because the storage device these paths reference may change, potentially causing incorrect data to be written to the device. Path-based names are also not appropriate for multipath devices, because the path-based names may be mistaken for separate storage devices, leading to uncoordinated access and unintended modifications of the data.
In addition, path-based names are system-specific. This can cause unintended data changes when the device is accessed by multiple systems, such as in a cluster.
For these reasons, several persistent, system-independent, methods for identifying devices have been developed. The following sections discuss these in detail.
实际上,从上面说通过by-path的方式识别设备存在弊端:
1)多目录配置,举例来说:对于集群
2)扫描路径的过程中有可能指定错误
解决方案:实际上,通过在划分分区的时候,指定唯一的卷标,认为可以非常好的解决这个问题。实践证明:通过卷标指定根文件系统 root=LABEL=xxxx,很好的解决根文件系统的设备名称飘逸问题。
对于存储设备,对设备的分区建立唯一的卷标,通过卷标对格式化后的文件系统进行挂载,在系统启动之后,不会挂载错误,非常有帮助。大部分的存储设备都是由矩阵阵列,当所有的硬盘通过阵列卡连接到主板上的时候,盘符之间的飘逸不可避免。如果贸然使用/dev/sda等名称进行挂载,很可能会对系统盘进行数据的写入,这对于整个系统的稳定性,绝对是一个隐患。而对分区进行卷标的部署,却可以轻松解决盘符的问题,因为无论系统重新启动多少次,设备分区的盘符是不会改变的。