[clug] how can I know umount command do success!
Bob Edwards
Robert.Edwards at anu.edu.au
Wed Jan 26 12:15:01 GMT 2005
umount may fail if some process is still using a directory of the filesystem
as the current working directory (cwd). If the umount fails, then you may need
to use lsof to check if any processes are still in there.
Other than that, use the && as Steve Jenkins suggests.
Cheers,
Bob Edwards.
ÂéÑ©òÔ wrote:
> hi,
> now my linux have mount two file system: the 'df' prints following information:
>
> Filesystem 1k-blocks Used Available Use% Mounted on
> /dev/hda1 5044156 188084 4599840 4% /volume1
> /dev/hdb1 5044156 188084 4599840 4% /volume2
>
> I write a shell as followed:
>
> #/bin/sh
> umount /volume1
> rm -dfr /volume1
> umount /volume2
> rm -dfr /volume2
>
> but when the shell excutes , I often causes error! I think it may be the umount command hasn't
> finished, then the rm has worked!
>
> I want to excute the rm command until I know the umount successed. How can I know the umount command
> excutes successfully!¡¡
>
More information about the linux
mailing list