attach and detach disk implementation