今天在XenServer7 上想创建个ISO库,刚开始在网上查用下面的方法发现会报错。症状如下
1 2
| root@DS-Server04 ~] lvcreate -L 20G -n local_iso VG_XenStorage-8e812398-6d55-b06a-2907-ac95c4c12533: Command not permitted while global/metadata_read_only is set.
|
提示全局只读 命令不允许。
1 2 3 4 5 6 7 8 9
| [root@DS-Server04 ~]`` ``PV VG Fmt Attr PSize PFree ``/dev/sda3` `VG_XenStorage-8e812398-6d55-b06a-2907-ac95c4c12533 lvm2 a-- 7.24t 7.24t [root@DS-Server04 ~]`` ``VG `` ``VG_XenStorage-8e812398-6d55-b06a-2907-ac95c4c12533 1 1 0 wz--n- 7.24t 7.24t [root@DS-Server04 ~]`` ``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
|
通过下面的方法成功
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| [root@DS-Server04 ~] Logical volume "local_iso" created. [root@DS-Server04 ~] 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 ~] 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-mount-iso-sr /iso_storage
|
上传镜像
1 2
| [root@DS-Server04 ~] [root@DS-Server04 iso_storage]
|