handling code for volume attach/detach