XenServer之XenServer 7 上创建本地ISO库

今天在XenServer7 上想创建个ISO库,但是发现出现一个之前没有过的问题,症状如下

[root@DS-Server04 ~]# lvcreate -L 20G -n local_iso `vgs|awk 'NR==2{print $1}'`
  lvcreate -L 20G -n local_iso VG_XenStorage-8e812398-6d55-b06a-2907-ac95c4c12533: Command not permitted while global/metadata_read_only is set.

居然提示全局只读 命令不允许。经过gg的查找最后在思杰官方找到了解决方法

[root@DS-Server04 ~]# pvs
  PV         VG                                                 Fmt  Attr PSize PFree
  /dev/sda3  VG_XenStorage-8e812398-6d55-b06a-2907-ac95c4c12533 lvm2 a--  7.24t 7.24t
[root@DS-Server04 ~]# vgs
  VG                                                 #PV #LV #SN Attr   VSize VFree
  VG_XenStorage-8e812398-6d55-b06a-2907-ac95c4c12533   1   1   0 wz--n- 7.24t 7.24t
[root@DS-Server04 ~]# lvs
  LV   VG                                                 Attr       LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  MGT  VG_XenStorage-8e812398-6d55-b06a-2907-ac95c4c12533 -wi-a----- 4.00m

这是一台刚装好系统的XenServer 7,

[root@DS-Server04 ~]# lvcreate -L 20G -n local_iso `vgs|awk 'NR==2{print $1}'`  --config global{metadata_read_only=0}
  Logical volume "local_iso" created.
[root@DS-Server04 ~]# mkfs.ext4 /dev/`vgs|awk 'NR==2{print $1}'`/local_iso
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
1310720 inodes, 5242880 blocks
262144 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2153775104
160 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000

Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

[root@DS-Server04 ~]# blkid /dev/`vgs|awk 'NR==2{print $1}'`/local_iso
/dev/VG_XenStorage-8e812398-6d55-b06a-2907-ac95c4c12533/local_iso: UUID="70674e3f-2d08-4623-b348-2f8bb6482c4d" TYPE="ext4"
[root@DS-Server04 ~]# echo 'UUID=70674e3f-2d08-4623-b348-2f8bb6482c4d  /iso_storage  ext4  defaults    0 0' >>/etc/fstab
[root@DS-Server04 ~]# mkdir /iso_storage
[root@DS-Server04 ~]# mount -a
[root@DS-Server04 ~]# df -hP
Filesystem                                                         Size  Used Avail Use% Mounted on
/dev/sda1                                                           18G  1.8G   16G  11% /
devtmpfs                                                           2.0G     0  2.0G   0% /dev
tmpfs                                                              2.0G   84K  2.0G   1% /dev/shm
tmpfs                                                              2.0G  1.6M  2.0G   1% /run
tmpfs                                                              2.0G     0  2.0G   0% /sys/fs/cgroup
xenstore                                                           2.0G     0  2.0G   0% /var/lib/xenstored
/dev/loop0                                                          55M   55M     0 100% /var/xen/xc-install
/dev/sda4                                                          512M  2.0M  510M   1% /boot/efi
/dev/sda5                                                          4.0G  140M  3.7G   4% /var/log
tmpfs                                                              393M     0  393M   0% /run/user/0
/dev/VG_XenStorage-8e812398-6d55-b06a-2907-ac95c4c12533/local_iso   20G   45M   19G   1% /iso_storage
[root@DS-Server04 ~]# xe sr-create name-label=iso_storage type=iso device-config:location=/iso_storage device-config:legacy_mode=true content-type=iso
xe-mount-iso-sr /iso_storage

XenServer之XenServer 7 上创建本地ISO库
下载个镜像看看

[root@DS-Server04 ~]# cd /iso_storage/
[root@DS-Server04 iso_storage]# wget http://buildlogs.centos.org/rolling/7/isos/x86_64/CentOS-7-x86_64-Everything.iso

XenServer之XenServer 7 上创建本地ISO库

您可以选择一种方式赞助本站

支付宝扫一扫赞助

微信钱包扫描赞助

lookback

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: