![hdparm -I 不适用于逻辑卷;HDIO_DRIVE_CMD(识别)失败:无效交换](https://linux22.com/image/1355657/hdparm%20-I%20%E4%B8%8D%E9%80%82%E7%94%A8%E4%BA%8E%E9%80%BB%E8%BE%91%E5%8D%B7%EF%BC%9BHDIO_DRIVE_CMD%EF%BC%88%E8%AF%86%E5%88%AB%EF%BC%89%E5%A4%B1%E8%B4%A5%EF%BC%9A%E6%97%A0%E6%95%88%E4%BA%A4%E6%8D%A2.png)
有人知道 hdparm 是否适用于逻辑卷吗?
[root@qlnx053 home]# pvdisplay
--- Physical volume ---
PV Name /dev/sdb1
VG Name vg01_sas
PV Size 835.39 GiB / not usable 19.00 MiB
Allocatable yes (but full)
PE Size 128.00 MiB
Total PE 6683
Free PE 0
Allocated PE 6683
PV UUID lDZCKQ-twdC-zfj0-AG4W-yjnV-JjfV-WhHjQu
--- Physical volume ---
PV Name /dev/sda2
VG Name vg00_ssd
PV Size 236.49 GiB / not usable 49.00 MiB
Allocatable yes (but full)
PE Size 64.00 MiB
Total PE 3783
Free PE 0
Allocated PE 3783
PV UUID UVq6D3-u1Dd-8ty9-HQ7g-9UMS-haJg-Le1Vro
[root@qlnx053 home]# sudo hdparm -I /dev/sda2
/dev/sda2:
HDIO_DRIVE_CMD(identify) failed: Invalid exchange
[root@qlnx053 home]#
答案1
大多数使用 hdparm 的操作都需要 root 权限。此外,该命令需要驾驶对于设备参数,而不是分割就像你的例子一样。试试这个:
hdparm -I /dev/sda