Pvcreate Create PV appears Can ' t initialize physical volume "/DEV/LOOP2" of volume Group "cinder-volumes2" Witho

Source: Internet
Author: User

First, currently using the Losetup emulated hard drive to create a VG, as follows:

Mkdidr-p/var/lib/cinder
DD If=/dev/zero of=/var/lib/cinder/cinder-volumes bs=1m count=10000
Losetup/dev/loop2/var/lib/cinder/cinder-volumes
Pvcreate/dev/loop2
Vgcreate CINDER-VOLUMES/DEV/LOOP2

(Losetup-f can query the current first block of unused loopback devices)


Second, after the restart, cinder-volumes this VG disappeared


Third, when using the first command to restore the environment, appear

[Root@compute-192-168-6-50 ~]# PVCREATE/DEV/LOOP2
Can ' t Initialize physical volume "/DEV/LOOP2" of volume Group "cinder-volumes" Without-ff


Iv. in this case, it is necessary to assist logical volumes, volume groups (and uninstall physical volumes, if necessary) in sequence.

Uninstalling logical volumes: Lvremove/dev/volgroup01/logvol00

Uninstall Vg:vgremove VOLGROUP01


V. The current operation of this set of environments is:

Vgremove Cinder-volumes


Six, if you need to save the VG after the boot, set up automatic mount

Cat/etc/rc.d/rc.local |grep Cinder-volumes | | Echo ' losetup-f/var/lib/cinder/cinder-volumes && vgchange-a y cinder-volumes ' >>/etc/rc.d/rc.local







Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.