Change mount.Interface.Mount to exec('mount'), instead of syscall

This commit is contained in:
Deyuan Deng
2015-04-02 21:08:04 -04:00
committed by Deyuan Deng
parent 8fa21ebd62
commit 6897095e56
20 changed files with 188 additions and 238 deletions

View File

@@ -112,7 +112,7 @@ func (util *ISCSIUtil) AttachDisk(iscsi iscsiDisk) error {
return err
}
err = iscsi.mounter.Mount(devicePath, globalPDPath, iscsi.fsType, uintptr(0), "")
err = iscsi.mounter.Mount(devicePath, globalPDPath, iscsi.fsType, nil)
if err != nil {
glog.Errorf("iscsi: failed to mount iscsi volume %s [%s] to %s, error %v", devicePath, iscsi.fsType, globalPDPath, err)
}
@@ -126,8 +126,8 @@ func (util *ISCSIUtil) DetachDisk(iscsi iscsiDisk, mntPath string) error {
glog.Errorf("iscsi detach disk: failed to get device from mnt: %s\nError: %v", mntPath, err)
return err
}
if err = iscsi.mounter.Unmount(mntPath, 0); err != nil {
glog.Errorf("iscsi detach disk: failed to umount: %s\nError: %v", mntPath, err)
if err = iscsi.mounter.Unmount(mntPath); err != nil {
glog.Errorf("iscsi detach disk: failed to unmount: %s\nError: %v", mntPath, err)
return err
}
cnt--