Today, I want to create an ISO library on XenServer7, but I found a problem that I have not encountered before. The symptoms are as follows:
[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.
The system prompts that the global read-only command is not allowed. After gg's search, the solution was finally found on Citrix's official website.
[Root @ DS-Server04 ~] # Pvs
Pv vg Fmt Attr PSize PFree
/Dev/sda3 VG_XenStorage-8e812398-6d55-b06a-2907-ac95c4c12533 lvm2 a -- 7.24 t 7.24 t
[Root @ DS-Server04 ~] # Vgs
VG # PV # LV # SN Attr VSize VFree
VG_XenStorage-8e812398-6d55-b06a-2907-ac95c4c12533 1 1 0 wz -- n-7.24 t 7.24 t
[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.00 m
This is a newly installed 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,983 04, 163840,229 376, 294912,819 200, 884736,160 5632, 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-
[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 84 K 2.0G 1%/dev/shm
Tmpfs 2.0G 1.6 M 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 55 M55 M 0 100%/var/xen/xc-install
/Dev/sda4 512 M 2.0 M 510 M 1%/boot/efi
/Dev/sda5 4.0G 140 M 3.7G 4%/var/log
Tmpfs 393 M 0 393 M 0%/run/user/0
/Dev/VG_XenStorage-8e812398-6d55-b06a-2907-ac95c4c12533/local_iso 20G 45 M 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
Download an image
[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