xenserver 安装新硬盘_xenserver 添加本地硬盘

本文介绍了如何在XenServer7.4中扩展存储空间,包括获取host-uuid,删除旧的Local Storage,解除占用,以及添加新磁盘的详细步骤。通过这些操作,可以成功为XenServer安装新的硬盘。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

系统:XenServer7.4

安装XenSserver7.4后,Local Storage,挂载的盘过小,需要增加一块硬盘进行扩容。

操作如下:

首先获取 host-uuid

[root@xenserver-mpfstcla ~]# xe host-list

uuid ( RO) : e60429a3-b459-4e56-9df5-df6c311f6dac

一、删除旧的Local Storage,找到对应的 sr-uuid(可选)

1、找对对应的sr-uuid

[root@xenserver-mpfstcla ~]# xe sr-list

uuid ( RO) : ad19e235-5fed-4286-c7ef-7cf0f5c0e4e7

name-label ( RW): Local storage

name-description ( RW):

host ( RO): xenserver-10.192.48.138

type ( RO): ext

content-type ( RO): user

2、删除sr-uuid,提示被占用

[root@xenserver-mpfstcla ~]# xe sr-forget uuid=4b124ec4-6c66-c66b-d62d-38f5a1917841

The SR is still connected to a host via a PBD. It cannot be destroyed or forgotten.

sr: 4b124ec4-6c66-c66b-d62d-38f5a1917841 (Removable storage)

# 查看被占用的信息

#xe pbd-list sr-uuid=4b124ec4-6c66-c66b-d62d-38f5a1917841

[root@xenserver-mpfstcla ~]# xe pbd-list sr-uuid=4b124ec4-6c66-c66b-d62d-38f5a1917841

uuid ( RO) : 233c2541-0c66-3a11-7ac7-d2014821634e

host-uuid ( RO): e60429a3-b459-4e56-9df5-df6c311f6dac

sr-uuid ( RO): 4b124ec4-6c66-c66b-d62d-38f5a1917841

device-config (MRO): location: /dev/xapi/block

currently-attached ( RO): true

#解除占用

# xe pbd-unplug uuid=233c2541-0c66-3a11-7ac7-d2014821634e

# xe sr-forget uuid=4b124ec4-6c66-c66b-d62d-38f5a1917841

二、重启后。添加新磁盘

#1、列出设备,发现Sda设备是正在使用的设备,sdb需要添加

[root@xenserver-mpfstcla ~]# ll /dev/disk/by-id/

total 0

lrwxrwxrwx 1 root root 9 May 25 15:33 scsi-3600605b00b7451d01ea17e7a03a7f512 -> ../../sda

lrwxrwxrwx 1 root root 10 May 25 15:33 scsi-3600605b00b7451d01ea17e7a03a7f512-part1 -> ../../sda1

lrwxrwxrwx 1 root root 10 May 25 15:33 scsi-3600605b00b7451d01ea17e7a03a7f512-part2 -> ../../sda2

lrwxrwxrwx 1 root root 9 May 25 15:33 scsi-3600605b00b7451d01ea3cf250c51c1bd -> ../../sdb

lrwxrwxrwx 1 root root 9 May 25 15:33 wwn-0x600605b00b7451d01ea17e7a03a7f512 -> ../../sda

lrwxrwxrwx 1 root root 10 May 25 15:33 wwn-0x600605b00b7451d01ea17e7a03a7f512-part1 -> ../../sda1

lrwxrwxrwx 1 root root 10 May 25 15:33 wwn-0x600605b00b7451d01ea17e7a03a7f512-part2 -> ../../sda2

lrwxrwxrwx 1 root root 9 May 25 15:33 wwn-0x600605b00b7451d01ea3cf250c51c1bd -> ../../sdb

/2、添加硬盘,device以及host-id更改

#xe sr-create content-type=user device-config:device=/dev/disk/by-id/scsi-3600605b00b7451d01ea3cf250c51c1bd host-uuid=e60429a3-b459-4e56-9df5-df6c311f6dac name-label="Local Storage" shared=false type=lvm

2e6224ff-8573-807c-c414-e4b670f5f971

xenserver 能查看到 Local Storage。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值