The scsi_id command issues a SCSI INQUIRY command to the device to access the vital product data (VPD) page 0x83 data, which contains, amongst other information, the device WWID, or page 0x80 data, which contains the unit serial number.
The result of the scsi_id command (the long string of characters) is the WWID of the device that is currently mapped to /dev/sdc (/sys/block/sdc). This WWID will be the same for each path to the device and for each partition on the device. The WWID will not change if other devices are added to or removed from the system. However the mapping of the device to /dev/sdc could change. This is why there is a need to create a static device name. The WWID is what the udev device names will be keyed off of.
Rules는 반드시 장치의 이름에 대해사 만들어져야 된다. /etc/udev/rules.d/20-names.rules 파일을 만들어라. 이 파일로 , 이름 규칙이 추가될 것이다. 규칙은 아래의 포맷과 같을 것이다:
이것은 /dev/sd*로 매칭되는 모든 SCSI장치를 체크하고, 주어진 wwid에 대해서 체크될 것이다.매칭되는 장치가 발견되면, 이것은 /dev/devicename으로 만들것이다. 만약 장치에 다른 파티션이 있다면, 첫번째 파티션에 대해서 /dev/devicename1 로 만들어 질것이고, 두번째는 /dev/devicename2 으로 만들어 질것이고, 계속 그렇게 진행 될 것이다. 이제 실제 사용하는 규칙은 ,위의 stringsWWID 와 장치 이름 대신 아래와 같이 바꿔 사용하면 될 것이다. 아래는 실제 사용한 예이다.:
As long as the device with WWID 3600a0b800013275100000015427b625e is attached/visible to Red Hat Enterprise Linux, it will always be statically bound to the name /dev/mydevice by udev.
첫댓글 http://kbase.redhat.com/faq/docs/DOC-4202
http://kbase.redhat.com/faq/docs/DOC-7319
http://kbase.redhat.com/faq/docs/DOC-5544