Project

General

Profile

Bug #20233

Cannot remove striped object

Added by Jan Kasprzak almost 7 years ago. Updated almost 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
libradosstriper
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

I have created a RADOS striped object using

$ dd someargs | rados --pool testpool --striper put testfile -

and interrupted it in the middle of writing. Now I cannot remove this object:

$ rados --pool testpool --striper rm testfile
error removing testpool>testfile: (16) Device or resource busy

Removing the individual parts of the striped object in the order given by "rados ls" works;

rados --pool testpool ls | grep ^testfile.000 | while read filename
do
rados --pool testpool rm $filename
done

This problem has originally been discussed in ceph-users list here:
https://www.mail-archive.com/ceph-users@lists.ceph.com/msg37962.html

History

#1 Updated by Greg Farnum almost 7 years ago

  • Project changed from RADOS to Ceph
  • Category set to libradosstriper

#2 Updated by Stan K almost 7 years ago

I've had simmilar issue.
It seems to be caused by not releasing the "striper.lock" on the striped object in case of the interrupt.
This lock is kept on the first rados object(usually with name <object_name>.0000000000000000). As a workaround you can do following:

### View lock on the object
~# rados -p sata lock info test_break.0000000000000000 striper.lock | python -mjson.tool
{
    "lockers": [
        {
            "addr": "192.168.0.101:0/2836237895",
            "cookie": "30dd70e1-2c45-47ce-9b57-20f3531c1d29",
            "description": "",
            "expiration": "0.000000",
            "name": "client.11054303" 
        }
    ],
    "name": "striper.lock",
    "tag": "Tag",
    "type": "shared" 
}

### Break the lock by client name and cookie
~# rados -p sata lock break test_break.0000000000000000 striper.lock client.11054303 --lock-cookie 30dd70e1-2c45-47ce-9b57-20f3531c1d29

After that object is possible to delete using striper interface:
~# rados --striper -p sata rm test_break

Also available in: Atom PDF