User Tools

Site Tools


progetti:cloud-areapd:operations:save_and_remove_cinder_volume_stuck

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
progetti:cloud-areapd:operations:save_and_remove_cinder_volume_stuck [2015/08/18 09:15] – created straldi@infn.itprogetti:cloud-areapd:operations:save_and_remove_cinder_volume_stuck [2015/08/18 09:18] (current) straldi@infn.it
Line 1: Line 1:
 +====== Save and Remove Cinder Volume Stuck ======
  
 +  * Find using openstack command the volume stuck and the file associated to it:
 +<code bash>
 +cinder list --all-tenants
 +</code>
 +
 +  * Determine from the project or the user the volume. We suppose the file is:
 +<code bash>
 +/brickOpenstack/cinder-prod/mpathb/volume-2a367882-9bd7-4ee1-a99e-fa491bcaf0af
 +</code>
 +
 +  * Mount the file in a specific path:
 +<code bash>
 +mount -t ext4 -o loop,ro,noload /brickOpenstack/cinder-prod/mpathb/volume-2a367882-9bd7-4ee1-a99e-fa491bcaf0af /mnt/cinderDisk
 +</code>
 +
 +  * Create a tar with the contents of the directory just mounted:
 +<code bash>
 +cd /mnt/cinderDisk
 +tar -czvf /root/fileBuild20150715.tgz *
 +</code>
 +
 +  * Copy the file in a secure zone where the user have access, for example in a nfs export. 
 +<code bash>
 +scp fileBuild20150715.tgz root@cld-storage-01:/data/brickOpenstack/muon-steel/sdb/cloud
 +</code>
 +
 +  * Send a mail to the user and the cloud-support where the file has been copiated. 
 +
 +  * To erase the volume from cld-ctrl-01 enter in mysql and execute this query:
 +<code bash>
 +mysql> select * from cinder_prod.snapshots where volume_id =
 +'2a367882-9bd7-4ee1-a99e-fa491bcaf0af';
 ++---------------------+------------+------------+---------+--------------------------------------+--------------------------------------+----------------------------------+----------------------------------+----------+----------+-------------+--------------+--------------+---------------------+-------------------+-------------------+----------------+
 +| created_at          | updated_at | deleted_at | deleted |
 +id                                   |
 +volume_id                            | user_id                         
 +| project_id | status   | progress | volume_size | scheduled_at |
 +display_name | display_description | provider_location |
 +encryption_key_id | volume_type_id |
 ++---------------------+------------+------------+---------+--------------------------------------+--------------------------------------+----------------------------------+----------------------------------+----------+----------+-------------+--------------+--------------+---------------------+-------------------+-------------------+----------------+
 +| 2015-07-14 06:30:40 | NULL       | NULL             0 |
 +38dc71ee-7ebc-4b20-806a-f2c0bd7581d1 |
 +2a367882-9bd7-4ee1-a99e-fa491bcaf0af | 7210e789b5454b5486783271059628aa
 +| e9ddc1e36c1348fa812c56f1922371b5 | creating | 0%                20 |
 +NULL         | NULL         | NULL                | NULL              |
 +NULL              | NULL           |
 ++---------------------+------------+------------+---------+--------------------------------------+--------------------------------------+----------------------------------+----------------------------------+----------+----------+-------------+--------------+--------------+---------------------+-------------------+-------------------+----------------+
 +1 row in set (0.00 sec)
 +
 +mysql> delete from cinder_prod.snapshots where volume_id =
 +'2a367882-9bd7-4ee1-a99e-fa491bcaf0af';
 +Query OK, 1 row affected (0.01 sec)
 +</code>

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki