9. Add the Block Storage service

Source: Internet
Author: User

Block Storage Server:

1. sudo apt-get install python-mysqldb 2. sudo apt-get install lvm2 3. Create a storage volume sudo pvcreate/dev/sdbsudo vgcreate cinder-volumes/dev/sdb 4. sudo vi/etc/lvm/lvm.conffilter = ["a/sda1/", "a/sdb/", "r/.*/"] 5. sudo apt-get install Cinder-volume 6. sudo vi/etc/cinder/cinder.conf [Keystone_authtoken]Auth_uri = Http://controller:5000auth_host = Controllerauth_port = 35357auth_protocol = Httpadmin_tenant_name = Serviceadmin_user = Cinderadmin_password = Cinder_pass [DEFAULT]Rpc_backend = Rabbitrabbit_host = Controllerrabbit_port = 5672rabbit_userid = Guestrabbit_password = RABBIT_PASS [Database]Connection = Mysql://cinder:[email Protected]/cinder [DEFAULT]Glance_host = Controller 7. sudo service cinder-volume restart && sudo service TGT restart Controller Node:1. sudo apt-get install Cinder-api Cinder-scheduler 2. sudo vi/etc/cinder/cinder.conf [Database]Connection = Mysql://cinder:[email Protected]/cinder 3. Create databases Mysql-u root-pcreate database cinder; GRANT all privileges the cinder.* to ' cinder ' @ ' localhost ' identified by ' cinder_dbpass '; GRANT all privileges the cinder.* to ' cinder ' @ '% ' identified by ' cinder_dbpass '; 4. Sudo-s/bin/sh-c "Cinder-manage db Sync" cinder 5. Create user source Admin-openrc.shkeystone user-create--name=cinder--pass=cinder_pass [email protected]
Keystone User-role-add--user=cinder--tenant=service--role=admin 6. sudo vi/etc/cinder/cinder.conf [Keystone_authtoken]Auth_uri = Http://controller:5000auth_host = Controllerauth_port = 35357auth_protocol = Httpadmin_tenant_name = Serviceadmin_user = Cinderadmin_password = Cinder_pass [DEFAULT]Rpc_backend = Rabbitrabbit_host = Controllerrabbit_port = 5672rabbit_userid = Guestrabbit_password = RABBIT_PASS 7.  keystone service-create--name=cinder--type=volume--description= "OpenStack Block Storage" Keystone Endpoint-create \ --service-id=$ (Keystone Service-list | awk '/volume/{print $} ') \ --publicurl=http://con Troller:8776/v1/%\ (tenant_id\) s \ --internalurl=http://controller:8776/v1/%\ (tenant_id\) s \ --adminurl =http://controller:8776/v1/%\ (tenant_id\) skeystone service-create--name=cinderv2--type=volumev2--description= " OpenStack Block Storage v2 "Keystone Endpoint-create \ --service-id=$ (Keystone Service-list | awk '/volumev2/{Prin T-$} ') \ --publicurl=http://controller:8776/v2/%\ (tenant_id\) s \ --internalurl=http://controller:8776/ V2/%\ (tenant_id\) s \ --adminurl=http://controller:8776/v2/%\ (tenant_id\) s 8. sudo service cinder-scheduler restart && sudo service cinder-api restart   Verify:1. SOURCE demo-openrc.sh 2. Cinder Create--display-name Myvolume 1 3. Cinder List

9. Add the Block Storage service

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.