storage R&D guy.
全部博文(1000)
分类: 服务器与存储
2015-03-30 10:34:50
/lib/udev # udevadm info --query=all --path=/block/sda
P: /devices/platform/host0/target0:0:3/0:0:3:0/block/sda
N: sda
S: block/8:0
S: disk/by-path/scsi-0:0:3:0
E: UDEV_LOG=3
E: DEVPATH=/devices/platform/host0/target0:0:3/0:0:3:0/block/sda
E: MAJOR=8
E: MINOR=0
E: DEVNAME=/dev/sda
E: DEVTYPE=disk
E: ID_VENDOR=Seagate
E: ID_VENDOR_ENC=Seagate\x20
E: ID_MODEL=ST32000542AS
E: ID_MODEL_ENC=ST32000542AS\x20\x20\x20\x20
E: ID_REVISION=CC34
E: ID_TYPE=disk
E: ID_BUS=scsi
E: ID_PATH=scsi-0:0:3:0
E: /dev/sdb4: LABEL=RESOURCE" UUID="31657086-11c0-b30a-e562-b0ab7c7242e8
E: /dev/sdb3: LABEL=DATABASE_USE" UUID="4c5b5a85-7e53-09fc-d07a-800e744633f3
E: /dev/sdb2: LABEL=SYSTEM" UUID="f8783d4c-75a7-fb72-2673-44d48be252d3
E: /dev/sdb1: LABEL=ROOT" UUID="288fc41b-a11d-6a75-f348-cee02b740b1c
E: /dev/sda4: LABEL=RESOURCE" UUID="1516-1567
E: /dev/sda3: LABEL=DATABASE_USE" UUID="836b92b5-e7bf-42e5-8fd9-0d221961d9f2
E: /dev/sda2: LABEL=SYSTEM_USE" UUID="5355d48f-c717-4ae5-b1d9-8891b1afb69b
E: /dev/sda1: LABEL=ROOT" UUID="56dc4020-35e3-43f3-9b36-94e51844caf1
E: DEVLINKS=/dev/block/8:0 /dev/disk/by-path/scsi-0:0:3:0
udevadm info --query=all --name=/dev/sda 输出结果和上面一样
udevadm info --export-db | less 查看udev database,输出所有节点信息
udevadm test /block/sda
/lib/udev # ./scsi_id --export --whitelisted -d /dev/sda
ID_VENDOR=Seagate
ID_VENDOR_ENC=Seagate\x20
ID_MODEL=ST32000542AS
ID_MODEL_ENC=ST32000542AS\x20\x20\x20\x20
ID_REVISION=CC34
ID_TYPE=disk
----------------------------------------------------------------------
命令用法:
Usage: udevadm test OPTIONS <syspath>
--action=
--help
Usage: udevadm info OPTIONS
--query=
name name of device node
symlink pointing to node
path sys device path
env the device related imported environment
all all values
--path=<syspath> sys device path used for query or attribute walk
--name=
--root prepend dev directory to path names
--attribute-walk print all key matches while walking along the chain
of parent devices
--device-id-of-file=
--export-db export the content of the udev database
--help