覺得很實用,總結一下.
1,先bdf /tmp
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol6 1048576 267384 775128 26% /tmp
2,強制其他實用該文件系統的用戶推出
fuser -ku /dev/vg00/lvol6
2,然後umount /tmp
3,然後再擴
lvextend -l 9999999 /dev/vg01/lvol6
extendfs –F vxfs /dev/vg00/lvol6
mount /tmp
bdf /tmp
注:不是所有的文件系統都可以這麼umount的(比如/opt),原因待查.
附:fuser的man
fuser(1M) fuser(1M)
NAME
fuser - list processes using a file or file structure
SYNOPSIS
/usr/sbin/fuser [-c|-f] [-ku] file ... [[-] [-c|-f] [-ku] file ...] ...
DESCRIPTION
The fuser command lists the process IDs of processes that have each
specified file open. For block special devices, all processes using
any file on that device are listed. The process ID can be followed by
a letter, identifying how the file is being used.
c file is its current directory.
r file is its root directory, as set up by the chroot command
(see chroot(1M)).
o It has file open.
m It has file memory mapped.
t file is its text file.
Options
You can specify the following options:
-c Display the use of a mount point and any file beneath that
mount point. Each file must be a file system mount point.
-f Display the use of the named file only, not the files
beneath it if it is a mounted file system.
-u Display the login user name in parentheses following each process ID.
-k Send the SIGKILL signal to each process using each file.
You can re-specify options between groups of files. The new set of
options replaces the old set. A dash (-) by itself cancels all
options currently in force.
The process IDs associated with each file are printed to standard
output as a single line separated by spaces and terminated with a
single newline. All other output - the file name, the letter, and the
user name - is written to standard error.
You must be superuser to use fuser.
NETWORKING FEATURES
You can use fuser with NFS file systems or files. If the file name is
in the format used in /etc/mnttab to identify an NFS file system,
Hewlett-Packard Company - 1 - HP-UX Release 11i: November 2000
fuser(1M) fuser(1M)
fuser will treat the NFS file system as a block special device and
identify any process using that file system.
If contact with an NFS file system is lost, fuser will fail, since
contact is required to obtain the file system identification. Once
the NFS file system is re-contacted, stale file handles from the
previous contact can be identified, provided that the NFS file system
has the same file system identification.
EXAMPLES
Terminate all processes that are preventing disk drive 1 from being unmounted, listing the process ID and login name of each process being killed.
fuser -ku /dev/dsk/c201d1s?
List process IDs and login names of processes that have the password
file open.
fuser -u /etc/passwd
Combine both the above examples into a single command line.
fuser -ku /dev/dsk/c201d1s? - -u /etc/passwd
If the device /dev/dsk/c201d1s7 is mounted on directory /home, list
the process IDs and login names of processes using the device.
Alternately, if /home is the mount point for an NFS file system, list
process IDs and login names of processes using that NFS file system.
fuser -cu /home
If machine1:/filesystem/2mount is an NFS file system, list all
processes using any file on that file system. If it is not an NFS
file system, treat it as a regular file.
fuser machine1:/filesystem/2mount
SEE ALSO
ps(1), mount(1M), kill(2), signal(2).
STANDARDS CONFORMANCE
fuser: SVID2, SVID3
Hewlett-Packard Company - 2 - HP-UX Release 11i: November 2000