2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 03:32:04 +00:00

use lazy mode of umount to increase the success rate

This commit is contained in:
huweihua 2015-11-22 21:30:33 -05:00
parent c889383494
commit bd2ee5c070

View File

@ -190,7 +190,7 @@ sub process_request {
# umount the rootimg/dev
my $devmount = `cat /proc/mounts |grep "$imagedir/rootimg/dev"`;
if($devmount){
xCAT::Utils->runcmd("umount $imagedir/rootimg/dev");
xCAT::Utils->runcmd("umount -l $imagedir/rootimg/dev");
if($?){
$callback->({error=>["$imagedir/rootimg/dev mount on /dev, and can't umount. remove $imagename will lead to unpredictable result, please umount manualy before try again"], errorcode=>[1]});
return;