XenServer使用基于文件的VHD存储时,IOSTAT命令结果应如何查找对应VM

当XenServer使用基于LVM逻辑卷的VHD时,IOSTAT的结果是酱紫的:

[root@xenserver-PDS330 ~]# iostat
Linux 2.6.32.12-0.7.1.xs5.6.100.323.170596xen (xenserver-PDS330) 05/26/2015

avg-cpu: %user %nice %system %iowait %steal %idle
0.22 0.00 0.19 0.07 1.21 98.30

Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 109.82 1238.74 1843.59 650278225 967791980
sda1 0.53 0.99 10.73 519994 5630520
sda2 0.00 0.03 0.00 13392 0
sda3 109.29 1237.73 1832.86 649743951 962161460
dm-2 0.00 0.00 0.00 1864 0
dm-3 0.67 1.20 7.65 632469 4013840
dm-4 0.88 1.58 6.55 831182 3439107
dm-6 0.00 0.01 0.00 4161 40
dm-13 0.00 0.00 0.00 587 0
dm-16 0.22 3.14 1.94 1650654 1018587
dm-17 4.07 30.88 28.87 16207821 15155800
dm-18 0.00 0.00 0.00 818 80
dm-30 5.95 261.22 217.91 137128163 114390995

好的,这个我会查:

dm-11 0.19 1.02 0.98 536930 513501

[root@xenserver-PDS330 ~]# ls -l /dev/mapper | grep ” 11 ”
brw-rw—- 1 root disk 252, 11 May 26 09:28 VG_XenStorage–07d5b8b4–e67b–7503–c840–7b6d628cd516-VHD–dd41aa0d–bc3d–47ea–bbab–7fd67cba8941
[root@xenserver-PDS330 ~]# xe vdi-param-list uuid=dd41aa0d-bc3d-47ea-bbab-7fd67cba8941 | grep “name”
name-label ( RW): Disk3359c
name-description ( RW): Data Disk
sr-name-label ( RO): Local storage

 

 

那么问题来了,使用基于文件的存储,IOSTAT是什么样的呢?

[root@PDS1477 ~]# iostat
Linux 2.6.32.12-0.7.1.xs5.6.100.323.170596xen (PDS1477) 05/25/2015

avg-cpu: %user %nice %system %iowait %steal %idle
0.32 0.00 0.34 0.28 1.29 97.77

Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 166.48 1817.85 1920.36 954183939 1007990095
sda1 0.90 2.14 18.96 1121506 9951864
sda2 0.00 0.00 0.00 1080 0
sda3 165.43 1815.71 1901.40 953060881 998038231
dm-0 170.09 1815.71 1901.40 953059960 998038231
tda 3.14 28.01 20.44 14701638 10729678
tdb 0.23 0.45 4.07 238117 2134834
tdc 0.15 2.82 0.98 1481825 516966
tdd 2.94 28.62 19.79 15020023 10387485
tde 0.03 0.03 0.25 13578 133748
tdf 1.02 2.98 9.28 1564990 4873519
tdg 0.12 0.22 1.52 114446 798782
tdh 3.48 35.97 19.98 18878217 10489141
tdi 3.70 30.43 29.88 15973451 15685617
tdj 0.08 0.40 0.80 212496 420764
tdm 2.97 4.11 36.65 2158090 19238363
tdn 2.41 9.27 22.06 4865360 11579195

天书也不过如此……

祭出Google,检索关键字:XenServer IOSTAT VM

嗯……来测试一下:

tdx 1.55 15.34 18.84 8050383 9886542

[root@PDS1477 ~]# cat /sys/block/tdx/dev
253:23
[root@PDS1477 ~]# tap-ctl list -m 23
10296 23 0 vhd /var/run/sr-mount/78704683-9b7f-1c3b-7fbf-8b930ffe9679/3bdb3e3e-709d-4026-bf6e-08340439c48f.vhd
[root@PDS1477 ~]# xe vdi-list uuid=3bdb3e3e-709d-4026-bf6e-08340439c48f
uuid ( RO) : 3bdb3e3e-709d-4026-bf6e-08340439c48f
name-label ( RW): Disk7814s
name-description ( RW): System Disk
sr-uuid ( RO): 78704683-9b7f-1c3b-7fbf-8b930ffe9679
virtual-size ( RO): 10737418240
sharable ( RO): false
read-only ( RO): false

 

Google是依旧让人感到幸福o(* ̄▽ ̄*)o

 

参考资料:Match IOSTAT devices to VHD?

发表评论

电子邮件地址不会被公开。 必填项已用*标注