码迷,mamicode.com
首页 > 其他好文 > 详细

XEN SERVER 7.2 中增加硬盘

时间:2021-04-21 12:44:08      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:如何   不同   swa   linu   size   com   and   技术   star   

很多服务器都会多块盘或者做了Raid的多个虚拟磁盘,而安装xenserver后,他只会默认挂载第一快盘,也就是安装xenServer系统的那块。
 那剩余的其他盘,怎么挂载上去做虚拟机的存储用呢?或者后期新增一块磁盘该如何操作呢?

1、用命令查看下自己的host-uuid

[root@xenserver-testT1 ~]# xe host-list
uuid ( RO)                : e0aadd21-2970-48cc-ba17-b322ed42466d
          name-label ( RW): xenserver-testT1
    name-description ( RW): Default install

2、查看需要挂载的分区

[root@xenserver-testT1 ~]# ls /dev/disk/by-path
pci-0000:00:14.0-usb-0:4:1.0-scsi-0:0:0:0  pci-0000:00:1f.2-ata-3.0-part2  pci-0000:00:1f.2-ata-3.0-part5  pci-0000:00:1f.2-ata-4.0-part1
pci-0000:00:1f.2-ata-3.0                   pci-0000:00:1f.2-ata-3.0-part3  pci-0000:00:1f.2-ata-3.0-part6
pci-0000:00:1f.2-ata-3.0-part1             pci-0000:00:1f.2-ata-3.0-part4  pci-0000:00:1f.2-ata-4.0

上图中,大家要学会灵活分析磁盘分区,pci-0000:00:14.0-usb-0:4:1.0-scsi-0:0:0:0这个很明显与其他都不同,那它应该就是光驱了,pci-0000:00:1f.2-ata-3.0和后面的part1-part6就是第一块系统盘的所有分区,那剩下pci-0000:00:1f.2-ata-4.0这个就是我们要挂载的第二块磁盘了,后面的part1 就是这个盘的分区。可以通过fdisk验证

[root@xenserver-testT1 ~]# fdisk -l

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: gpt


#         Start          End    Size  Type            Name
 1     46139392     83888127     18G  Microsoft basic 
 2      8390656     46139391     18G  Microsoft basic 
 3     87033856   1953525134    890G  Linux LVM       
 4     83888128     84936703    512M  BIOS boot parti 
 5         2048      8390655      4G  Microsoft basic 
 6     84936704     87033855      1G  Linux swap      

Disk /dev/mapper/VG_XenStorage--1b0b09c7--d550--d013--166e--2b4223cf3588-MGT: 4 MB, 4194304 bytes, 8192 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mapper/VG_XenStorage--8f93f732--9d7b--b792--856b--69a3451a7422-MGT: 4 MB, 4194304 bytes, 8192 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

 3、挂载第2块硬盘到系统中,挂载成功会返回新存储的UUID

[root@xenserver-testT1 ~]# xe sr-create type=lvm content-type=user device-config:device=/dev/disk/by-path/pci-0000:00:1f.2-ata-4.0 name-label=‘Disk 2‘
8f93f732-9d7b-b792-856b-69a3451a7422

替换掉pci-0000:03:00.0-scsi-0:2:1:0为自己的磁盘分区ID即可;Disk 2是第二块盘的存储名称,可以自定义。
 
4、切换到XenCenter界面可以看到已经多了一个名为Disk 2的本地存储了

技术图片

 

XEN SERVER 7.2 中增加硬盘

标签:如何   不同   swa   linu   size   com   and   技术   star   

原文地址:https://www.cnblogs.com/xzlive/p/14680706.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!