设为首页 收藏本站
查看: 820|回复: 0

[经验分享] openstack之dashboard与cinder(二)

[复制链接]
YunVN网友  发表于 2018-6-1 11:04:06 |阅读模式
  前提:时间必须同步
  检测是否连接上:
  [root@linux-node1 ~]# cinder service-list
  +------------------+-------------------------------+------+---------+-------+----------------------------+-----------------+
  |      Binary      |              Host             | Zone |  Status | State |         Updated_at         | Disabled Reason |
  +------------------+-------------------------------+------+---------+-------+----------------------------+-----------------+
  | cinder-scheduler |   linux-node1.oldboyedu.com   | nova | enabled |   up  | 2016-01-17T08:27:45.000000 |        -        |
  |  cinder-volume   | linux-node2.oldboyedu.com@lvm | nova | enabled |   up  | 2016-01-17T08:27:45.000000 |        -        |
  +------------------+-------------------------------+------+---------+-------+----------------------------+-----------------+
  [root@linux-node1 ~]# ssh cirros@192.168.56.102
  cirros@192.168.56.102's password:
  $ ifconfig
  eth0      Link encap:Ethernet  HWaddr FA:16:3E:CA:21:75
  inet addr:192.168.56.102  Bcast:192.168.56.255  Mask:255.255.255.0
  inet6 addr: fe80::f816:3eff:feca:2175/64 Scope:Link
  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  RX packets:2309 errors:0 dropped:0 overruns:0 frame:0
  TX packets:162 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:1000
  RX bytes:151251 (147.7 KiB)  TX bytes:16822 (16.4 KiB)
  lo        Link encap:Local Loopback
  inet addr:127.0.0.1  Mask:255.0.0.0
  inet6 addr: ::1/128 Scope:Host
  UP LOOPBACK RUNNING  MTU:16436  Metric:1
  RX packets:0 errors:0 dropped:0 overruns:0 frame:0
  TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:0
  RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
  $ df -h
  Filesystem                Size      Used Available Use% Mounted on
  /dev                    242.3M         0    242.3M   0% /dev
  /dev/vda1                23.2M     18.0M      4.0M  82% /
  tmpfs                   245.8M         0    245.8M   0% /dev/shm
  tmpfs                   200.0K     20.0K    180.0K  10% /run
  $ ls /dev/vdb
  /dev/vdb
  $ sudo fdisk -l
  Disk /dev/vda: 1073 MB, 1073741824 bytes
  255 heads, 63 sectors/track, 130 cylinders, total 2097152 sectors
  Units = sectors of 1 * 512 = 512 bytes
  Sector size (logical/physical): 512 bytes / 512 bytes
  I/O size (minimum/optimal): 512 bytes / 512 bytes
  Disk identifier: 0x00000000
  Device Boot      Start         End      Blocks   Id  System
  /dev/vda1   *       16065     2088449     1036192+  83  Linux
  Disk /dev/vdb: 1073 MB, 1073741824 bytes          云硬盘
  16 heads, 63 sectors/track, 2080 cylinders, total 2097152 sectors
  Units = sectors of 1 * 512 = 512 bytes
  Sector size (logical/physical): 512 bytes / 512 bytes
  I/O size (minimum/optimal): 512 bytes / 512 bytes
  Disk identifier: 0x00000000
  Disk /dev/vdb doesn't contain a valid partition table
  $ sudo fdisk /dev/vdb
  Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
  Building a new DOS disklabel with disk identifier 0xd4202cc5.
  Changes will remain in memory only, until you decide to write them.
  After that, of course, the previous content won't be recoverable.
  Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
  Command (m for help): n
  Partition type:
  p   primary (0 primary, 0 extended, 4 free)
  e   extended
  Select (default p): p
  Partition number (1-4, default 1):
  Using default value 1
  First sector (2048-2097151, default 2048):
  Using default value 2048
  Last sector, +sectors or +size{K,M,G} (2048-2097151, default 2097151):
  Using default value 2097151
  Command (m for help): w
  The partition table has been altered!
  Calling ioctl() to re-read partition table.
  Syncing disks.
  $ sudo mkfs.ext4 /dev/vdb1
  mke2fs 1.42.2 (27-Mar-2012)
  Filesystem label=
  OS type: Linux
  Block size=4096 (log=2)
  Fragment size=4096 (log=2)
  Stride=0 blocks, Stripe width=0 blocks
  65536 inodes, 261888 blocks
  13094 blocks (5.00%) reserved for the super user
  First data block=0
  Maximum filesystem blocks=268435456
  8 block groups
  32768 blocks per group, 32768 fragments per group
  8192 inodes per group
  Superblock backups stored on blocks:
  32768, 98304, 163840, 229376
  Allocating group tables: done
  Writing inode tables: done
  Creating journal (4096 blocks): done
  Writing superblocks and filesystem accounting information: done
  $ sudo mkdir /data
  $ sudo mount /dev/vdb1 /data/
  $ sudo mount
  rootfs on / type rootfs (rw)
  /dev on /dev type devtmpfs (rw,relatime,size=248160k,nr_inodes=62040,mode=755)
  /dev/vda1 on / type ext3 (rw,relatime,errors=continue,user_xattr,acl,barrier=1,data=ordered)
  /proc on /proc type proc (rw,relatime)
  sysfs on /sys type sysfs (rw,relatime)
  devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
  tmpfs on /dev/shm type tmpfs (rw,relatime,mode=777)
  tmpfs on /run type tmpfs (rw,nosuid,relatime,size=200k,mode=755)
  /dev/vdb1 on /data type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered)
  
  $ cd /data/
  
  $ ll
  -sh: ll: not found
  $ ls
  lost+found
  $ sudo mkdir hehe
  $ sudo touch world
  $ ls
  hehe        lost+found  world
  

  [root@linux-node1 ~]# vim /etc/openstack-dashboard/local_settings                   允许修改密码
  202     'can_set_mount_point': True,
  203     'can_set_password': True,
  204     'requires_keypair': True,
  [root@linux-node1 ~]# systemctl restart httpd
  [root@linux-node2 ~]#  vim /etc/nova/nova.conf
  2735 inject_password=true
  2738 inject_key=true
  [root@linux-node2 ~]# systemctl restart openstack-nova-compute

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-498127-1-1.html 上篇帖子: openstack之dashboard与cinder(一) 下篇帖子: openstack运维实战系列(一)之keystone用户建立
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表