配置xenserver本地存储

查询磁盘对应关系:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[root@xenserver-eqtwbths ~]# ll /dev/disk/by-id/
total 0
lrwxrwxrwx 1 root root 9 Jun 5 13:24 edd-int13_dev81 -> ../../sdb
lrwxrwxrwx 1 root root 10 Jun 5 14:14 edd-int13_dev81-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 9 Jun 5 13:24 edd-int13_dev82 -> ../../sdc
lrwxrwxrwx 1 root root 9 Jun 5 13:24 edd-int13_dev83 -> ../../sdd
lrwxrwxrwx 1 root root 10 Jun 5 13:24 edd-int13_dev83-part1 -> ../../sdd1
lrwxrwxrwx 1 root root 9 Jun 5 13:24 scsi-SATA_ST1000VX000-9YW_S1D3PNHD -> ../../sdc
lrwxrwxrwx 1 root root 9 Jun 5 13:24 scsi-SATA_ST1000VX000-9YW_S1D3PPH8 -> ../../sdd
lrwxrwxrwx 1 root root 10 Jun 5 13:24 scsi-SATA_ST1000VX000-9YW_S1D3PPH8-part1 -> ../../sdd1
lrwxrwxrwx 1 root root 9 Jun 5 13:24 scsi-SATA_ST1000VX000-9YW_S1D4AGVJ -> ../../sdb
lrwxrwxrwx 1 root root 10 Jun 5 14:14 scsi-SATA_ST1000VX000-9YW_S1D4AGVJ-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 9 Jun 5 13:24 scsi-SATA_ST1000VX000-9YW_S1D4AGX3 -> ../../sda
lrwxrwxrwx 1 root root 10 Jun 5 13:24 scsi-SATA_ST1000VX000-9YW_S1D4AGX3-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jun 5 13:24 scsi-SATA_ST1000VX000-9YW_S1D4AGX3-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jun 5 13:24 scsi-SATA_ST1000VX000-9YW_S1D4AGX3-part3 -> ../../sda3

准备添加sdb1作为存储

1
root@xenserver-eqtwbths ~]# xe sr-create type=lvm content-type=user device-config:device=/dev/disk/by-id/edd-int13_dev81-part1 name-label="Local storage 2(sdb)" 

2.XS删除本地存储连接

列出pdb模块,找到对应存储的UUID

1
xe pbd-list  

卸载对应uuid的存储

1
xe pbd-unplug uuid="uuid of PBD"  

列出存储的UUID,找到对应存储的UUID

1
xe sr-list  

删除本地存储连接

1
2
xe sr-destroy uuid="uuid of SR" 
xe sr-forget uuid="uuid of SR"

写于: 2014年06月05日
更新于: 2015年12月15日