Re: 答复: Snap rollback failed with exclusive-lock enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'd expect that the target still owns the exclusive lock in this case.

On Mon, May 22, 2017 at 10:43 AM, Lijie <li.jieA@xxxxxxx> wrote:
> I have shut-down the VM, but rollback doesn't work fine.
> The concrete commands are as below:
>
> Target:
>  1. rbd create qos1 --size 10240 --image-features 12  (objectmap+exclusive-lock)
>  2. tgtadm --lld iscsi --mode target --op new --tid 1 --targetname qos1
>  3. tgtadm --lld iscsi --mode logicalunit --op new --tid 1 --lun 1 --backing-store rbd/qos1 --bstype rbd -d
>  4. tgtadm --lld iscsi --mode target --op bind --tid 1 -I ALL
>  5. rbd snap create --image qos1 --snap snap_1
>
> Initiator:
>  1. iscsiadm -m discovery -t sendtargets -p 192.168.72.42 --login
>  2.lsblk  (adding device sdn representing rbd with exclusive-lock enabled )
>  3. mkfs.ext4 /dev/sdn
>  4. iscsiadm -m discovery -t sendtargets -p 192.168.72.42 --logout (means shut-down)
>
> Target:
>   rbd snap rollback --image qos1 --snap snap_1
>
> it returns failed,showing "Rolling back to snapshot: 0% complete...failed  rbd: rollback failed: (30) Read-only file system"
>
> But if I don't execute creating ext4  filesystem,snap can rollback  with exclusive-lock enabled successfully .
>
> So can u explain it?
>
> -----邮件原件-----
> 发件人: Jason Dillaman [mailto:jdillama@xxxxxxxxxx]
> 发送时间: 2017年5月22日 19:46
> 收件人: lijie 11803 (RD)
> 抄送: Sage Weil; ceph-users@xxxxxxxxxxxxxx
> 主题: Re:  Snap rollback failed with exclusive-lock enabled
>
> That's by design -- it doesn't make sense to live-rollback a block device when you have a running VM actively accessing the device. Once you shut-down the VM, rollback should work just fine.
>
> On Mon, May 22, 2017 at 5:29 AM, Lijie <li.jieA@xxxxxxx> wrote:
>> Hi All,
>>
>> When I do a snap rollback command  with exclusive-lock enabled, it
>> returns failure .
>>
>> The error message is “Rolling back to snapshot: 0% complete...failed.rbd:
>> rollback failed: (30) Read-only file system”.
>>
>> And the log is “ms_dispatch 0x37df0c0 osd_op_reply(12
>> rbd_header.5e2b6b8b4567 [call] v0'0 uv0 ondisk = -16 ((16) Device or
>> resource busy))”
>>
>>
>>
>> But if I disable the exclusive-lock feature, snap  rollbacks successfully.
>>
>>
>>
>> So Iam wondering whether  the exclusive-lock and rollback are in
>> conflict .Or maybe there exists defect ?
>>
>>
>>
>> Looking forward  to  your reply .
>>
>>
>>
>> Best gards
>>
>>
>>
>> Thanks
>>
>>
>>
>> ----------------------------------------------------------------------
>> ---------------------------------------------------------------
>> 本邮件及其附件含有新华三技术有限公司的保密信息,仅限于发送给上面地址中列出
>> 的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、
>> 或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本
>> 邮件!
>> This e-mail and its attachments contain confidential information from
>> New H3C, which is intended only for the person or entity whose address
>> is listed above. Any use of the information contained herein in any
>> way (including, but not limited to, total or partial disclosure,
>> reproduction, or dissemination) by persons other than the intended
>> recipient(s) is prohibited. If you receive this e-mail in error,
>> please notify the sender by phone or email immediately and delete it!
>>
>> _______________________________________________
>> ceph-users mailing list
>> ceph-users@xxxxxxxxxxxxxx
>> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>>
>
>
>
> --
> Jason



-- 
Jason
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com




[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux