公司xenserver搭建的使用

[root@xenserver ~]# ls -l /dev/disk/by-path/
total 0
lrwxrwxrwx 1 root root  9 Jan 19 16:33 pci-0000:00:1f.2-scsi-0:0:0:0 -> ../../sda
lrwxrwxrwx 1 root root 10 Jan 19 16:33 pci-0000:00:1f.2-scsi-0:0:0:0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jan 19 16:33 pci-0000:00:1f.2-scsi-0:0:0:0-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jan 19 16:33 pci-0000:00:1f.2-scsi-0:0:0:0-part3 -> ../../sda3
lrwxrwxrwx 1 root root  9 Jan 19 16:33 pci-0000:00:1f.2-scsi-4:0:0:0 -> ../../sdb

xe sr-create type=lvm content-type=user device-config:device=/dev/disk/by-path/pci-0000:00:1f.2-scsi-4:0:0:0 name-label="diskb"

xe sr-create type=lvm content-type=user device-config:device=/dev/disk/by-id/edd-int13_dev81-part1 name-label="Local storage 2"


查看所有硬盘了的id
ls -l /dev/disk/by-id/

记下硬盘的全称.接下来开始挂载
xe sr-create type=lvm content-type=user device-config:device=/dev/disk/by-id/scsi-SATA_ST1000NM0033-9Z_Z1W19ZH8-part1 name-label="Local storage 2"

 scsi-SATA_ST1000NM0033-9Z_Z1W19ZH8-part1
-config:device=/dev/disk/by-id/后面跟的是刚才记下的SCSI
name-label="Local storage 2"是你需要创建的名字.可以任意更改
=======================================================================================================================================================================
[root@xenserver ~]# xe sr-create type=lvm content-type=user device-config:device=/dev/disk/by-id/scsi-SATA_ST1000NM0033-9Z_Z1W19ZH8-part1 name-label="Local storage 2"
62abbc5e-4829-4d40-0f79-92ac2d3e70eb


[root@xenserver ~]# ls -l /dev/disk/by-id/
total 0
lrwxrwxrwx 1 root root  9 Jan 21 13:52 scsi-SATA_ST1000NM0033-9Z_Z1W19Z01 -> ../../sda
lrwxrwxrwx 1 root root 10 Jan 21 13:52 scsi-SATA_ST1000NM0033-9Z_Z1W19Z01-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jan 21 13:52 scsi-SATA_ST1000NM0033-9Z_Z1W19Z01-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jan 21 13:52 scsi-SATA_ST1000NM0033-9Z_Z1W19Z01-part3 -> ../../sda3
lrwxrwxrwx 1 root root  9 Jan 21 13:52 scsi-SATA_ST1000NM0033-9Z_Z1W19ZH8 -> ../../sdb
lrwxrwxrwx 1 root root 10 Jan 21 13:52 scsi-SATA_ST1000NM0033-9Z_Z1W19ZH8-part1 -> ../../sdb1




xe sr-create type=lvm content-type=user device-config:device=  name-label="sda"

xe sr-create type=lvm content-type=user device-config:device=/dev/disk/by-id/scsi-SATA_ST1000NM0033-9Z_Z1W19ZH8 name-label="sdb"
xe sr-create type=lvm content-type=user device-config:device=/dev/disk/by-scsibus/SATA_ST1000NM0033-9Z_Z1W30QA2-2:0:0:0 name-label="diskb"


02c50e3f-a049-8f84-6dbb-6b0d127750f6
xe pbd-unplug uuid='02c50e3f-a049-8f84-6dbb-6b0d127750f6'


 xe pbd-unplug uuid= '02c50e3f-a049-8f84-6dbb-6b0d127750f6'

原文地址:https://www.cnblogs.com/itcomputer/p/4736092.html