Forums

Home / Forums

You need to log in to create posts and topics. Login · Register

how to remove big ISCSI disk

Pages: 1 2

Hello ,

I have create some iscsi disk with petasan but when i tried to remove it with web interface it take some many time.So i do some research with how to delete big image with ceph.Solution i found is there and i am asking if this way is a best practice.

 rados -p rbd rm rbd_id.image-00002 --cluster ClusterBKO
 rados -p rbd rm rbd_header.81d12ae8944a --cluster ClusterBKO
 rados --cluster ClusterBKO -p rbd ls | grep '^rbd_data.247d2a6b8b4567.' | xargs -n 200  rados --cluster ClusterBKO -p rbd rm
 rbd rm rbdbigsize --cluster ClusterBKO

Big images (tens of TBs) will take some time, maybe 10 sec per TB for a small slow cluster. It deletes at a rate of read_iops x 4 MB per sec so a 25K iops cluster will do 10 sec per TB.

The commands you ran are not recommended, they iterate all objects found in the rados database (rocksdb) to match the particular image you want, this will work well if you have a small number of images but if you have a larger number of images with filled data, you will be iterating on a huge number of objects, the performance will be terrible.

There is work to improve the delete speed for large images by supporting rbd object map in the kernel.

Thanks for your reply obviously your right about my previous method to remove  big image iscsi.After command was finish i got this error about another disk that was not deleted  it was at Detached Status and when  i tried to attach it again it i got this alert "This disk has not been created by PetaSAN. The Ceph rbd image will be renamed to match the PetaSAN naming standard".

Another error i have is "Error disk attached but could not read metadata" when i try to save attach process.

Thanks

If you try a new image you create manually then attach it to PetaSAN, do you get an error ?

Can you do an rbd info on the disk that gives error attaching.

i create new image and i dont have this errros.

rbd info of the disk

root@NODEBKO-01:~# rbd info image-00006 --cluster ClusterBKO
rbd image 'image-00006':
size 30720 GB in 7864320 objects
order 22 (4096 kB objects)
block_name_prefix: rbd_data.1bf3496b8b4567
format: 2
features: layering
flags:
create_timestamp: Wed Apr 17 14:22:15 2019

 

Could you give more detail how to reproduce this.  It is not clear why was the disk detached, did you created it manually or was this a result of the failed delete step ? Or was it a PetaSAN created disk and you detached it ?  image-00006  is the disk failing to be attached ? anything special or manual you did on this disk will help.

This error occur when  i delete  image-00009   with procedure discribe on my fist ticket. image-00006  is the disk failling to be attached it was create through petasan (webinterface). I was automatically detached when delete step was finish.

 

 

if this occurred after the delete steps you posted, maybe the object header for image-00006 was accidentally deleted. we use the header object to attach iscsi metadata, if the header gets deleted the image will be switched from attached to detached and cannot be re-attched.

how can i do to recreate hearder  for image-00006 please ?

i do a grep commande and i see the header was here details in below:

root@NODEBKO-03:~# rados --cluster ClusterCCTVBKO -p rbd ls | grep -v  '^rbd_data.1bf3496b8b4567.'
rbd_header.447c7c6b8b4567
rbd_directory
rbd_info
rbd_id.image-00006
rbd_header.447c7c6b8b456
rbd_header.1bf3496b8b4567
rbd_id.image-00011
root@NODEBKO-03:~# rbd info image-00006 --cluster ClusterCCTVBKO

rbd image 'image-00006':
size 30720 GB in 7864320 objects
order 22 (4096 kB objects)
block_name_prefix: rbd_data.1bf3496b8b4567
format: 2
features: layering
flags:
create_timestamp: Wed Apr 17 14:22:15 2019

Pages: 1 2