Sponsored Content
Full Discussion: how do i unmount ?
Operating Systems AIX how do i unmount ? Post 82151 by bakunin on Monday 29th of August 2005 08:59:33 AM
Old 08-29-2005
You are doing the "umount" part correctly. The problem is (and this is indicated by the error message) that you can't umount a filesystem (on every UNIX, this is nothing special to AIX) as long as there is a process using a file in it or there is a user session with the PWD somewhere in the filesystem.

Therefore a "mount /myfs" followed by a "umount /myfs" will work, but if you do a "cd /myfs" in between it won't. Change your working directory to some other place and it will work again.

With "fuser" you can (this is why andryk gave you the hint) find out processes which use files in the FS.

As this is a beginners question you should ask it there and ask a moderator to move this thread there.

bakunin
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

[FreeBSD] Unable to unmount

I have mounted an ISO-file to do a network install of Red Hat. Afterwards, I removed the ISO and forgot about the mount. Now, I am unable to unmount this mount, because the target no longer exists... Here's the error I get when I try to unmount: Even if I put all the files back and... (6 Replies)
Discussion started by: indo1144
6 Replies

2. HP-UX

Cannot unmount mount points??

When taking a snap, I have a script that stops any active snap. When running the script, I'm getting a message that u02 and u04 are already mounted. How can I find out what process(es) is/are latching on the these mount points? Thank you for your time. (1 Reply)
Discussion started by: genzbeat
1 Replies

3. AIX

Unmount strongly command

Dear Guy's I'm making script to easier my work to mount and unmount some file systems I'm executing this command umount -f /file_system To unmount the file system but some times is not allow the un mounting it's giving me device is busy ... I want to know is there any another... (2 Replies)
Discussion started by: ITHelper
2 Replies

4. Filesystems, Disks and Memory

Can we unmount device?

Hi, I know that if we need to unmount a device, we use the command umount mount-point, example 'umount /tmp/mount1' But We can also unmount the device with device name example 'umount /dev/hda6'. NOTE: I think in RHEL3 we cannot unmount with device name. Correct me if I am wrong. What... (1 Reply)
Discussion started by: praveen_b744
1 Replies

5. Shell Programming and Scripting

Unmount USB disk

Hi, How can I unmount an usb disk using the command umount? (3 Replies)
Discussion started by: Guccio
3 Replies

6. UNIX for Dummies Questions & Answers

unmount the partition

Dear all, I have a two hard drive.On the second (/dev/sdb1 and /dev/sdb2) hard drive i have two partitions. The /dev/sdb2 has been mounted on the /home2 directory.I want to unmount that /dev/sdb2.I have no idea to how to do it.Can anybody give me the details about that?. Regards, Prakashkumar.S (2 Replies)
Discussion started by: prakashkumar41
2 Replies

7. Solaris

zfs cannot unmount (cannot unshare)

I have installed Solaris 11 Express on my machine, created a raidz2 zpool named shares and set up sharing (zfs set sharesmb=on shares). I also created a script for automatic backuping using snapshots. Everything worked fine. But yesterday I tried recovering from one of those backuped snapshots:... (1 Reply)
Discussion started by: RychnD
1 Replies

8. HP-UX

FC Lun scan without unmount

OS : 11.31 Storage : HP P2000 WE extended one lun to 100GB which was previously 50GB from storage side... How to get detect the size without unmounting.... ---------- Post updated at 04:39 AM ---------- Previous update was at 12:37 AM ---------- No LVM and No online JFS installed... (2 Replies)
Discussion started by: selvaforum
2 Replies

9. Shell Programming and Scripting

Unmount files via script

Hi all, I have a requirement to do an upgrade. As part of that upgrade I have to unmounts files in the fstab (there could be 100's), is there a way I can do this via script? The problem is, is that the mount points on every server will be different.... For example: /u001/oradata/T865 ... (4 Replies)
Discussion started by: gartie
4 Replies

10. AIX

Filesystem unable unmount

Hi all , I have issue oracle filesystem name /oracle/SID unable to unmount even though no any process are running mentioned fs .would appreciate anyone assist further high level .my system running aix 6.1 (7 Replies)
Discussion started by: Arulji
7 Replies
UMOUNT(8)						       System Administration							 UMOUNT(8)

NAME
umount - unmount file systems SYNOPSIS
umount [-hV] umount -a [-dflnrv] [-t vfstype] [-O options] umount [-dflnrv] {dir|device}... DESCRIPTION
The umount command detaches the file system(s) mentioned from the file hierarchy. A file system is specified by giving the directory where it has been mounted. Giving the special device on which the file system lives may also work, but is obsolete, mainly because it will fail in case this device was mounted on more than one directory. Note that a file system cannot be unmounted when it is 'busy' - for example, when there are open files on it, or when some process has its working directory there, or when a swap file on it is in use. The offending process could even be umount itself - it opens libc, and libc in its turn may open for example locale files. A lazy unmount avoids this problem. OPTIONS
-a, --all All of the file systems described in /etc/mtab are unmounted. (With umount version 2.7 and later: the proc filesystem is not unmounted.) -A, --all-targets Unmount all mountpoints in the current namespace for the specified filesystem. The filesystem could be specified by one of the mountpoints or device name (or UUID, etc.). This option could be used together with --recursive then all nested mounts within the filesystem are recursively unmounted. -c, --no-canonicalize Do not canonicalize paths. For more details about this option see the mount(8) man page. -d, --detach-loop In case the unmounted device was a loop device, also free this loop device. --fake Causes everything to be done except for the actual system call; this 'fakes' unmounting the filesystem. It can be used to remove entries from /etc/mtab that were unmounted earlier with the -n option. -f, --force Force unmount (in case of an unreachable NFS system). (Requires kernel 2.1.116 or later.) -i, --internal-only Do not call the /sbin/umount.<filesystem> helper even if it exists. By default /sbin/umount.<filesystem> helper is called if one exists. -n, --no-mtab Unmount without writing in /etc/mtab. -l, --lazy Lazy unmount. Detach the filesystem from the filesystem hierarchy now, and cleanup all references to the filesystem as soon as it is not busy anymore. (Requires kernel 2.4.11 or later.) -O, --test-opts options,list Indicate that the actions should only be taken on file systems with the specified options in /etc/fstab. More than one option type may be specified in a comma separated list. Each option can be prefixed with no to specify options for which no action should be taken. -R, --recursive Recursively unmount each directory specified. Recursion for each directory will stop if any unmount operation in the chain fails for any reason. The relationship between mountpoints is determined by /proc/self/mountinfo entries. The filesystem must be specified by mountpoint path, recursive unmount by device name (or UUID) is unsupported. -r, --read-only In case unmounting fails, try to remount read-only. -t, --types vfstype,ext2,ext3 Indicate that the actions should only be taken on file systems of the specified type. More than one type may be specified in a comma separated list. The list of file system types can be prefixed with no to specify the file system types on which no action should be taken. -v, --verbose Verbose mode. -h, --help Print help message and exit. -V, --version Print version and exit. THE LOOP DEVICE
The umount command will free the loop device (if any) associated with the mount, in case it finds the option 'loop=...' in /etc/mtab, or when the -d option was given. Any pending loop devices can be freed using 'losetup -d', see losetup(8). NOTES
The syntax of external umount helpers is: /sbin/umount.<suffix> {dir|device} [-nlfvr] [-t type.subtype] where the <suffix> is filesystem type or a value from "uhelper=" or "helper=" mtab option. The -t option is used for filesystems with sub- types support (for example /sbin/mount.fuse -t fuse.sshfs). The uhelper= (unprivileged umount helper) is possible to use when non-root user wants to umount a mountpoint which is not defined in the /etc/fstab file (e.g. devices mounted by udisk). The helper= mount option redirects all umount requests to the /sbin/umount.<helper> independently on UID. FILES
/etc/mtab table of mounted file systems ENVIRONMENT
LIBMOUNT_FSTAB=<path> overrides the default location of the fstab file LIBMOUNT_MTAB=<path> overrides the default location of the mtab file LIBMOUNT_DEBUG=0xffff enables debug output SEE ALSO
umount(2), mount(8), losetup(8) HISTORY
A umount command appeared in Version 6 AT&T UNIX. AVAILABILITY
The umount command is part of the util-linux package and is available from Linux Kernel Archive <ftp://ftp.kernel.org/pub/linux/utils/util- linux/>. util-linux August 2012 UMOUNT(8)
All times are GMT -4. The time now is 06:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy