使用pvscan列出卷
[root@xenserver log]# pvscan
  PV /dev/sda3   VG XSLocalEXT-c3fcb5cf-3cb4-5e09-2553-589644de07b7   lvm2 [3.63 TB / 0    free]
  Total: 1 [3.63 TB] / in use: 1 [3.63 TB] / in no VG: 0 [0   ]
 
记录下uuid=c3fcb5cf-3cb4-5e09-2553-589644de07b7 type=lvm
创建出这个uuid的存储
[root@xenserver ~]# xe sr-introduce uuid=c3fcb5cf-3cb4-5e09-2553-589644de07b7 type=lvm name-label=”Local storage” content-type=user
The server failed to handle your request, due to an internal error.  The given message may give details useful for debugging the problem.
message: Db_exn.Uniqueness_constraint_violation("SR", "uuid", "c3fcb5cf-3cb4-5e09-2553-589644de07b7")

下面的error信息不用管,表示已经存在了这个uuid,不用重复创建

找到SR分区的SCSI ID
[root@xenserver log]# ls -l /dev/disk/by-id/ 
总计 0
lrwxrwxrwx 1 root root  9 03-09 10:27 scsi-3644a8420058cc100212d5f6f0ee3c7a9 -> ../../sda
lrwxrwxrwx 1 root root 10 03-09 10:27 scsi-3644a8420058cc100212d5f6f0ee3c7a9-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 03-09 10:27 scsi-3644a8420058cc100212d5f6f0ee3c7a9-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 03-09 10:27 scsi-3644a8420058cc100212d5f6f0ee3c7a9-part3 -> ../../sda3

注意是sda3

列出服务器的UUID
[root@xenserver log]# xe host-list 
uuid ( RO)                : e6d4f304-3a2e-446e-9fd8-a585b36c08b9
          name-label ( RW): xenserver
    name-description ( RW): Default install of XenServer
通过设置scsi id、host id、sr uuid检测出pdb uuid
[root@xenserver log]# xe pbd-create sr-uuid=c3fcb5cf-3cb4-5e09-2553-589644de07b7 device-config:device=/dev/disk/by-id/scsi-3644a8420058cc100212d5f6f0ee3c7a9-part3 host-uuid=e6d4f304-3a2e-446e-9fd8-a585b36c08b9

f1de0e17-dda0-abdd-1c5d-af02e91d2224
这里得到的pdb uuid=f1de0e17-dda0-abdd-1c5d-af02e91d2224
把存储还原
[root@xenserver log]# xe pbd-plug uuid=f1de0e17-dda0-abdd-1c5d-af02e91d2224

原文来自:

本文地址://gulass.cn/xenserver-sr.html编辑:吴向平,审核员:逄增宝

本文原创地址://gulass.cn/xenserver-sr.html编辑:xiangping wu,审核员:暂无