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

Re: [Xen-users] Xen shutdown fails to release DRBD device



On Wed, Aug 22, 2018 at 03:42:51PM +0200, Valentin Vidic wrote:
> Right, block-drbd tries to move the device to Secondary state on
> shutdown but this fails because something in Xen is still holding the
> device open. Not sure if anything can be done here on the DRBD side
> except retrying. This only happens when shutting down several VMs at
> once, so it seems like some kind of timing problem in the backend
> release?

DRBD end for this seems rather simple, it only checks if the
device->open_cnt is zero. So it would seem like drbd_release
was not called yet when the block-drbd script is run?


static enum drbd_state_rv
is_valid_state(struct drbd_device *device, union drbd_state ns)
{
...
        else if (ns.role == R_SECONDARY && device->open_cnt)
                rv = SS_DEVICE_IN_USE;
...
}

static void drbd_release(struct gendisk *gd, fmode_t mode)
{
        struct drbd_device *device = gd->private_data;
        mutex_lock(&drbd_main_mutex);
        device->open_cnt--;
        mutex_unlock(&drbd_main_mutex);
}

-- 
Valentin

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.