#これはなに
「OpenStackクラウドインテグレーション オープンソースクラウドによるサービス構築入門」の実習をSoftLayerの無料ベアメタルで行う記録である。
第9章 ブロックボリュームを活用したデータ保護
第5章から第10章までの支援ファイルはこちら。まとめてgitでダウンロードできる。
https://github.com/josug-book1-materials/chapter05-10
第9章の支援ファイルはこちらである。
https://github.com/josug-book1-materials/chapter05-10/tree/master/09
9.1 バックアップ/リストア環境構築の流れ
現在MySQLのデータは仮想マシンdbs01のローカルディスクにあるので、dbs01が停止するとデータも無くなってしまう。そのため、まず、MySQLデータを永続ストレージであるCinderのボリュームに移行する。
そして、スナップショット、バリュームバックアック、クローンによるバックアップ/リストアを試す。
9.2 MySQLデ-タをCinderボリュームに移行
9.2.1 ボリュームの作成とインスタンスへの接続
[こちら]
(https://github.com/josug-book1-materials/chapter05-10/blob/master/09/01_dbs_vol01.sh)のように、ボリューム dbs_vol01 をアベイラビリティゾーン az1 に 10GB で作成する。
[root@step-server ~]# cinder create --display-name dbs_vol01 --availability-zone az1 10
+---------------------+--------------------------------------+
| Property | Value |
+---------------------+--------------------------------------+
| attachments | [] |
| availability_zone | az1 |
| bootable | false |
| created_at | 2015-03-28T06:29:54.517599 |
| display_description | None |
| display_name | dbs_vol01 |
| encrypted | False |
| id | c42a72e8-5dfb-45f8-bf92-70e86fa77cbc |
| metadata | {} |
| size | 10 |
| snapshot_id | None |
| source_volid | None |
| status | creating |
| volume_type | None |
+---------------------+--------------------------------------+
[root@step-server ~]# cinder list
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
| c42a72e8-5dfb-45f8-bf92-70e86fa77cbc | available | dbs_vol01 | 10 | None | false | |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
[こちら]
(https://github.com/josug-book1-materials/chapter05-10/blob/master/09/02_attach_dbs_vol01.sh)のように、ボリューム dbs_vol01 を dbs01 に接続する。
[root@step-server ~]# function get_uuid () { cat - | grep " id " | awk '{print $4}'; }
[root@step-server ~]# export MY_DBS_VOL01=`cinder show dbs_vol01 |get_uuid`
[root@step-server ~]# echo $MY_DBS_VOL01
c42a72e8-5dfb-45f8-bf92-70e86fa77cbc
[root@step-server ~]# nova volume-attach dbs01 $MY_DBS_VOL01
+----------+--------------------------------------+
| Property | Value |
+----------+--------------------------------------+
| device | /dev/vdc |
| id | c42a72e8-5dfb-45f8-bf92-70e86fa77cbc |
| serverId | edf1b599-de4f-4b2c-be90-17ab1252728f |
| volumeId | c42a72e8-5dfb-45f8-bf92-70e86fa77cbc |
+----------+--------------------------------------+
/dev/vdcとして接続された。「cinder list」で接続先が確認できる。
[root@step-server ~]# cinder list
+--------------------------------------+--------+--------------+------+-------------+----------+--------------------------------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+--------+--------------+------+-------------+----------+--------------------------------------+
| c42a72e8-5dfb-45f8-bf92-70e86fa77cbc | in-use | dbs_vol01 | 10 | None | false | edf1b599-de4f-4b2c-be90-17ab1252728f |
+--------------------------------------+--------+--------------+------+-------------+----------+--------------------------------------+
[root@step-server ~]# nova list --field name | grep edf1b599-de4f-4b2c-be90-17ab1252728f
| edf1b599-de4f-4b2c-be90-17ab1252728f | dbs01 |
9.2.2 ファイルシステムの作成とデータ移行
dbs01にログインしてデータを移行する。
ディスクにパーティションを作る。
[root@step-server ~]# ssh -i key-for-internal.pem root@192.168.0.4
[root@dbs01 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sr0 11:0 1 422K 0 rom
vda 252:0 0 10G 0 disk
└─vda1 252:1 0 10G 0 part /
vdb 252:16 0 10G 0 disk /mnt
vdc 252:32 0 10G 0 disk
[root@dbs01 ~]# lsblk /dev/vdc
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vdc 252:32 0 10G 0 disk
[root@dbs01 ~]# fdisk /dev/vdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x41322b18.
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)
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-20805, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-20805, default 20805):
Using default value 20805
Command (m for help): p
Disk /dev/vdc: 10.7 GB, 10737418240 bytes
16 heads, 63 sectors/track, 20805 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x41322b18
Device Boot Start End Blocks Id System
/dev/vdc1 1 20805 10485688+ 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@dbs01 ~]# lsblk /dev/vdc
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vdc 252:32 0 10G 0 disk
└─vdc1 252:33 0 10G 0 part
ファイルシステムを作成し、/tmp/data にマウントする。
[root@dbs01 ~]# mkfs.ext4 -L mysql_data /dev/vdc1
mke2fs 1.41.12 (17-May-2010)
Filesystem label=mysql_data
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
655360 inodes, 2621422 blocks
131071 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2684354560
80 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@dbs01 ~]# tune2fs -c 0 -i 0 -r 0 /dev/vdc1
tune2fs 1.41.12 (17-May-2010)
Setting maximal mount count to -1
Setting interval between checks to 0 seconds
Setting reserved blocks count to 0
[root@dbs01 ~]# mkdir /tmp/data
[root@dbs01 ~]# mount LABEL=mysql_data /tmp/data
[root@dbs01 ~]# mount
/dev/vda1 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/vdb on /mnt type ext4 (rw,_netdev)
/dev/vdc1 on /tmp/data type ext4 (rw)
データを移行する。
[root@dbs01 ~]# chown -R mysql:mysql /tmp/data
[root@dbs01 ~]# service mysqld stop
Stopping mysqld: [ OK ]
[root@dbs01 ~]# mv /var/lib/mysql/* /tmp/data/
[root@dbs01 ~]# ls -lF /tmp/data/
total 20508
-rw-rw---- 1 mysql mysql 10485760 Mar 28 15:55 ibdata1
-rw-rw---- 1 mysql mysql 5242880 Mar 28 15:55 ib_logfile0
-rw-rw---- 1 mysql mysql 5242880 Mar 24 11:38 ib_logfile1
drwx------ 2 mysql mysql 16384 Mar 28 15:51 lost+found/
drwx------ 2 mysql mysql 4096 Mar 24 11:38 mysql/
drwx------ 2 mysql mysql 4096 Mar 24 12:04 sample_bbs/
drwx------ 2 mysql mysql 4096 Mar 24 11:38 test/
/tmp/dataからumountし、/var/lib/mysqlにマウントされるようにfstabを修正してマウントする。MySQLを開始する。
[root@dbs01 ~]# umount /tmp/data/
[root@dbs01 ~]# cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Sun Mar 22 07:29:15 2015
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=07ccf33f-dfd8-423f-96d1-edc958cd616a / ext4 defaults 1 1
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/vdb /mnt auto defaults,nofail,comment=cloudconfig 0 2
LABEL=mysql_data /var/lib/mysql ext4 defaults,noatime 0 2
[root@dbs01 ~]# mount /var/lib/mysql
[root@dbs01 ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/vda1 10189112 1329272 8335604 14% /
tmpfs 510172 0 510172 0% /dev/shm
/dev/vdb 10190136 23028 9642820 1% /mnt
/dev/vdc1 10190064 44528 10145536 1% /var/lib/mysql
[root@dbs01 ~]# service mysqld start
Starting mysqld: [ OK ]
app01に入り、アプリを再起動する。
[root@step-server ~]# ssh -i key-for-internal.pem root@192.168.0.3
[root@app01 ~]# sh /root/sample-app/server-setup/rest.init.sh restart
Starting rest.py [ OK ]
データが元のままであることを確認する。
9.3 スナップショットによるバックアップ/リストア
スナップショットの取得前であることをデータに残す。
9.3.1 スナップの取得
当項の作業内容はこちら
dbs01でMySQLを止めて、ボリュームをumountする。
[root@step-server ~]# ssh -i key-for-internal.pem root@192.168.0.4
[root@dbs01 ~]# service mysqld stop
Stopping mysqld: [ OK ]
[root@dbs01 ~]# umount /var/lib/mysql/
ボリュームを取り外す。
[root@step-server ~]# function get_uuid () { cat - | grep " id " | awk '{print $4}'; }
[root@step-server ~]# export MY_DBS_VOL01=`cinder show dbs_vol01 |get_uuid`
[root@step-server ~]# echo $MY_DBS_VOL01
c42a72e8-5dfb-45f8-bf92-70e86fa77cbc
[root@step-server ~]# nova volume-detach dbs01 $MY_DBS_VOL01
[root@step-server ~]# cinder list
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
| c42a72e8-5dfb-45f8-bf92-70e86fa77cbc | available | dbs_vol01 | 10 | None | false | |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
スナップショットを作成する。
[root@step-server ~]# cinder snapshot-create --display-name dbs_vol01-snap001 $MY_DBS_VOL01
+---------------------+--------------------------------------+
| Property | Value |
+---------------------+--------------------------------------+
| created_at | 2015-03-28T07:37:01.652450 |
| display_description | None |
| display_name | dbs_vol01-snap001 |
| id | 458c18ee-e8f3-4ac5-a613-032e192825d6 |
| metadata | {} |
| size | 10 |
| status | creating |
| volume_id | c42a72e8-5dfb-45f8-bf92-70e86fa77cbc |
+---------------------+--------------------------------------+
[root@step-server ~]# cinder snapshot-list
+--------------------------------------+--------------------------------------+-----------+-------------------+------+
| ID | Volume ID | Status | Display Name | Size |
+--------------------------------------+--------------------------------------+-----------+-------------------+------+
| 458c18ee-e8f3-4ac5-a613-032e192825d6 | c42a72e8-5dfb-45f8-bf92-70e86fa77cbc | available | dbs_vol01-snap001 | 10 |
+--------------------------------------+--------------------------------------+-----------+-------------------+------+
ボリュームを接続する。
[root@step-server ~]# nova volume-attach dbs01 $MY_DBS_VOL01
+----------+--------------------------------------+
| Property | Value |
+----------+--------------------------------------+
| device | /dev/vdc |
| id | c42a72e8-5dfb-45f8-bf92-70e86fa77cbc |
| serverId | edf1b599-de4f-4b2c-be90-17ab1252728f |
| volumeId | c42a72e8-5dfb-45f8-bf92-70e86fa77cbc |
+----------+--------------------------------------+
dbs01でマウントしてMySQLを起動する。
[root@dbs01 ~]# mount /var/lib/mysql/
[root@dbs01 ~]# service mysqld start
Starting mysqld: [ OK ]
app01でアプリを再起動する。
[root@app01 ~]# sh /root/sample-app/server-setup/rest.init.sh restart
Starting rest.py [ OK ]
スナップショットの取得後であることをデータに記録する。
9.3.2 スナップからのリストア
当項の作業内容は[こちら](https://github.com/josu
g-book1-materials/chapter05-10/blob/master/09/04_restore_snapshot.sh)
スナップショットはそのままインスタンスに接続できないので、スナップショットから新規ボリュームを作成する。
[root@step-server ~]# function get_uuid () { cat - | grep " id " | awk '{print $4}'; }
[root@step-server ~]# export MY_DBS_VOL01_SNAP001=`cinder snapshot-show dbs_vol01-snap001 |get_uuid`
[root@step-server ~]# echo $MY_DBS_VOL01_SNAP001
458c18ee-e8f3-4ac5-a613-032e192825d6
[root@step-server ~]# cinder create --snapshot-id $MY_DBS_VOL01_SNAP001 \
> --display-name dbs_vol01_res --availability-zone az1 10
+---------------------+--------------------------------------+
| Property | Value |
+---------------------+--------------------------------------+
| attachments | [] |
| availability_zone | az1 |
| bootable | false |
| created_at | 2015-03-28T09:01:30.427725 |
| display_description | None |
| display_name | dbs_vol01_res |
| encrypted | False |
| id | 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e |
| metadata | {} |
| size | 10 |
| snapshot_id | 458c18ee-e8f3-4ac5-a613-032e192825d6 |
| source_volid | None |
| status | creating |
| volume_type | None |
+---------------------+--------------------------------------+
available になるのにしばらく時間がかかった。
[root@step-server ~]# cinder list
+--------------------------------------+----------+---------------+------+-------------+----------+--------------------------------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+----------+---------------+------+-------------+----------+--------------------------------------+
| 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e | creating | dbs_vol01_res | 10 | None | false | |
| c42a72e8-5dfb-45f8-bf92-70e86fa77cbc | in-use | dbs_vol01 | 10 | None | false | edf1b599-de4f-4b2c-be90-17ab1252728f |
+--------------------------------------+----------+---------------+------+-------------+----------+--------------------------------------+
[root@step-server ~]# cinder list
+--------------------------------------+-----------+---------------+------+-------------+----------+--------------------------------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+---------------+------+-------------+----------+--------------------------------------+
| 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e | available | dbs_vol01_res | 10 | None | false | |
| c42a72e8-5dfb-45f8-bf92-70e86fa77cbc | in-use | dbs_vol01 | 10 | None | false | edf1b599-de4f-4b2c-be90-17ab1252728f |
+--------------------------------------+-----------+---------------+------+-------------+----------+--------------------------------------+
作成したdbs_vol01_resをdbs01に接続する。
[root@step-server ~]# export MY_DBS_VOL01_RES=`cinder show dbs_vol01_res |get_uuid`
[root@step-server ~]# echo $MY_DBS_VOL01_RES
6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e
[root@step-server ~]# nova volume-attach dbs01 $MY_DBS_VOL01_RES
+----------+--------------------------------------+
| Property | Value |
+----------+--------------------------------------+
| device | /dev/vdd |
| id | 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e |
| serverId | edf1b599-de4f-4b2c-be90-17ab1252728f |
| volumeId | 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e |
+----------+--------------------------------------+
/dev/vddで接続された。
dbs01で確認すると、パーテションが作成済みであることがわかる。
[root@dbs01 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sr0 11:0 1 422K 0 rom
vda 252:0 0 10G 0 disk
└─vda1 252:1 0 10G 0 part /
vdb 252:16 0 10G 0 disk /mnt
vdc 252:32 0 10G 0 disk
└─vdc1 252:33 0 10G 0 part /var/lib/mysql
vdd 252:48 0 10G 0 disk
└─vdd1 252:49 0 10G 0 part
MySQLのデータ領域をスナップショットから作成したボリュームに切り替える。
[root@dbs01 ~]# service mysqld stop
Stopping mysqld: [ OK ]
[root@dbs01 ~]# umount /var/lib/mysql
[root@dbs01 ~]# mount /dev/vdd1 /var/lib/mysql
[root@dbs01 ~]# service mysqld start
Starting mysqld: [ OK ]
データがスナップショット作成前のものに戻っている。
[root@dbs01 ~]# mysql -u root sample_bbs -e 'select * from contents'
+----+---------------------+---------------------------------------------+
| id | timestamp | text |
+----+---------------------+---------------------------------------------+
| 1 | 2015-03-24 13:12:57 | 6章の終了 |
| 2 | 2015-03-25 14:53:53 | 7章の終了 |
| 3 | 2015-03-28 15:21:43 | 9章:作業開始 |
| 4 | 2015-03-28 16:18:54 | 9章:スナップショットの取得前 |
+----+---------------------+---------------------------------------------+
app01でアプリを再起動する。
[root@app01 ~]# sh /root/sample-app/server-setup/rest.init.sh restart
Starting rest.py [ OK ]
スナップショットの取得後の状態に戻っている。
オリジナルのボリューム dbs01_vol をdbs01から切り離し削除する。
ここからの手順はこちら
dbs_vol01 を切断する。
[root@step-server ~]# echo $MY_DBS_VOL01
c42a72e8-5dfb-45f8-bf92-70e86fa77cbc
[root@step-server ~]# nova volume-detach dbs01 $MY_DBS_VOL01
そのまま削除しようとしてもスナップショットが付いているので削除できない。
[root@step-server ~]# cinder delete $MY_DBS_VOL01
Delete for volume c42a72e8-5dfb-45f8-bf92-70e86fa77cbc failed: Invalid volume: Volume still has 1 dependent snapshots (HTTP 400) (Request-ID: req-00b0ff42-d52d-4fc9-8a2d-89fc03c51a30)
ERROR: Unable to delete any of the specified volumes.
先にスナップショットを削除する。削除完了を待つ。
[root@step-server ~]# export MY_DBS_VOL01_SNAP001=`cinder snapshot-show dbs_vol01-snap001 | get_uuid`
[root@step-server ~]# echo $MY_DBS_VOL01_SNAP001
458c18ee-e8f3-4ac5-a613-032e192825d6
[root@step-server ~]# cinder snapshot-delete $MY_DBS_VOL01_SNAP001
[root@step-server ~]# cinder snapshot-list
+--------------------------------------+--------------------------------------+----------+-------------------+------+
| ID | Volume ID | Status | Display Name | Size |
+--------------------------------------+--------------------------------------+----------+-------------------+------+
| 458c18ee-e8f3-4ac5-a613-032e192825d6 | c42a72e8-5dfb-45f8-bf92-70e86fa77cbc | deleting | dbs_vol01-snap001 | 10 |
+--------------------------------------+--------------------------------------+----------+-------------------+------+
[root@step-server ~]# cinder snapshot-list
+----+-----------+--------+--------------+------+
| ID | Volume ID | Status | Display Name | Size |
+----+-----------+--------+--------------+------+
+----+-----------+--------+--------------+------+
今度は削除できた。
[root@step-server ~]# cinder delete $MY_DBS_VOL01
[root@step-server ~]# cinder list
+--------------------------------------+----------+---------------+------+-------------+----------+--------------------------------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+----------+---------------+------+-------------+----------+--------------------------------------+
| 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e | in-use | dbs_vol01_res | 10 | None | false | edf1b599-de4f-4b2c-be90-17ab1252728f |
| c42a72e8-5dfb-45f8-bf92-70e86fa77cbc | deleting | dbs_vol01 | 10 | None | false | |
+--------------------------------------+----------+---------------+------+-------------+----------+--------------------------------------+
[root@step-server ~]# cinder list
+--------------------------------------+--------+---------------+------+-------------+----------+--------------------------------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+--------+---------------+------+-------------+----------+--------------------------------------+
| 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e | in-use | dbs_vol01_res | 10 | None | false | edf1b599-de4f-4b2c-be90-17ab1252728f |
+--------------------------------------+--------+---------------+------+-------------+----------+--------------------------------------+
9.4 ボリュームバックアップによるバックアップ/リストア
バックアップ前であることをデータに書き込む。
9.4.1 ボリュームバックアップの作成
ここでの手順はこちら。
いきなりバックアップを取得しようとしてのエラーになる。ボリュームをインスタンスから切り離しavailableの状態にする必要がある。
[root@step-server ~]# echo $MY_DBS_VOL01_RES
6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e
[root@step-server ~]# cinder backup-create $MY_DBS_VOL01_RES
ERROR: Invalid volume: Volume to be backed up must be available (HTTP 400) (Request-ID: req-2d39c76b-d25a-484b-943d-d7207272ff06)
まず、dbs01でMySQLを停止しボリュームをアンマウントする。
[root@dbs01 ~]# service mysqld stop
Stopping mysqld: [ OK ]
[root@dbs01 ~]# umount /var/lib/mysql/
さらに、ボリュームを切断し、availableなことを確認する、
[root@step-server ~]# nova volume-detach dbs01 $MY_DBS_VOL01_RES
[root@step-server ~]# cinder list
+--------------------------------------+-----------+---------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+---------------+------+-------------+----------+-------------+
| 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e | available | dbs_vol01_res | 10 | None | false | |
+--------------------------------------+-----------+---------------+------+-------------+----------+-------------+
今度は「cinder backup-create」に成功した。dbs_vol01_res-backup01という名前をつけている。
[root@step-server ~]# echo $MY_DBS_VOL01_RES
6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e
[root@step-server ~]# cinder backup-create --display-name dbs_vol01_res-backup01 $MY_DBS_VOL01_RES
+-----------+--------------------------------------+
| Property | Value |
+-----------+--------------------------------------+
| id | e269e1a1-0faa-49d7-ae4b-c5afb7517cf8 |
| name | dbs_vol01_res-backup01 |
| volume_id | 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e |
+-----------+--------------------------------------+
しばらくはbacking-up中。
[root@step-server ~]# cinder list
+--------------------------------------+------------+---------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+------------+---------------+------+-------------+----------+-------------+
| 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e | backing-up | dbs_vol01_res | 10 | None | false | |
+--------------------------------------+------------+---------------+------+-------------+----------+-------------+
ボリュームもバックアップもavailableになった。
[root@step-server ~]# export MY_DBS_VOL01_RES_BK01=`cinder backup-list | grep dbs_vol01_res-backup01 | awk '{print $2}'`
[root@step-server ~]# cinder backup-show $MY_DBS_VOL01_RES_BK01
+-------------------+--------------------------------------+
| Property | Value |
+-------------------+--------------------------------------+
| availability_zone | az1 |
| container | volumebackups |
| created_at | 2015-03-28T10:49:03.000000 |
| description | None |
| fail_reason | None |
| id | e269e1a1-0faa-49d7-ae4b-c5afb7517cf8 |
| name | dbs_vol01_res-backup01 |
| object_count | 206 |
| size | 10 |
| status | available |
| volume_id | 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e |
+-------------------+--------------------------------------+
[root@step-server ~]# cinder list
+--------------------------------------+-----------+---------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+---------------+------+-------------+----------+-------------+
| 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e | available | dbs_vol01_res | 10 | None | false | |
+--------------------------------------+-----------+---------------+------+-------------+----------+-------------+
ボリュームもバックアップもavailableになった。
[root@step-server ~]# export MY_DBS_VOL01_RES_BK01=`cinder backup-list | grep dbs_vol01_res-backup01 | awk '{print $2}'`
[root@step-server ~]# cinder backup-show $MY_DBS_VOL01_RES_BK01
+-------------------+--------------------------------------+
| Property | Value |
+-------------------+--------------------------------------+
| availability_zone | az1 |
| container | volumebackups |
| created_at | 2015-03-28T10:49:03.000000 |
| description | None |
| fail_reason | None |
| id | e269e1a1-0faa-49d7-ae4b-c5afb7517cf8 |
| name | dbs_vol01_res-backup01 |
| object_count | 206 |
| size | 10 |
| status | available |
| volume_id | 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e |
+-------------------+--------------------------------------+
[root@step-server ~]# cinder list
+--------------------------------------+-----------+---------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+---------------+------+-------------+----------+-------------+
| 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e | available | dbs_vol01_res | 10 | None | false | |
+--------------------------------------+-----------+---------------+------+-------------+----------+-------------+
swiftにvolumebackupsというコンテナが出来てオブジェクト数が206になっている。
volume_[Volume UUID]/[Time Stamp]/az_[Availability Zone]backup[BackUo UUID]-連番 のファイルが大量に出来ている
[root@step-server ~]# swift list volumebackups
volume_6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e/20150328104904/az_az1_backup_e269e1a1-0faa-49d7-ae4b-c5afb7517cf8-00001
volume_6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e/20150328104904/az_az1_backup_e269e1a1-0faa-49d7-ae4b-c5afb7517cf8-00002
volume_6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e/20150328104904/az_az1_backup_e269e1a1-0faa-49d7-ae4b-c5afb7517cf8-00003
|
|
|
volume_6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e/20150328104904/az_az1_backup_e269e1a1-0faa-49d7-ae4b-c5afb7517cf8-00205
volume_6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e/20150328104904/az_az1_backup_e269e1a1-0faa-49d7-ae4b-c5afb7517cf8_metadata
50KB前後の小さなファイルが大量に存在する。
ボリュームを接続し、dbs01でマウントし、app01でアプリを再開始する。
[root@step-server ~]# nova volume-attach dbs01 $MY_DBS_VOL01_RES
+----------+--------------------------------------+
| Property | Value |
+----------+--------------------------------------+
| device | /dev/vdc |
| id | 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e |
| serverId | edf1b599-de4f-4b2c-be90-17ab1252728f |
| volumeId | 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e |
+----------+--------------------------------------+
[root@dbs01 ~]# mount LABEL=mysql_data /var/lib/mysql
[root@dbs01 ~]# service mysqld start
Starting mysqld: [ OK ]
[root@app01 ~]# sh /root/sample-app/server-setup/rest.init.sh restart
Starting rest.py [ OK ]
ボリュームバックアップの取得後の確認用のデータを入力しておく。
9.4.2 ボリュームバックアップからのリストア
手順はこちら
まず、新規ボリュームへリストアする。
ボリュームdbs_vol02を作成し、UUIDを保管しておく。
[root@step-server ~]# cinder create --display-name dbs_vol02 --availability-zone az1 10
+---------------------+--------------------------------------+
| Property | Value |
+---------------------+--------------------------------------+
| attachments | [] |
| availability_zone | az1 |
| bootable | false |
| created_at | 2015-03-28T11:32:05.847447 |
| display_description | None |
| display_name | dbs_vol02 |
| encrypted | False |
| id | 73756914-a0b2-4ab9-baf0-2097e0867949 |
| metadata | {} |
| size | 10 |
| snapshot_id | None |
| source_volid | None |
| status | creating |
| volume_type | None |
+---------------------+--------------------------------------+
[root@step-server ~]# export MY_DBS_VOL02=`cinder show dbs_vol02 |get_uuid`
[root@step-server ~]# echo $MY_DBS_VOL02
73756914-a0b2-4ab9-baf0-2097e0867949
「cinder backup-restore」でリストアする。当初は restoring-backup の状態になる。
[root@step-server ~]# cinder backup-restore --volume-id $MY_DBS_VOL02 $MY_DBS_VOL01_RES_BK01
[root@step-server ~]# cinder list
+--------------------------------------+------------------+---------------+------+-------------+----------+--------------------------------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+------------------+---------------+------+-------------+----------+--------------------------------------+
| 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e | in-use | dbs_vol01_res | 10 | None | false | edf1b599-de4f-4b2c-be90-17ab1252728f |
| 73756914-a0b2-4ab9-baf0-2097e0867949 | restoring-backup | dbs_vol02 | 10 | None | false | |
+--------------------------------------+------------------+---------------+------+-------------+----------+--------------------------------------+
リストアが終わり available になる。名前がバックアップ対象の dbs_vol01_res になることに注意。
[root@step-server ~]# cinder list
+--------------------------------------+-----------+---------------+------+-------------+----------+--------------------------------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+---------------+------+-------------+----------+--------------------------------------+
| 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e | in-use | dbs_vol01_res | 10 | None | false | edf1b599-de4f-4b2c-be90-17ab1252728f |
| 73756914-a0b2-4ab9-baf0-2097e0867949 | available | dbs_vol01_res | 10 | None | false | |
+--------------------------------------+-----------+---------------+------+-------------+----------+--------------------------------------+
混乱しないように名前をdbs_vol02に戻す。
[root@step-server ~]# cinder rename $MY_DBS_VOL02 dbs_vol02
[root@step-server ~]# cinder list
+--------------------------------------+-----------+---------------+------+-------------+----------+--------------------------------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+---------------+------+-------------+----------+--------------------------------------+
| 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e | in-use | dbs_vol01_res | 10 | None | false | edf1b599-de4f-4b2c-be90-17ab1252728f |
| 73756914-a0b2-4ab9-baf0-2097e0867949 | available | dbs_vol02 | 10 | None | false | |
+--------------------------------------+-----------+---------------+------+-------------+----------+--------------------------------------+
次にオリジナルボリュームへリストアする。
手順はこちら
ボリュームdbs_vol01_resを開放するためにdbs01でMySQLを停止しアンマウントした後、
ボリュームを切り離す。
[root@dbs01 ~]# service mysqld stop
Stopping mysqld: [ OK ]
[root@dbs01 ~]# umount /var/lib/mysql/
[root@step-server ~]# nova volume-detach dbs01 $MY_DBS_VOL01_RES
[root@step-server ~]# cinder list
+--------------------------------------+-----------+---------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+---------------+------+-------------+----------+-------------+
| 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e | available | dbs_vol01_res | 10 | None | false | |
| 73756914-a0b2-4ab9-baf0-2097e0867949 | available | dbs_vol02 | 10 | None | false | |
+--------------------------------------+-----------+---------------+------+-------------+----------+-------------+
dbs_vol01_resへリストアする。restoring / restoring-backup の状態になる。
[root@step-server ~]# cinder backup-restore --volume-id $MY_DBS_VOL01_RES $MY_DBS_VOL01_RES_BK01
[root@step-server ~]# cinder backup-list
+--------------------------------------+--------------------------------------+-----------+------------------------+------+--------------+---------------+
| ID | Volume ID | Status | Name | Size | Object Count | Container |
+--------------------------------------+--------------------------------------+-----------+------------------------+------+--------------+---------------+
| e269e1a1-0faa-49d7-ae4b-c5afb7517cf8 | 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e | restoring | dbs_vol01_res-backup01 | 10 | 206 | volumebackups |
+--------------------------------------+--------------------------------------+-----------+------------------------+------+--------------+---------------+
[root@step-server ~]# cinder list
+--------------------------------------+------------------+---------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+------------------+---------------+------+-------------+----------+-------------+
| 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e | restoring-backup | dbs_vol01_res | 10 | None | false | |
| 73756914-a0b2-4ab9-baf0-2097e0867949 | available | dbs_vol02 | 10 | None | false | |
+--------------------------------------+------------------+---------------+------+-------------+----------+-------------+
available になった。
[root@step-server ~]# cinder backup-list
+--------------------------------------+--------------------------------------+-----------+------------------------+------+--------------+---------------+
| ID | Volume ID | Status | Name | Size | Object Count | Container |
+--------------------------------------+--------------------------------------+-----------+------------------------+------+--------------+---------------+
| e269e1a1-0faa-49d7-ae4b-c5afb7517cf8 | 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e | available | dbs_vol01_res-backup01 | 10 | 206 | volumebackups |
+--------------------------------------+--------------------------------------+-----------+------------------------+------+--------------+---------------+
[root@step-server ~]# cinder list
+--------------------------------------+-----------+---------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+---------------+------+-------------+----------+-------------+
| 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e | available | dbs_vol01_res | 10 | None | false | |
| 73756914-a0b2-4ab9-baf0-2097e0867949 | available | dbs_vol02 | 10 | None | false | |
+--------------------------------------+-----------+---------------+------+-------------+----------+-------------+
dbs01 にオリジナルボリュームと新規ボリュームを接続する。
[root@step-server ~]# nova volume-attach dbs01 $MY_DBS_VOL01_RES
+----------+--------------------------------------+
| Property | Value |
+----------+--------------------------------------+
| device | /dev/vdc |
| id | 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e |
| serverId | edf1b599-de4f-4b2c-be90-17ab1252728f |
| volumeId | 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e |
+----------+--------------------------------------+
[root@step-server ~]# nova volume-attach dbs01 $MY_DBS_VOL02
+----------+--------------------------------------+
| Property | Value |
+----------+--------------------------------------+
| device | /dev/vdd |
| id | 73756914-a0b2-4ab9-baf0-2097e0867949 |
| serverId | edf1b599-de4f-4b2c-be90-17ab1252728f |
| volumeId | 73756914-a0b2-4ab9-baf0-2097e0867949 |
+----------+--------------------------------------+
[root@step-server ~]# cinder list
+--------------------------------------+--------+---------------+------+-------------+----------+--------------------------------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+--------+---------------+------+-------------+----------+--------------------------------------+
| 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e | in-use | dbs_vol01_res | 10 | None | false | edf1b599-de4f-4b2c-be90-17ab1252728f |
| 73756914-a0b2-4ab9-baf0-2097e0867949 | in-use | dbs_vol02 | 10 | None | false | edf1b599-de4f-4b2c-be90-17ab1252728f |
+--------------------------------------+--------+---------------+------+-------------+----------+--------------------------------------+
LABELとUUIDが/dev/vdc1と/dev/vdd1で同じだ。
[root@dbs01 ~]# blkid
/dev/sr0: LABEL="config-2" TYPE="iso9660"
/dev/vda1: UUID="07ccf33f-dfd8-423f-96d1-edc958cd616a" TYPE="ext4"
/dev/vdb: LABEL="ephemeral0" UUID="bd850528-a46e-432d-bc0d-d1aab380f9ba" TYPE="ext4"
/dev/vdc1: LABEL="mysql_data" UUID="f59012f1-613c-430e-bedf-08b4870499f4" TYPE="ext4"
/dev/vdd1: LABEL="mysql_data" UUID="f59012f1-613c-430e-bedf-08b4870499f4" TYPE="ext4"
[root@dbs01 ~]# mkdir -p /tmp/{disk1,disk2}
[root@dbs01 ~]# mount -o ro /dev/vdc1 /tmp/disk1/
[root@dbs01 ~]# mount -o ro /dev/vdd1 /tmp/disk2/
[root@dbs01 ~]# mount
/dev/vda1 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/vdb on /mnt type ext4 (rw,_netdev)
/dev/vdc1 on /tmp/disk1 type ext4 (ro)
/dev/vdd1 on /tmp/disk2 type ext4 (ro)
ハッシュから内容が同じであることを確認する。
[root@dbs01 ~]# md5sum /tmp/disk1/* 2> /dev/null
a610f566075a4372c07020c3d3b18fc6 /tmp/disk1/ibdata1
9cfc05cbfb56edefd840fcb274500621 /tmp/disk1/ib_logfile0
5f363e0e58a95f06cbe9bbc662c5dfb6 /tmp/disk1/ib_logfile1
[root@dbs01 ~]# md5sum /tmp/disk2/* 2> /dev/null
a610f566075a4372c07020c3d3b18fc6 /tmp/disk2/ibdata1
9cfc05cbfb56edefd840fcb274500621 /tmp/disk2/ib_logfile0
5f363e0e58a95f06cbe9bbc662c5dfb6 /tmp/disk2/ib_logfile1
dbs01でいったん両方をアンマウントとして、dbs_vol01_resを継続利用する。dbs_vol02は切断する。
[root@dbs01 ~]# umount /tmp/disk1/ /tmp/disk2/
[root@dbs01 ~]# mount /dev/vdc1 /var/lib/mysql
[root@dbs01 ~]# service mysqld start
Starting mysqld: [ OK ]
[root@step-server ~]# cinder list
+--------------------------------------+--------+---------------+------+-------------+----------+--------------------------------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+--------+---------------+------+-------------+----------+--------------------------------------+
| 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e | in-use | dbs_vol01_res | 10 | None | false | edf1b599-de4f-4b2c-be90-17ab1252728f |
| 73756914-a0b2-4ab9-baf0-2097e0867949 | in-use | dbs_vol02 | 10 | None | false | edf1b599-de4f-4b2c-be90-17ab1252728f |
+--------------------------------------+--------+---------------+------+-------------+----------+--------------------------------------+
[root@step-server ~]# nova volume-detach dbs01 $MY_DBS_VOL02
[root@step-server ~]# cinder list
+--------------------------------------+-----------+---------------+------+-------------+----------+--------------------------------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+---------------+------+-------------+----------+--------------------------------------+
| 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e | in-use | dbs_vol01_res | 10 | None | false | edf1b599-de4f-4b2c-be90-17ab1252728f |
| 73756914-a0b2-4ab9-baf0-2097e0867949 | available | dbs_vol02 | 10 | None | false | |
+--------------------------------------+-----------+---------------+------+-------------+----------+--------------------------------------+
app01でアプリを再始動する。
[root@app01 ~]# sh /root/sample-app/server-setup/rest.init.sh restart
Starting rest.py [ OK ]
データは当然バックアップの時点まで戻っている。
9.5 ボリュームのクローン
この節の手順はこちら。
dbs_vol02 を dbs_vol03 という名前でクローンする。
[root@step-server ~]# cinder create --source-volid $MY_DBS_VOL02 --display-name dbs_vol03 --availability-zone az1 10
+---------------------+--------------------------------------+
| Property | Value |
+---------------------+--------------------------------------+
| attachments | [] |
| availability_zone | az1 |
| bootable | false |
| created_at | 2015-03-28T13:15:20.722029 |
| display_description | None |
| display_name | dbs_vol03 |
| encrypted | False |
| id | 7d6827cf-2a40-4ae4-9e37-6a198d45a593 |
| metadata | {} |
| size | 10 |
| snapshot_id | None |
| source_volid | 73756914-a0b2-4ab9-baf0-2097e0867949 |
| status | creating |
| volume_type | None |
+---------------------+--------------------------------------+
まずは creating 。
[root@step-server ~]# cinder list
+--------------------------------------+-----------+---------------+------+-------------+----------+--------------------------------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+---------------+------+-------------+----------+--------------------------------------+
| 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e | in-use | dbs_vol01_res | 10 | None | false | edf1b599-de4f-4b2c-be90-17ab1252728f |
| 73756914-a0b2-4ab9-baf0-2097e0867949 | available | dbs_vol02 | 10 | None | false | |
| 7d6827cf-2a40-4ae4-9e37-6a198d45a593 | creating | dbs_vol03 | 10 | None | false | |
+--------------------------------------+-----------+---------------+------+-------------+----------+--------------------------------------+
available になった。
[root@step-server ~]# cinder list
+--------------------------------------+-----------+---------------+------+-------------+----------+--------------------------------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+---------------+------+-------------+----------+--------------------------------------+
| 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e | in-use | dbs_vol01_res | 10 | None | false | edf1b599-de4f-4b2c-be90-17ab1252728f |
| 73756914-a0b2-4ab9-baf0-2097e0867949 | available | dbs_vol02 | 10 | None | false | |
| 7d6827cf-2a40-4ae4-9e37-6a198d45a593 | available | dbs_vol03 | 10 | None | false | |
+--------------------------------------+-----------+---------------+------+-------------+----------+--------------------------------------+
dbs_vol02、dbs_vol03のUUIDを取得しdbs01に接続する。/dev/vdd、/dev/vdeで接続された。
[root@step-server ~]# echo $MY_DBS_VOL02
73756914-a0b2-4ab9-baf0-2097e0867949
[root@step-server ~]# export MY_DBS_VOL03=`cinder show dbs_vol03 |get_uuid`
[root@step-server ~]# echo $MY_DBS_VOL03
7d6827cf-2a40-4ae4-9e37-6a198d45a593
[root@step-server ~]# nova volume-attach dbs01 $MY_DBS_VOL02
+----------+--------------------------------------+
| Property | Value |
+----------+--------------------------------------+
| device | /dev/vdd |
| id | 73756914-a0b2-4ab9-baf0-2097e0867949 |
| serverId | edf1b599-de4f-4b2c-be90-17ab1252728f |
| volumeId | 73756914-a0b2-4ab9-baf0-2097e0867949 |
+----------+--------------------------------------+
[root@step-server ~]# nova volume-attach dbs01 $MY_DBS_VOL03
+----------+--------------------------------------+
| Property | Value |
+----------+--------------------------------------+
| device | /dev/vde |
| id | 7d6827cf-2a40-4ae4-9e37-6a198d45a593 |
| serverId | edf1b599-de4f-4b2c-be90-17ab1252728f |
| volumeId | 7d6827cf-2a40-4ae4-9e37-6a198d45a593 |
+----------+--------------------------------------+
同一ディスクからバックアップ・リストア・クローンの結果のdbs_vol01_res、dbs_vol02、dbs_vol03 が接続されているのでUUIDが同一である。
[root@dbs01 ~]# blkid
/dev/sr0: LABEL="config-2" TYPE="iso9660"
/dev/vda1: UUID="07ccf33f-dfd8-423f-96d1-edc958cd616a" TYPE="ext4"
/dev/vdb: LABEL="ephemeral0" UUID="bd850528-a46e-432d-bc0d-d1aab380f9ba" TYPE="ext4"
/dev/vdc1: LABEL="mysql_data" UUID="f59012f1-613c-430e-bedf-08b4870499f4" TYPE="ext4"
/dev/vdd1: LABEL="mysql_data" UUID="f59012f1-613c-430e-bedf-08b4870499f4" TYPE="ext4"
/dev/vde1: LABEL="mysql_data" UUID="f59012f1-613c-430e-bedf-08b4870499f4" TYPE="ext4"
dbs_vol02、dbs_vol03を切断して削除する。本書では「cinder delete」で消しているが、スクリプト(https://github.com/josug-book1-materials/chapter05-10/blob/master/09/11_delete_vol02_vol03.sh)では「nova volume-delete」で消している。
[root@step-server ~]# nova volume-detach dbs01 $MY_DBS_VOL02
[root@step-server ~]# nova volume-detach dbs01 $MY_DBS_VOL03
[root@step-server ~]# nova volume-delete $MY_DBS_VOL02 $MY_DBS_VOL03
しばらくdeletingの後、リストから消えた。
[root@step-server ~]# cinder list
+--------------------------------------+----------+---------------+------+-------------+----------+--------------------------------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+----------+---------------+------+-------------+----------+--------------------------------------+
| 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e | in-use | dbs_vol01_res | 10 | None | false | edf1b599-de4f-4b2c-be90-17ab1252728f |
| 73756914-a0b2-4ab9-baf0-2097e0867949 | deleting | dbs_vol02 | 10 | None | false | |
| 7d6827cf-2a40-4ae4-9e37-6a198d45a593 | deleting | dbs_vol03 | 10 | None | false | |
+--------------------------------------+----------+---------------+------+-------------+----------+--------------------------------------+
[root@step-server ~]# cinder list
+--------------------------------------+--------+---------------+------+-------------+----------+--------------------------------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+--------+---------------+------+-------------+----------+--------------------------------------+
| 6d9d3c53-0a1b-44e9-8b51-ce41f30cdd8e | in-use | dbs_vol01_res | 10 | None | false | edf1b599-de4f-4b2c-be90-17ab1252728f |
+--------------------------------------+--------+---------------+------+-------------+----------+--------------------------------------+
第9章の完了。