Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../usr/./man/man8/lockfs.8
Real path: /usr/share/man/man8/lockfs.8
Zurück
'\" te .\" Copyright (c) 2008, 2021, Oracle and/or its affiliates. .TH lockfs 8 "3 Nov 2021" "Oracle Solaris 11.4" "System Administration Commands" .SH NAME lockfs \- change or report UFS file system locks .SH SYNOPSIS .LP .nf \fB/usr/sbin/lockfs\fR [\fB-adefhnuw\fR] [\fB-c\fR \fIstring\fR] [\fIfile-system\fR]... .fi .SH DESCRIPTION .sp .LP \fBlockfs\fR is used to change and report the status of file system locks on \fBUFS\fR file systems. \fBlockfs\fR reports the lock status and unlocks the file systems that were improperly left locked. .sp .LP Using \fBlockfs\fR to lock a file system is discouraged because this requires extensive knowledge of Oracle Solaris internals to be used effectively and correctly. .sp .LP When invoked with no arguments, \fBlockfs\fR lists the \fBUFS\fR file systems that are locked. If \fIfile-system\fR is not specified, and \fB-a\fR is specified, \fBlockfs\fR is run on all mounted, \fBUFS\fR type file systems. .SH OPTIONS .sp .LP The options are mutually exclusive: \fBwndheuf\fR. If you do specify more than one of these options on a \fBlockfs\fR command line, the utility does not protest and invokes only the last option specified. In particular, you cannot specify a flush (\fB-f\fR) and a lock (for example, \fB-w\fR) on the same command line. However, all locking operations implicitly perform a flush, so the \fB-f\fR is superfluous when specifying a lock. .sp .LP You must have the {\fBPRIV_SYS_MOUNT\fR} privilege to use any of the following options, with the exception of \fB-a\fR, \fB-f\fR and \fB-v\fR. .sp .LP The following options are supported. .sp .ne 2 .mk .na \fB\fB-a\fR\fR .ad .br .sp .6 .RS 4n Apply command to all mounted, \fBUFS\fR type file systems. \fIfile-system\fR is ignored when \fB-a\fR is specified. .RE .sp .ne 2 .mk .na \fB\fB-c\fR \fIstring\fR\fR .ad .br .sp .6 .RS 4n Accept a string that is passed as the comment field. The \fB-c\fR only takes affect when the lock is being set using the \fB-d\fR, \fB-h\fR, \fB-n\fR, \fB-u\fR, or \fB-w\fR options. .RE .sp .ne 2 .mk .na \fB\fB-d\fR\fR .ad .br .sp .6 .RS 4n Delete-lock (\fBdlock\fR) the specified \fIfile-system\fR. dlock suspends access that could remove directory entries. .RE .sp .ne 2 .mk .na \fB\fB-e\fR\fR .ad .br .sp .6 .RS 4n Error-lock (\fBelock\fR) the specified \fIfile-system\fR. elock blocks all local access to the locked file system and returns \fBEWOULDBLOCK\fR on all remote access. File systems are elocked by \fBUFS\fR on detection of internal inconsistency. They may only be unlocked after successful repair by \fBfsck\fR, which is usually done automatically (see \fBmount_ufs\fR(8)). elocked file systems can be unmounted. .RE .sp .ne 2 .mk .na \fB\fB-f\fR\fR .ad .br .sp .6 .RS 4n Force a synchronous flush of all data that is dirty at the time \fBfsflush\fR is run to its backing store for the named file system (or for all file systems.) .sp It is a more reliable method than using \fBsync\fR(8) because it does not return until all possible data has been pushed. In the case of \fBUFS\fR filesystems with logging enabled, the log is also rolled before returning. Additional data can be modified by the time \fBfsflush\fR exits, so using one of the locking options is more likely to be of general use. .RE .sp .ne 2 .mk .na \fB\fB-h\fR\fR .ad .br .sp .6 .RS 4n Hard-lock (\fBhlock\fR) the specified \fIfile-system\fR. hlock returns an error on every access to the locked file system, and cannot be unlocked. hlocked file systems can be unmounted. .RE .sp .ne 2 .mk .na \fB\fB-n\fR\fR .ad .br .sp .6 .RS 4n Name-lock (\fBnlock\fR) the specified \fIfile-system\fR. nlock suspends accesses that could change or remove existing directories entries. .RE .sp .ne 2 .mk .na \fB\fB-u\fR\fR .ad .br .sp .6 .RS 4n Unlock (\fBulock\fR) the specified \fIfile-system\fR. ulock awakens suspended accesses. .RE .sp .ne 2 .mk .na \fB\fB-v\fR\fR .ad .br .sp .6 .RS 4n Enable verbose output. .RE .sp .ne 2 .mk .na \fB\fB-w\fR\fR .ad .br .sp .6 .RS 4n Write-lock (\fBwlock\fR) the specified \fIfile-system\fR. wlock suspends writes that would modify the file system. Access times are not kept while a file system is write-locked. .RE .SH OPERANDS .sp .LP The following operands are supported. .sp .ne 2 .mk .na \fB\fIfile-system\fR\fR .ad .br .sp .6 .RS 4n A list of path names separated by whitespace. Note that \fIfile-system\fR can be a directory rather than the specific name of a file system, such as \fB/\fR or \fB/usr\fR. For example, if you specify \fB/export/home\fR as an argument to a \fBlockfs\fR command and \fB/export/home\fR is mounted on the root (\fB/\fR) file system, the \fBlockfs\fR command will take effect on the root file system. .RE .SH EXAMPLES .LP \fBExample 1\fR Using \fBlockfs\fR \fB-a\fR .sp .LP In the following examples, \fIfilesystem\fR is the pathname of the mounted-on directory (mount point). \fILocktype\fR is one of "\fBwrite\fR", "\fBname\fR", "\fBdelete\fR", "\fBhard\fR", or "\fBunlock\fR". When enclosed in parenthesis, the lock is being set. \fIComment\fR is a string set by the process that last issued a lock command. .sp .LP The following example shows the \fBlockfs\fR output when only the \fB-a\fR option is specified. .sp .in +2 .nf example# \fB/usr/sbin/lockfs -a\fR .fi .in -2 .sp .sp .TS tab( ); lw(1.83i) lw(1.83i) lw(1.83i) . Filesystem Locktype Comment / unlock /var unlock .TE .sp .sp .in +2 .nf example# .fi .in -2 .sp .LP \fBExample 2\fR Using \fBlockfs\fR \fB-w\fR .sp .LP The following example shows the \fBlockfs\fR output when the \fB-w\fR option is used to write lock the \fB/var\fR file system and the comment string is set using the \fB-c\fR option. The \fB-a\fR option is then specified on a separate command line. .sp .in +2 .nf example# \fB/usr/sbin/lockfs -w -c "lockfs: write lock example" /var\fR example# \fB/usr/sbin/lockfs -a\fR .fi .in -2 .sp .sp .TS tab( ); lw(1.83i) lw(1.83i) lw(1.83i) . Filesystem Locktype Comment / unlock /var write lockfs: write lock example .TE .sp .sp .in +2 .nf example# .fi .in -2 .sp .LP \fBExample 3\fR Using \fBlockfs\fR \fB-u\fR .sp .LP The following example shows the \fBlockfs\fR output when the \fB-u\fR option is used to unlock the \fB/var\fR file system and the comment string is set using the \fB-c\fR option. .sp .in +2 .nf example# \fB/usr/sbin/lockfs -uc "lockfs: unlock example" /var\fR example# \fB/usr/sbin/lockfs /var\fR .fi .in -2 .sp .sp .TS tab( ); lw(1.83i) lw(1.83i) lw(1.83i) . Filesystem Locktype Comment /var unlock lockfs: unlock example .TE .sp .sp .in +2 .nf example# .fi .in -2 .sp .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Availability system/file-system/ufs .TE .sp .SH SEE ALSO .sp .LP \fBkill\fR(1), \fBufs\fR(4FS), \fBattributes\fR(7), \fBprivileges\fR(7), \fBmount_ufs\fR(8), \fBsync\fR(8) .SH DIAGNOSTICS .sp .ne 2 .mk .na \fB\fIfile system\fR\fB: Insufficient privileges\fR\fR .ad .br .sp .6 .RS 4n The user does not have permission for the requested operation. .RE .sp .ne 2 .mk .na \fB\fIfile system\fR\fB: Deadlock condition detected/avoided\fR\fR .ad .br .sp .6 .RS 4n A file is enabled for accounting or swapping, on \fIfile system\fR. .RE .sp .ne 2 .mk .na \fB\fIfile system\fR\fB: Device busy\fR\fR .ad .br .sp .6 .RS 4n Another process is setting the lock on \fIfile system\fR. .RE