devstack stein 安装后创建不了卷

2015-10-15 14:02:37.786 TRACE cinder.volume.manager Command: sudo cinder-rootwrap /etc/cinder/rootwrap.conf env LC_ALL=C vgs --noheadings -o name stack-volumes-lvmdriver-1
2015-10-15 14:02:37.786 TRACE cinder.volume.manager Exit code: 5
2015-10-15 14:02:37.786 TRACE cinder.volume.manager Stdout: u‘‘
2015-10-15 14:02:37.786 TRACE cinder.volume.manager Stderr: u‘  Volume group "stack-volumes-lvmdriver-1" not found

 

解决方法:

原来是VG在devstack安装中没有创建,接着手工创建vg:
在devstack脚本中看到默认vg的创建过程
lib/lvm
function _create_lvm_volume_group

$ truncate -s 15G vg_file
yuntong@yuntong-ThinkStation:/opt/stack/data/cinder$ sudo losetup -f --show vg_file
/dev/loop0


yuntong@yuntong-ThinkStation:/opt/stack/data/cinder$ sudo vgcreate stack-volumes-lvmdriver-1 /dev/loop0
  No physical volume label read from /dev/loop0
  Physical volume "/dev/loop0" successfully created
  Volume group "stack-volumes-lvmdriver-1" successfully created

重启cinder-volume就可以创建了。

systemctl restart devstack@c-vol

 

 

说明:

TRUNCATE(1)                                                                           User Commands                                                                           TRUNCATE(1)

NAME
       truncate - shrink or extend the size of a file to the specified size

SYNOPSIS
       truncate OPTION... FILE...

DESCRIPTION
       Shrink or extend the size of each FILE to the specified size

       A FILE argument that does not exist is created.

       If a FILE is larger than the specified size, the extra data is lost.  If a FILE is shorter, it is extended and the extended part (hole) reads as zero bytes.

       Mandatory arguments to long options are mandatory for short options too.

       -c, --no-create
              do not create any files

       -o, --io-blocks
              treat SIZE as number of IO blocks instead of bytes

       -r, --reference=RFILE
              base size on RFILE

       -s, --size=SIZE
              set or adjust the file size by SIZE bytes

       --help display this help and exit

       --version
              output version information and exit

       The SIZE argument is an integer and optional unit (example: 10K is 10*1024).  Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,... (powers of 1000).

       SIZE  may  also  be prefixed by one of the following modifying characters: '+' extend by, '-' reduce by, '<' at most, '>' at least, '/' round down to multiple of, '%' round up to
       multiple of.

--------------------------------------------

LOSETUP(8)                                                                        System Administration                                                                        LOSETUP(8)

NAME
       losetup - set up and control loop devices

SYNOPSIS
       Get info:

            losetup [loopdev]

            losetup -l [-a]

            losetup -j file [-o offset]

       Detach a loop device:

            losetup -d loopdev...

       Detach all associated loop devices:

            losetup -D

       Set up a loop device:

            losetup [-o offset] [--sizelimit size] [--sector-size size]
                    [-Pr] [--show] -f|loopdev file

       Resize a loop device:

            losetup -c loopdev

DESCRIPTION
       losetup  is used to associate loop devices with regular files or block devices, to detach loop devices, and to query the status of a loop device.  If only the loopdev argument is
       given, the status of the corresponding loop device is shown.  If no option is given, all loop devices are shown.

       Note that the old output format (i.e., losetup -a) with comma-delimited strings is deprecated in favour of the --list output format.

       It's possible to create more independent loop devices for the same backing file.  This setup may be dangerous, can cause data loss, corruption and  overwrites.   Use  --nooverlap
       with --find during setup to avoid this problem.


转载于:https://www.cnblogs.com/longchang/p/11340611.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值