共计 1607 个字符,预计需要花费 5 分钟才能阅读完成。
使用 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
正文完
星哥玩云-微信公众号
