Mechanically kill hard sentence breaks.
This commit is contained in:
@@ -104,7 +104,7 @@ is done on boot.
|
|||||||
Detach an ATA
|
Detach an ATA
|
||||||
.Ar channel .
|
.Ar channel .
|
||||||
Devices on the channel are removed from the kernel,
|
Devices on the channel are removed from the kernel,
|
||||||
and all outstanding transfers etc. are returned back to the system marked
|
and all outstanding transfers etc.\& are returned back to the system marked
|
||||||
as failed.
|
as failed.
|
||||||
.It Ic reinit
|
.It Ic reinit
|
||||||
Reinitialize an ATA
|
Reinitialize an ATA
|
||||||
|
|||||||
@@ -64,7 +64,8 @@ for PCA-200E adapters.
|
|||||||
.El
|
.El
|
||||||
.Sh NOTES
|
.Sh NOTES
|
||||||
For the PCA200E adapter, if no file is specified on the command
|
For the PCA200E adapter, if no file is specified on the command
|
||||||
line a built-in copy of version 4.1.12 microcode is used. When the
|
line a built-in copy of version 4.1.12 microcode is used.
|
||||||
|
When the
|
||||||
option
|
option
|
||||||
.Fl 3
|
.Fl 3
|
||||||
is specified version 3.0.1 microcode is used instead.
|
is specified version 3.0.1 microcode is used instead.
|
||||||
|
|||||||
@@ -40,7 +40,8 @@
|
|||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
The
|
The
|
||||||
.Nm
|
.Nm
|
||||||
utility makes a file to contain a bad sector. Normally, bad sectors
|
utility makes a file to contain a bad sector.
|
||||||
|
Normally, bad sectors
|
||||||
are made inaccessible by the standard formatter, which provides
|
are made inaccessible by the standard formatter, which provides
|
||||||
a forwarding table for bad sectors to the driver.
|
a forwarding table for bad sectors to the driver.
|
||||||
If a driver supports the bad blocking standard it is much preferable to
|
If a driver supports the bad blocking standard it is much preferable to
|
||||||
@@ -83,8 +84,10 @@ relative sector numbers in its console error messages.)
|
|||||||
Then change back to the root directory, unmount the file system
|
Then change back to the root directory, unmount the file system
|
||||||
and run
|
and run
|
||||||
.Xr fsck 8
|
.Xr fsck 8
|
||||||
on the file system. The bad sectors should show up in two files
|
on the file system.
|
||||||
or in the bad sector files and the free list. Have
|
The bad sectors should show up in two files
|
||||||
|
or in the bad sector files and the free list.
|
||||||
|
Have
|
||||||
.Xr fsck 8
|
.Xr fsck 8
|
||||||
remove files containing the offending bad sectors, but
|
remove files containing the offending bad sectors, but
|
||||||
.Em do not
|
.Em do not
|
||||||
|
|||||||
+197
-100
@@ -152,38 +152,44 @@ CAM subsystem.
|
|||||||
The
|
The
|
||||||
.Nm
|
.Nm
|
||||||
utility
|
utility
|
||||||
can cause a loss of data and/or system crashes if used improperly. Even
|
can cause a loss of data and/or system crashes if used improperly.
|
||||||
|
Even
|
||||||
expert users are encouraged to exercise caution when using this command.
|
expert users are encouraged to exercise caution when using this command.
|
||||||
Novice users should stay away from this utility.
|
Novice users should stay away from this utility.
|
||||||
.Pp
|
.Pp
|
||||||
The
|
The
|
||||||
.Nm
|
.Nm
|
||||||
utility has a number of primary functions, many of which support an optional
|
utility has a number of primary functions, many of which support an optional
|
||||||
device identifier. A device identifier can take one of three forms:
|
device identifier.
|
||||||
|
A device identifier can take one of three forms:
|
||||||
.Bl -tag -width 14n
|
.Bl -tag -width 14n
|
||||||
.It deviceUNIT
|
.It deviceUNIT
|
||||||
Specify a device name and unit number combination, like "da5" or "cd3".
|
Specify a device name and unit number combination, like "da5" or "cd3".
|
||||||
Note that character device node names (e.g. /dev/da0) are
|
Note that character device node names (e.g.\& /dev/da0) are
|
||||||
.Em not
|
.Em not
|
||||||
allowed here.
|
allowed here.
|
||||||
.It bus:target
|
.It bus:target
|
||||||
Specify a bus number and target id. The bus number can be determined from
|
Specify a bus number and target id.
|
||||||
|
The bus number can be determined from
|
||||||
the output of
|
the output of
|
||||||
.Dq camcontrol devlist .
|
.Dq camcontrol devlist .
|
||||||
The lun defaults to 0.
|
The lun defaults to 0.
|
||||||
.It bus:target:lun
|
.It bus:target:lun
|
||||||
Specify the bus, target and lun for a device. (e.g. 1:2:0)
|
Specify the bus, target and lun for a device.
|
||||||
|
(e.g.\& 1:2:0)
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
The device identifier, if it is specified,
|
The device identifier, if it is specified,
|
||||||
.Em must
|
.Em must
|
||||||
come immediately after the function name, and before any generic or
|
come immediately after the function name, and before any generic or
|
||||||
function-specific arguments. Note that the
|
function-specific arguments.
|
||||||
|
Note that the
|
||||||
.Fl n
|
.Fl n
|
||||||
and
|
and
|
||||||
.Fl u
|
.Fl u
|
||||||
arguments described below will override any device name or unit number
|
arguments described below will override any device name or unit number
|
||||||
specified beforehand. The
|
specified beforehand.
|
||||||
|
The
|
||||||
.Fl n
|
.Fl n
|
||||||
and
|
and
|
||||||
.Fl u
|
.Fl u
|
||||||
@@ -196,24 +202,28 @@ Most of the
|
|||||||
primary functions support these generic arguments:
|
primary functions support these generic arguments:
|
||||||
.Bl -tag -width 14n
|
.Bl -tag -width 14n
|
||||||
.It Fl C Ar count
|
.It Fl C Ar count
|
||||||
SCSI command retry count. In order for this to work, error recovery
|
SCSI command retry count.
|
||||||
|
In order for this to work, error recovery
|
||||||
.Pq Fl E
|
.Pq Fl E
|
||||||
must be turned on.
|
must be turned on.
|
||||||
.It Fl E
|
.It Fl E
|
||||||
Instruct the kernel to perform generic SCSI error recovery for the given
|
Instruct the kernel to perform generic SCSI error recovery for the given
|
||||||
command. This is needed in order for the retry count
|
command.
|
||||||
|
This is needed in order for the retry count
|
||||||
.Pq Fl C
|
.Pq Fl C
|
||||||
to be honored. Other than retrying commands, the generic error recovery in
|
to be honored.
|
||||||
|
Other than retrying commands, the generic error recovery in
|
||||||
the code will generally attempt to spin up drives that are not spinning.
|
the code will generally attempt to spin up drives that are not spinning.
|
||||||
It may take some other actions, depending upon the sense code returned from
|
It may take some other actions, depending upon the sense code returned from
|
||||||
the command.
|
the command.
|
||||||
.It Fl n Ar dev_name
|
.It Fl n Ar dev_name
|
||||||
Specify the device type to operate on, e.g. "da", "cd".
|
Specify the device type to operate on, e.g.\& "da", "cd".
|
||||||
.It Fl t Ar timeout
|
.It Fl t Ar timeout
|
||||||
SCSI command timeout in seconds. This overrides the default timeout for
|
SCSI command timeout in seconds.
|
||||||
|
This overrides the default timeout for
|
||||||
any given command.
|
any given command.
|
||||||
.It Fl u Ar unit_number
|
.It Fl u Ar unit_number
|
||||||
Specify the device unit number, e.g. "1", "5".
|
Specify the device unit number, e.g.\& "1", "5".
|
||||||
.It Fl v
|
.It Fl v
|
||||||
Be verbose, print out sense information for failed SCSI commands.
|
Be verbose, print out sense information for failed SCSI commands.
|
||||||
.El
|
.El
|
||||||
@@ -236,16 +246,19 @@ The
|
|||||||
.Nm
|
.Nm
|
||||||
utility will report whether the device is ready or not.
|
utility will report whether the device is ready or not.
|
||||||
.It Ic inquiry
|
.It Ic inquiry
|
||||||
Send a SCSI inquiry command (0x12) to a device. By default,
|
Send a SCSI inquiry command (0x12) to a device.
|
||||||
|
By default,
|
||||||
.Nm
|
.Nm
|
||||||
will print out the standard inquiry data, device serial number, and
|
will print out the standard inquiry data, device serial number, and
|
||||||
transfer rate information. The user can specify that only certain types of
|
transfer rate information.
|
||||||
|
The user can specify that only certain types of
|
||||||
inquiry data be printed:
|
inquiry data be printed:
|
||||||
.Bl -tag -width 4n
|
.Bl -tag -width 4n
|
||||||
.It Fl D
|
.It Fl D
|
||||||
Get the standard inquiry data.
|
Get the standard inquiry data.
|
||||||
.It Fl S
|
.It Fl S
|
||||||
Print out the serial number. If this flag is the only one specified,
|
Print out the serial number.
|
||||||
|
If this flag is the only one specified,
|
||||||
.Nm
|
.Nm
|
||||||
will not print out "Serial Number" before the value returned by the drive.
|
will not print out "Serial Number" before the value returned by the drive.
|
||||||
This is to aid in script writing.
|
This is to aid in script writing.
|
||||||
@@ -268,8 +281,10 @@ start bit cleared and the load/eject bit set.
|
|||||||
Tell the kernel to scan all busses in the system (with the
|
Tell the kernel to scan all busses in the system (with the
|
||||||
.Ar all
|
.Ar all
|
||||||
argument), the given bus (XPT_SCAN_BUS), or bus:target:lun
|
argument), the given bus (XPT_SCAN_BUS), or bus:target:lun
|
||||||
(XPT_SCAN_LUN) for new devices or devices that have gone away. The user
|
(XPT_SCAN_LUN) for new devices or devices that have gone away.
|
||||||
may specify a scan of all busses, a single bus, or a lun. Scanning all luns
|
The user
|
||||||
|
may specify a scan of all busses, a single bus, or a lun.
|
||||||
|
Scanning all luns
|
||||||
on a target isn't supported.
|
on a target isn't supported.
|
||||||
.It Ic reset
|
.It Ic reset
|
||||||
Tell the kernel to reset all busses in the system (with the
|
Tell the kernel to reset all busses in the system (with the
|
||||||
@@ -292,9 +307,13 @@ to print out the list as logical blocks,
|
|||||||
.Em bfi ,
|
.Em bfi ,
|
||||||
to print out the list in bytes from index format, and
|
to print out the list in bytes from index format, and
|
||||||
.Em phys ,
|
.Em phys ,
|
||||||
to print out the list in physical sector format. The format argument is
|
to print out the list in physical sector format.
|
||||||
required. Most drives support the physical sector format. Some drives
|
The format argument is
|
||||||
support the logical block format. Many drives, if they don't support the
|
required.
|
||||||
|
Most drives support the physical sector format.
|
||||||
|
Some drives
|
||||||
|
support the logical block format.
|
||||||
|
Many drives, if they don't support the
|
||||||
requested format, return the data in an alternate format, along with sense
|
requested format, return the data in an alternate format, along with sense
|
||||||
information indicating that the requested data format isn't supported.
|
information indicating that the requested data format isn't supported.
|
||||||
The
|
The
|
||||||
@@ -306,7 +325,8 @@ support the requested format,
|
|||||||
.Nm
|
.Nm
|
||||||
will probably see the error as a failure to complete the request.
|
will probably see the error as a failure to complete the request.
|
||||||
.It Fl G
|
.It Fl G
|
||||||
Print out the grown defect list. This is a list of bad blocks that have
|
Print out the grown defect list.
|
||||||
|
This is a list of bad blocks that have
|
||||||
been remapped since the disk left the factory.
|
been remapped since the disk left the factory.
|
||||||
.It Fl P
|
.It Fl P
|
||||||
Print out the primary defect list.
|
Print out the primary defect list.
|
||||||
@@ -321,7 +341,8 @@ is specified,
|
|||||||
will print out the number of defects given in the READ DEFECT DATA header
|
will print out the number of defects given in the READ DEFECT DATA header
|
||||||
returned from the drive.
|
returned from the drive.
|
||||||
.It Ic modepage
|
.It Ic modepage
|
||||||
Allows the user to display and optionally edit a SCSI mode page. The mode
|
Allows the user to display and optionally edit a SCSI mode page.
|
||||||
|
The mode
|
||||||
page formats are located in
|
page formats are located in
|
||||||
.Pa /usr/share/misc/scsi_modes .
|
.Pa /usr/share/misc/scsi_modes .
|
||||||
This can be overridden by specifying a different file in the
|
This can be overridden by specifying a different file in the
|
||||||
@@ -336,24 +357,28 @@ Disable block descriptors for mode sense.
|
|||||||
.It Fl b
|
.It Fl b
|
||||||
Displays mode page data in binary format.
|
Displays mode page data in binary format.
|
||||||
.It Fl e
|
.It Fl e
|
||||||
This flag allows the user to edit values in the mode page. The user may
|
This flag allows the user to edit values in the mode page.
|
||||||
|
The user may
|
||||||
either edit mode page values with the text editor pointed to by his
|
either edit mode page values with the text editor pointed to by his
|
||||||
.Ev EDITOR
|
.Ev EDITOR
|
||||||
environment variable, or supply mode page values via standard input, using
|
environment variable, or supply mode page values via standard input, using
|
||||||
the same format that
|
the same format that
|
||||||
.Nm
|
.Nm
|
||||||
uses to display mode page values. The editor will be invoked if
|
uses to display mode page values.
|
||||||
|
The editor will be invoked if
|
||||||
.Nm
|
.Nm
|
||||||
detects that standard input is terminal.
|
detects that standard input is terminal.
|
||||||
.It Fl l
|
.It Fl l
|
||||||
Lists all available mode pages.
|
Lists all available mode pages.
|
||||||
.It Fl m Ar mode_page
|
.It Fl m Ar mode_page
|
||||||
This specifies the number of the mode page the user would like to view
|
This specifies the number of the mode page the user would like to view
|
||||||
and/or edit. This argument is mandatory unless
|
and/or edit.
|
||||||
|
This argument is mandatory unless
|
||||||
.Fl l
|
.Fl l
|
||||||
is specified.
|
is specified.
|
||||||
.It Fl P Ar pgctl
|
.It Fl P Ar pgctl
|
||||||
This allows the user to specify the page control field. Possible values are:
|
This allows the user to specify the page control field.
|
||||||
|
Possible values are:
|
||||||
.Bl -tag -width xxx -compact
|
.Bl -tag -width xxx -compact
|
||||||
.It 0
|
.It 0
|
||||||
Current values
|
Current values
|
||||||
@@ -371,8 +396,10 @@ The
|
|||||||
.Ic cmd
|
.Ic cmd
|
||||||
function requires the
|
function requires the
|
||||||
.Fl c
|
.Fl c
|
||||||
argument to specify the CDB. Other arguments are optional, depending on
|
argument to specify the CDB.
|
||||||
the command type. The command and data specification syntax is documented
|
Other arguments are optional, depending on
|
||||||
|
the command type.
|
||||||
|
The command and data specification syntax is documented
|
||||||
in
|
in
|
||||||
.Xr cam_cdbparse 3 .
|
.Xr cam_cdbparse 3 .
|
||||||
NOTE: If the CDB specified causes data to be transfered to or from the
|
NOTE: If the CDB specified causes data to be transfered to or from the
|
||||||
@@ -382,7 +409,8 @@ or
|
|||||||
.Fl o .
|
.Fl o .
|
||||||
.Bl -tag -width 17n
|
.Bl -tag -width 17n
|
||||||
.It Fl c Ar cmd Op args
|
.It Fl c Ar cmd Op args
|
||||||
This specifies the SCSI CDB. CDBs may be 6, 10, 12 or 16 bytes.
|
This specifies the SCSI CDB.
|
||||||
|
CDBs may be 6, 10, 12 or 16 bytes.
|
||||||
.It Fl i Ar len Ar fmt
|
.It Fl i Ar len Ar fmt
|
||||||
This specifies the amount of data to read, and how it should be displayed.
|
This specifies the amount of data to read, and how it should be displayed.
|
||||||
If the format is
|
If the format is
|
||||||
@@ -391,15 +419,19 @@ If the format is
|
|||||||
bytes of data will be read from the device and written to standard output.
|
bytes of data will be read from the device and written to standard output.
|
||||||
.It Fl o Ar len Ar fmt Op args
|
.It Fl o Ar len Ar fmt Op args
|
||||||
This specifies the amount of data to be written to a device, and the data
|
This specifies the amount of data to be written to a device, and the data
|
||||||
that is to be written. If the format is
|
that is to be written.
|
||||||
|
If the format is
|
||||||
.Sq - ,
|
.Sq - ,
|
||||||
.Ar len
|
.Ar len
|
||||||
bytes of data will be read from standard input and written to the device.
|
bytes of data will be read from standard input and written to the device.
|
||||||
.El
|
.El
|
||||||
.It Ic debug
|
.It Ic debug
|
||||||
Turn on CAM debugging printfs in the kernel. This requires options CAMDEBUG
|
Turn on CAM debugging printfs in the kernel.
|
||||||
in your kernel config file. WARNING: enabling debugging printfs currently
|
This requires options CAMDEBUG
|
||||||
causes an EXTREME number of kernel printfs. You may have difficulty
|
in your kernel config file.
|
||||||
|
WARNING: enabling debugging printfs currently
|
||||||
|
causes an EXTREME number of kernel printfs.
|
||||||
|
You may have difficulty
|
||||||
turning off the debugging printfs once they start, since the kernel will be
|
turning off the debugging printfs once they start, since the kernel will be
|
||||||
busy printing messages and unable to service other requests quickly.
|
busy printing messages and unable to service other requests quickly.
|
||||||
The
|
The
|
||||||
@@ -417,46 +449,57 @@ Enable CAM_DEBUG_SUBTRACE printfs.
|
|||||||
.It Fl X
|
.It Fl X
|
||||||
Enable CAM_DEBUG_XPT printfs.
|
Enable CAM_DEBUG_XPT printfs.
|
||||||
.It Fl c
|
.It Fl c
|
||||||
Enable CAM_DEBUG_CDB printfs. This will cause the kernel to print out the
|
Enable CAM_DEBUG_CDB printfs.
|
||||||
|
This will cause the kernel to print out the
|
||||||
SCSI CDBs sent to the specified device(s).
|
SCSI CDBs sent to the specified device(s).
|
||||||
.It all
|
.It all
|
||||||
Enable debugging for all devices.
|
Enable debugging for all devices.
|
||||||
.It off
|
.It off
|
||||||
Turn off debugging for all devices
|
Turn off debugging for all devices
|
||||||
.It bus Ns Op :target Ns Op :lun
|
.It bus Ns Op :target Ns Op :lun
|
||||||
Turn on debugging for the given bus, target or lun. If the lun or target
|
Turn on debugging for the given bus, target or lun.
|
||||||
and lun are not specified, they are wildcarded. (i.e., just specifying a
|
If the lun or target
|
||||||
|
and lun are not specified, they are wildcarded.
|
||||||
|
(i.e., just specifying a
|
||||||
bus turns on debugging printfs for all devices on that bus.)
|
bus turns on debugging printfs for all devices on that bus.)
|
||||||
.El
|
.El
|
||||||
.It Ic tags
|
.It Ic tags
|
||||||
Show or set the number of "tagged openings" or simultaneous transactions
|
Show or set the number of "tagged openings" or simultaneous transactions
|
||||||
we attempt to queue to a particular device. By default, the
|
we attempt to queue to a particular device.
|
||||||
|
By default, the
|
||||||
.Ic tags
|
.Ic tags
|
||||||
command, with no command-specific arguments (i.e. only generic arguments)
|
command, with no command-specific arguments (i.e., only generic arguments)
|
||||||
prints out the "soft" maximum number of transactions that can be queued to
|
prints out the "soft" maximum number of transactions that can be queued to
|
||||||
the device in question. For more detailed information, use the
|
the device in question.
|
||||||
|
For more detailed information, use the
|
||||||
.Fl v
|
.Fl v
|
||||||
argument described below.
|
argument described below.
|
||||||
.Bl -tag -width 7n
|
.Bl -tag -width 7n
|
||||||
.It Fl N Ar tags
|
.It Fl N Ar tags
|
||||||
Set the number of tags for the given device. This must be between the
|
Set the number of tags for the given device.
|
||||||
minimum and maximum number set in the kernel quirk table. The default for
|
This must be between the
|
||||||
|
minimum and maximum number set in the kernel quirk table.
|
||||||
|
The default for
|
||||||
most devices that support tagged queueing is a minimum of 2 and a maximum
|
most devices that support tagged queueing is a minimum of 2 and a maximum
|
||||||
of 255. The minimum and maximum values for a given device may be
|
of 255.
|
||||||
|
The minimum and maximum values for a given device may be
|
||||||
determined by using the
|
determined by using the
|
||||||
.Fl v
|
.Fl v
|
||||||
switch. The meaning of the
|
switch.
|
||||||
|
The meaning of the
|
||||||
.Fl v
|
.Fl v
|
||||||
switch for this
|
switch for this
|
||||||
.Nm
|
.Nm
|
||||||
subcommand is described below.
|
subcommand is described below.
|
||||||
.It Fl q
|
.It Fl q
|
||||||
Be quiet, and don't report the number of tags. This is generally used when
|
Be quiet, and don't report the number of tags.
|
||||||
|
This is generally used when
|
||||||
setting the number of tags.
|
setting the number of tags.
|
||||||
.It Fl v
|
.It Fl v
|
||||||
The verbose flag has special functionality for the
|
The verbose flag has special functionality for the
|
||||||
.Em tags
|
.Em tags
|
||||||
argument. It causes
|
argument.
|
||||||
|
It causes
|
||||||
.Nm
|
.Nm
|
||||||
to print out the tagged queueing related fields of the XPT_GDEV_TYPE CCB:
|
to print out the tagged queueing related fields of the XPT_GDEV_TYPE CCB:
|
||||||
.Bl -tag -width 13n
|
.Bl -tag -width 13n
|
||||||
@@ -465,55 +508,68 @@ This is the amount of capacity for transactions queued to a given device.
|
|||||||
.It dev_active
|
.It dev_active
|
||||||
This is the number of transactions currently queued to a device.
|
This is the number of transactions currently queued to a device.
|
||||||
.It devq_openings
|
.It devq_openings
|
||||||
This is the kernel queue space for transactions. This count usually mirrors
|
This is the kernel queue space for transactions.
|
||||||
|
This count usually mirrors
|
||||||
dev_openings except during error recovery operations when
|
dev_openings except during error recovery operations when
|
||||||
the device queue is frozen (device is not allowed to receive
|
the device queue is frozen (device is not allowed to receive
|
||||||
commands), the number of dev_openings is reduced, or transaction
|
commands), the number of dev_openings is reduced, or transaction
|
||||||
replay is occurring.
|
replay is occurring.
|
||||||
.It devq_queued
|
.It devq_queued
|
||||||
This is the number of transactions waiting in the kernel queue for capacity
|
This is the number of transactions waiting in the kernel queue for capacity
|
||||||
on the device. This number is usually zero unless error recovery is in
|
on the device.
|
||||||
|
This number is usually zero unless error recovery is in
|
||||||
progress.
|
progress.
|
||||||
.It held
|
.It held
|
||||||
The held count is the number of CCBs held by peripheral drivers that have
|
The held count is the number of CCBs held by peripheral drivers that have
|
||||||
either just been completed or are about to be released to the transport
|
either just been completed or are about to be released to the transport
|
||||||
layer for service by a device. Held CCBs reserve capacity on a given
|
layer for service by a device.
|
||||||
|
Held CCBs reserve capacity on a given
|
||||||
device.
|
device.
|
||||||
.It mintags
|
.It mintags
|
||||||
This is the current "hard" minimum number of transactions that can be
|
This is the current "hard" minimum number of transactions that can be
|
||||||
queued to a device at once. The
|
queued to a device at once.
|
||||||
|
The
|
||||||
.Ar dev_openings
|
.Ar dev_openings
|
||||||
value above cannot go below this number. The default value for
|
value above cannot go below this number.
|
||||||
|
The default value for
|
||||||
.Ar mintags
|
.Ar mintags
|
||||||
is 2, although it may be set higher or lower for various devices.
|
is 2, although it may be set higher or lower for various devices.
|
||||||
.It maxtags
|
.It maxtags
|
||||||
This is the "hard" maximum number of transactions that can be queued to a
|
This is the "hard" maximum number of transactions that can be queued to a
|
||||||
device at one time. The
|
device at one time.
|
||||||
|
The
|
||||||
.Ar dev_openings
|
.Ar dev_openings
|
||||||
value cannot go above this number. The default value for
|
value cannot go above this number.
|
||||||
|
The default value for
|
||||||
.Ar maxtags
|
.Ar maxtags
|
||||||
is 255, although it may be set higher or lower for various devices.
|
is 255, although it may be set higher or lower for various devices.
|
||||||
.El
|
.El
|
||||||
.El
|
.El
|
||||||
.It Ic negotiate
|
.It Ic negotiate
|
||||||
Show or negotiate various communication parameters. Some controllers may
|
Show or negotiate various communication parameters.
|
||||||
not support setting or changing some of these values. For instance, the
|
Some controllers may
|
||||||
|
not support setting or changing some of these values.
|
||||||
|
For instance, the
|
||||||
Adaptec 174x controllers do not support changing a device's sync rate or
|
Adaptec 174x controllers do not support changing a device's sync rate or
|
||||||
offset.
|
offset.
|
||||||
The
|
The
|
||||||
.Nm
|
.Nm
|
||||||
utility
|
utility
|
||||||
will not attempt to set the parameter if the controller indicates that it
|
will not attempt to set the parameter if the controller indicates that it
|
||||||
does not support setting the parameter. To find out what the controller
|
does not support setting the parameter.
|
||||||
|
To find out what the controller
|
||||||
supports, use the
|
supports, use the
|
||||||
.Fl v
|
.Fl v
|
||||||
flag. The meaning of the
|
flag.
|
||||||
|
The meaning of the
|
||||||
.Fl v
|
.Fl v
|
||||||
flag for the
|
flag for the
|
||||||
.Ic negotiate
|
.Ic negotiate
|
||||||
command is described below. Also, some controller drivers don't support
|
command is described below.
|
||||||
|
Also, some controller drivers don't support
|
||||||
setting negotiation parameters, even if the underlying controller supports
|
setting negotiation parameters, even if the underlying controller supports
|
||||||
negotiation changes. Some controllers, such as the Advansys wide
|
negotiation changes.
|
||||||
|
Some controllers, such as the Advansys wide
|
||||||
controllers, support enabling and disabling synchronous negotiation for
|
controllers, support enabling and disabling synchronous negotiation for
|
||||||
a device, but do not support setting the synchronous negotiation rate.
|
a device, but do not support setting the synchronous negotiation rate.
|
||||||
.Bl -tag -width 17n
|
.Bl -tag -width 17n
|
||||||
@@ -521,41 +577,51 @@ a device, but do not support setting the synchronous negotiation rate.
|
|||||||
Attempt to make the negotiation settings take effect immediately by sending
|
Attempt to make the negotiation settings take effect immediately by sending
|
||||||
a Test Unit Ready command to the device.
|
a Test Unit Ready command to the device.
|
||||||
.It Fl c
|
.It Fl c
|
||||||
Show or set current negotiation settings. This is the default.
|
Show or set current negotiation settings.
|
||||||
|
This is the default.
|
||||||
.It Fl D Ar enable|disable
|
.It Fl D Ar enable|disable
|
||||||
Enable or disable disconnection.
|
Enable or disable disconnection.
|
||||||
.It Fl O Ar offset
|
.It Fl O Ar offset
|
||||||
Set the command delay offset.
|
Set the command delay offset.
|
||||||
.It Fl q
|
.It Fl q
|
||||||
Be quiet, don't print anything. This is generally useful when you want to
|
Be quiet, don't print anything.
|
||||||
|
This is generally useful when you want to
|
||||||
set a parameter, but don't want any status information.
|
set a parameter, but don't want any status information.
|
||||||
.It Fl R Ar syncrate
|
.It Fl R Ar syncrate
|
||||||
Change the synchronization rate for a device. The sync rate is a floating
|
Change the synchronization rate for a device.
|
||||||
point value specified in MHz. So, for instance,
|
The sync rate is a floating
|
||||||
|
point value specified in MHz.
|
||||||
|
So, for instance,
|
||||||
.Sq 20.000
|
.Sq 20.000
|
||||||
is a legal value, as is
|
is a legal value, as is
|
||||||
.Sq 20 .
|
.Sq 20 .
|
||||||
.It Fl T Ar enable|disable
|
.It Fl T Ar enable|disable
|
||||||
Enable or disable tagged queueing for a device.
|
Enable or disable tagged queueing for a device.
|
||||||
.It Fl U
|
.It Fl U
|
||||||
Show or set user negotiation settings. The default is to show or set
|
Show or set user negotiation settings.
|
||||||
|
The default is to show or set
|
||||||
current negotiation settings.
|
current negotiation settings.
|
||||||
.It Fl v
|
.It Fl v
|
||||||
The verbose switch has special meaning for the
|
The verbose switch has special meaning for the
|
||||||
.Ic negotiate
|
.Ic negotiate
|
||||||
subcommand. It causes
|
subcommand.
|
||||||
|
It causes
|
||||||
.Nm
|
.Nm
|
||||||
to print out the contents of a Path Inquiry (XPT_PATH_INQ) CCB sent to the
|
to print out the contents of a Path Inquiry (XPT_PATH_INQ) CCB sent to the
|
||||||
controller driver.
|
controller driver.
|
||||||
.It Fl W Ar bus_width
|
.It Fl W Ar bus_width
|
||||||
Specify the bus width to negotiate with a device. The bus width is
|
Specify the bus width to negotiate with a device.
|
||||||
specified in bits. The only useful values to specify are 8, 16, and 32
|
The bus width is
|
||||||
bits. The controller must support the bus width in question in order for
|
specified in bits.
|
||||||
|
The only useful values to specify are 8, 16, and 32
|
||||||
|
bits.
|
||||||
|
The controller must support the bus width in question in order for
|
||||||
the setting to take effect.
|
the setting to take effect.
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
In general, sync rate and offset settings will not take effect for a
|
In general, sync rate and offset settings will not take effect for a
|
||||||
device until a command has been sent to the device. The
|
device until a command has been sent to the device.
|
||||||
|
The
|
||||||
.Fl a
|
.Fl a
|
||||||
switch above will automatically send a Test Unit Ready to the device so
|
switch above will automatically send a Test Unit Ready to the device so
|
||||||
negotiation parameters will take effect.
|
negotiation parameters will take effect.
|
||||||
@@ -566,27 +632,36 @@ FORMAT UNIT command to the named device.
|
|||||||
.Pp
|
.Pp
|
||||||
.Em WARNING! WARNING! WARNING!
|
.Em WARNING! WARNING! WARNING!
|
||||||
.Pp
|
.Pp
|
||||||
Low level formatting a disk will destroy ALL data on the disk. Use
|
Low level formatting a disk will destroy ALL data on the disk.
|
||||||
extreme caution when issuing this command. Many users low-level format
|
Use
|
||||||
disks that do not really need to be low-level formatted. There are
|
extreme caution when issuing this command.
|
||||||
|
Many users low-level format
|
||||||
|
disks that do not really need to be low-level formatted.
|
||||||
|
There are
|
||||||
relatively few scenarios that call for low-level formatting a disk.
|
relatively few scenarios that call for low-level formatting a disk.
|
||||||
One reason for
|
One reason for
|
||||||
low-level formatting a disk is to initialize the disk after changing
|
low-level formatting a disk is to initialize the disk after changing
|
||||||
its physical sector size. Another reason for low-level formatting a disk
|
its physical sector size.
|
||||||
|
Another reason for low-level formatting a disk
|
||||||
is to revive the disk if you are getting "medium format corrupted" errors
|
is to revive the disk if you are getting "medium format corrupted" errors
|
||||||
from the disk in response to read and write requests.
|
from the disk in response to read and write requests.
|
||||||
.Pp
|
.Pp
|
||||||
Some disks take longer than others to format. Users should specify a
|
Some disks take longer than others to format.
|
||||||
timeout long enough to allow the format to complete. The default format
|
Users should specify a
|
||||||
timeout is 3 hours, which should be long enough for most disks. Some hard
|
timeout long enough to allow the format to complete.
|
||||||
|
The default format
|
||||||
|
timeout is 3 hours, which should be long enough for most disks.
|
||||||
|
Some hard
|
||||||
disks will complete a format operation in a very short period of time
|
disks will complete a format operation in a very short period of time
|
||||||
(on the order of 5 minutes or less). This is often because the drive
|
(on the order of 5 minutes or less).
|
||||||
|
This is often because the drive
|
||||||
doesn't really support the FORMAT UNIT command -- it just accepts the
|
doesn't really support the FORMAT UNIT command -- it just accepts the
|
||||||
command, waits a few minutes and then returns it.
|
command, waits a few minutes and then returns it.
|
||||||
.Pp
|
.Pp
|
||||||
The
|
The
|
||||||
.Sq format
|
.Sq format
|
||||||
subcommand takes several arguments that modify its default behavior. The
|
subcommand takes several arguments that modify its default behavior.
|
||||||
|
The
|
||||||
.Fl q
|
.Fl q
|
||||||
and
|
and
|
||||||
.Fl y
|
.Fl y
|
||||||
@@ -594,21 +669,27 @@ arguments can be useful for scripts.
|
|||||||
.Pp
|
.Pp
|
||||||
.Bl -tag -width 6n
|
.Bl -tag -width 6n
|
||||||
.It Fl q
|
.It Fl q
|
||||||
Be quiet, don't print any status messages. This option will not disable
|
Be quiet, don't print any status messages.
|
||||||
the questions, however. To disable questions, use the
|
This option will not disable
|
||||||
|
the questions, however.
|
||||||
|
To disable questions, use the
|
||||||
.Fl y
|
.Fl y
|
||||||
argument, below.
|
argument, below.
|
||||||
.It Fl w
|
.It Fl w
|
||||||
Issue a non-immediate format command. By default,
|
Issue a non-immediate format command.
|
||||||
|
By default,
|
||||||
.Nm
|
.Nm
|
||||||
issues the FORMAT UNIT command with the immediate bit set. This tells the
|
issues the FORMAT UNIT command with the immediate bit set.
|
||||||
|
This tells the
|
||||||
device to immediately return the format command, before the format has
|
device to immediately return the format command, before the format has
|
||||||
actually completed. Then,
|
actually completed.
|
||||||
|
Then,
|
||||||
.Nm
|
.Nm
|
||||||
gathers
|
gathers
|
||||||
.Tn SCSI
|
.Tn SCSI
|
||||||
sense information from the device every second to determine how far along
|
sense information from the device every second to determine how far along
|
||||||
in the format process it is. If the
|
in the format process it is.
|
||||||
|
If the
|
||||||
.Fl w
|
.Fl w
|
||||||
argument is specified,
|
argument is specified,
|
||||||
.Nm
|
.Nm
|
||||||
@@ -616,10 +697,12 @@ will issue a non-immediate format command, and will be unable to print any
|
|||||||
information to let the user know what percentage of the disk has been
|
information to let the user know what percentage of the disk has been
|
||||||
formatted.
|
formatted.
|
||||||
.It Fl y
|
.It Fl y
|
||||||
Don't ask any questions. By default,
|
Don't ask any questions.
|
||||||
|
By default,
|
||||||
.Nm
|
.Nm
|
||||||
will ask the user if he/she really wants to format the disk in question,
|
will ask the user if he/she really wants to format the disk in question,
|
||||||
and also if the default format command timeout is acceptable. The user
|
and also if the default format command timeout is acceptable.
|
||||||
|
The user
|
||||||
will not be asked about the timeout if a timeout is specified on the
|
will not be asked about the timeout if a timeout is specified on the
|
||||||
command line.
|
command line.
|
||||||
.El
|
.El
|
||||||
@@ -665,11 +748,14 @@ switch was not specified.
|
|||||||
camcontrol tur da1 -E -C 4 -t 50 -v
|
camcontrol tur da1 -E -C 4 -t 50 -v
|
||||||
.Ed
|
.Ed
|
||||||
.Pp
|
.Pp
|
||||||
Send a test unit ready command to da1. Enable kernel error recovery.
|
Send a test unit ready command to da1.
|
||||||
Specify a retry count of 4, and a timeout of 50 seconds. Enable sense
|
Enable kernel error recovery.
|
||||||
|
Specify a retry count of 4, and a timeout of 50 seconds.
|
||||||
|
Enable sense
|
||||||
printing (with the
|
printing (with the
|
||||||
.Fl v
|
.Fl v
|
||||||
flag) if the command fails. Since error recovery is turned on, the
|
flag) if the command fails.
|
||||||
|
Since error recovery is turned on, the
|
||||||
disk will be spun up if it is not currently spinning.
|
disk will be spun up if it is not currently spinning.
|
||||||
The
|
The
|
||||||
.Nm
|
.Nm
|
||||||
@@ -679,8 +765,10 @@ camcontrol cmd -n cd -u 1 -v -c "3C 00 00 00 00 00 00 00 0e 00" \e
|
|||||||
-i 0xe "s1 i3 i1 i1 i1 i1 i1 i1 i1 i1 i1 i1"
|
-i 0xe "s1 i3 i1 i1 i1 i1 i1 i1 i1 i1 i1 i1"
|
||||||
.Ed
|
.Ed
|
||||||
.Pp
|
.Pp
|
||||||
Issue a READ BUFFER command (0x3C) to cd1. Display the buffer size of cd1,
|
Issue a READ BUFFER command (0x3C) to cd1.
|
||||||
and display the first 10 bytes from the cache on cd1. Display SCSI sense
|
Display the buffer size of cd1,
|
||||||
|
and display the first 10 bytes from the cache on cd1.
|
||||||
|
Display SCSI sense
|
||||||
information if the command fails.
|
information if the command fails.
|
||||||
.Pp
|
.Pp
|
||||||
.Bd -literal -offset indent
|
.Bd -literal -offset indent
|
||||||
@@ -688,9 +776,12 @@ camcontrol cmd -n cd -u 1 -v -c "3B 00 00 00 00 00 00 00 0e 00" \e
|
|||||||
-o 14 "00 00 00 00 1 2 3 4 5 6 v v v v" 7 8 9 8
|
-o 14 "00 00 00 00 1 2 3 4 5 6 v v v v" 7 8 9 8
|
||||||
.Ed
|
.Ed
|
||||||
.Pp
|
.Pp
|
||||||
Issue a WRITE BUFFER (0x3B) command to cd1. Write out 10 bytes of data,
|
Issue a WRITE BUFFER (0x3B) command to cd1.
|
||||||
not including the (reserved) 4 byte header. Print out sense information if
|
Write out 10 bytes of data,
|
||||||
the command fails. Be very careful with this command, improper use may
|
not including the (reserved) 4 byte header.
|
||||||
|
Print out sense information if
|
||||||
|
the command fails.
|
||||||
|
Be very careful with this command, improper use may
|
||||||
cause data corruption.
|
cause data corruption.
|
||||||
.Pp
|
.Pp
|
||||||
.Bd -literal -offset indent
|
.Bd -literal -offset indent
|
||||||
@@ -698,7 +789,8 @@ camcontrol modepage da3 -m 1 -e -P 3
|
|||||||
.Ed
|
.Ed
|
||||||
.Pp
|
.Pp
|
||||||
Edit mode page 1 (the Read-Write Error Recover page) for da3, and save the
|
Edit mode page 1 (the Read-Write Error Recover page) for da3, and save the
|
||||||
settings on the drive. Mode page 1 contains a disk drive's auto read and
|
settings on the drive.
|
||||||
|
Mode page 1 contains a disk drive's auto read and
|
||||||
write reallocation settings, among other things.
|
write reallocation settings, among other things.
|
||||||
.Pp
|
.Pp
|
||||||
.Dl camcontrol rescan all
|
.Dl camcontrol rescan all
|
||||||
@@ -729,7 +821,8 @@ Disable tagged queueing for da4.
|
|||||||
camcontrol negotiate -n da -u 3 -R 20.000 -O 15 -a
|
camcontrol negotiate -n da -u 3 -R 20.000 -O 15 -a
|
||||||
.Ed
|
.Ed
|
||||||
.Pp
|
.Pp
|
||||||
Negotiate a sync rate of 20MHz and an offset of 15 with da3. Then send a
|
Negotiate a sync rate of 20MHz and an offset of 15 with da3.
|
||||||
|
Then send a
|
||||||
Test Unit Ready command to make the settings take effect.
|
Test Unit Ready command to make the settings take effect.
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr cam 3 ,
|
.Xr cam 3 ,
|
||||||
@@ -748,7 +841,8 @@ code in the old
|
|||||||
.Xr scsi 8
|
.Xr scsi 8
|
||||||
utility and
|
utility and
|
||||||
.Xr scsi 3
|
.Xr scsi 3
|
||||||
library, written by Julian Elischer and Peter Dufault. The
|
library, written by Julian Elischer and Peter Dufault.
|
||||||
|
The
|
||||||
.Xr scsi 8
|
.Xr scsi 8
|
||||||
program first appeared in
|
program first appeared in
|
||||||
.Bx 386 0.1.2.4 ,
|
.Bx 386 0.1.2.4 ,
|
||||||
@@ -760,7 +854,8 @@ in
|
|||||||
.An Kenneth Merry Aq ken@FreeBSD.org
|
.An Kenneth Merry Aq ken@FreeBSD.org
|
||||||
.Sh BUGS
|
.Sh BUGS
|
||||||
The code that parses the generic command line arguments doesn't know that
|
The code that parses the generic command line arguments doesn't know that
|
||||||
some of the subcommands take multiple arguments. So if, for instance, you
|
some of the subcommands take multiple arguments.
|
||||||
|
So if, for instance, you
|
||||||
tried something like this:
|
tried something like this:
|
||||||
.Bd -literal -offset indent
|
.Bd -literal -offset indent
|
||||||
camcontrol cmd -n da -u 1 -c "00 00 00 00 00 v" 0x00 -v
|
camcontrol cmd -n da -u 1 -c "00 00 00 00 00 v" 0x00 -v
|
||||||
@@ -774,9 +869,11 @@ call in
|
|||||||
bails out when it sees the second argument to
|
bails out when it sees the second argument to
|
||||||
.Fl c
|
.Fl c
|
||||||
(0x00),
|
(0x00),
|
||||||
above. Fixing this behavior would take some gross code, or changes to the
|
above.
|
||||||
|
Fixing this behavior would take some gross code, or changes to the
|
||||||
.Xr getopt 3
|
.Xr getopt 3
|
||||||
interface. The best way to circumvent this problem is to always make sure
|
interface.
|
||||||
|
The best way to circumvent this problem is to always make sure
|
||||||
to specify generic
|
to specify generic
|
||||||
.Nm
|
.Nm
|
||||||
arguments before any command-specific arguments.
|
arguments before any command-specific arguments.
|
||||||
|
|||||||
+40
-20
@@ -62,13 +62,15 @@
|
|||||||
The
|
The
|
||||||
.Nm
|
.Nm
|
||||||
utility is used to dynamically configure and unconfigure concatenated disk
|
utility is used to dynamically configure and unconfigure concatenated disk
|
||||||
devices, or ccds. For more information about the ccd, see
|
devices, or ccds.
|
||||||
|
For more information about the ccd, see
|
||||||
.Xr ccd 4 .
|
.Xr ccd 4 .
|
||||||
.Pp
|
.Pp
|
||||||
The options are as follows:
|
The options are as follows:
|
||||||
.Bl -tag -width indent
|
.Bl -tag -width indent
|
||||||
.It Fl c
|
.It Fl c
|
||||||
Configure a ccd. This is the default behavior of
|
Configure a ccd.
|
||||||
|
This is the default behavior of
|
||||||
.Nm .
|
.Nm .
|
||||||
.It Fl C
|
.It Fl C
|
||||||
Configure all ccd devices listed in the ccd configuration file.
|
Configure all ccd devices listed in the ccd configuration file.
|
||||||
@@ -79,8 +81,10 @@ instead of the default
|
|||||||
.Pa /etc/ccd.conf .
|
.Pa /etc/ccd.conf .
|
||||||
.It Fl g
|
.It Fl g
|
||||||
Dump the current ccd configuration in a format suitable for use as the
|
Dump the current ccd configuration in a format suitable for use as the
|
||||||
ccd configuration file. If no arguments are specified, every configured
|
ccd configuration file.
|
||||||
ccd is dumped. Otherwise, the configuration of each listed ccd is dumped.
|
If no arguments are specified, every configured
|
||||||
|
ccd is dumped.
|
||||||
|
Otherwise, the configuration of each listed ccd is dumped.
|
||||||
.It Fl u
|
.It Fl u
|
||||||
Unconfigure a ccd.
|
Unconfigure a ccd.
|
||||||
.It Fl U
|
.It Fl U
|
||||||
@@ -93,7 +97,8 @@ to be verbose.
|
|||||||
.Pp
|
.Pp
|
||||||
A ccd is described on the command line and in the ccd configuration
|
A ccd is described on the command line and in the ccd configuration
|
||||||
file by the name of the ccd, the interleave factor, the ccd configuration
|
file by the name of the ccd, the interleave factor, the ccd configuration
|
||||||
flags, and a list of one or more devices. The flags may be represented
|
flags, and a list of one or more devices.
|
||||||
|
The flags may be represented
|
||||||
as a decimal number, a hexadecimal number, a comma-separated list
|
as a decimal number, a hexadecimal number, a comma-separated list
|
||||||
of strings, or the word
|
of strings, or the word
|
||||||
.Dq none .
|
.Dq none .
|
||||||
@@ -127,17 +132,22 @@ as shown by
|
|||||||
.Sh EXAMPLES
|
.Sh EXAMPLES
|
||||||
A number of
|
A number of
|
||||||
.Nm
|
.Nm
|
||||||
examples are shown below. The arguments passed
|
examples are shown below.
|
||||||
|
The arguments passed
|
||||||
to
|
to
|
||||||
.Nm
|
.Nm
|
||||||
are exactly the same as you might place in the
|
are exactly the same as you might place in the
|
||||||
.Pa /etc/ccd.conf
|
.Pa /etc/ccd.conf
|
||||||
configuration file. The first example creates a 4-disk stripe out of
|
configuration file.
|
||||||
four scsi disk partitions. The stripe uses a 64 sector interleave.
|
The first example creates a 4-disk stripe out of
|
||||||
|
four scsi disk partitions.
|
||||||
|
The stripe uses a 64 sector interleave.
|
||||||
The second example is an example of a complex stripe/mirror combination.
|
The second example is an example of a complex stripe/mirror combination.
|
||||||
It reads as a two disk stripe of da4 and da5 which is mirrored
|
It reads as a two disk stripe of da4 and da5 which is mirrored
|
||||||
to a two disk stripe of da6 and da7. The last example is a simple
|
to a two disk stripe of da6 and da7.
|
||||||
mirror. The 2nd slice of /dev/da8 is mirrored with the 3rd slice of /dev/da9
|
The last example is a simple
|
||||||
|
mirror.
|
||||||
|
The 2nd slice of /dev/da8 is mirrored with the 3rd slice of /dev/da9
|
||||||
and assigned to ccd0.
|
and assigned to ccd0.
|
||||||
.Pp
|
.Pp
|
||||||
.Bd -unfilled -offset
|
.Bd -unfilled -offset
|
||||||
@@ -150,14 +160,19 @@ When you create a new ccd disk you generally want to
|
|||||||
.Xr fdisk 8
|
.Xr fdisk 8
|
||||||
and
|
and
|
||||||
.Xr disklabel 8
|
.Xr disklabel 8
|
||||||
it before doing anything else. Once you create the initial label you can
|
it before doing anything else.
|
||||||
edit it, adding additional partitions. The label itself takes up the first
|
Once you create the initial label you can
|
||||||
16 sectors of the ccd disk. If all you are doing is creating file systems
|
edit it, adding additional partitions.
|
||||||
|
The label itself takes up the first
|
||||||
|
16 sectors of the ccd disk.
|
||||||
|
If all you are doing is creating file systems
|
||||||
with newfs, you do not have to worry about this as newfs will skip the
|
with newfs, you do not have to worry about this as newfs will skip the
|
||||||
label area. However, if you intend to
|
label area.
|
||||||
|
However, if you intend to
|
||||||
.Xr dd 1
|
.Xr dd 1
|
||||||
to or from a ccd partition it is usually a good idea to construct the
|
to or from a ccd partition it is usually a good idea to construct the
|
||||||
partition such that it does not overlap the label area. For example, if
|
partition such that it does not overlap the label area.
|
||||||
|
For example, if
|
||||||
you have A ccd disk with 10000 sectors you might create a 'd' partition
|
you have A ccd disk with 10000 sectors you might create a 'd' partition
|
||||||
with offset 16 and size 9984.
|
with offset 16 and size 9984.
|
||||||
.Pp
|
.Pp
|
||||||
@@ -173,16 +188,21 @@ the disklabel you
|
|||||||
had created before will still be there and not require reinitialization.
|
had created before will still be there and not require reinitialization.
|
||||||
Beware that changing any ccd parameters: interleave, flags, or the
|
Beware that changing any ccd parameters: interleave, flags, or the
|
||||||
device list making up the ccd disk, will usually destroy any prior
|
device list making up the ccd disk, will usually destroy any prior
|
||||||
data on that ccd disk. If this occurs it is usually a good idea to
|
data on that ccd disk.
|
||||||
|
If this occurs it is usually a good idea to
|
||||||
reinitialize the label before [re]constructing your ccd disk.
|
reinitialize the label before [re]constructing your ccd disk.
|
||||||
.Sh RECOVERY
|
.Sh RECOVERY
|
||||||
An error on a ccd disk is usually unrecoverable unless you are using the
|
An error on a ccd disk is usually unrecoverable unless you are using the
|
||||||
mirroring option. But mirroring has its own perils: It assumes that
|
mirroring option.
|
||||||
both copies of the data at any given sector are the same. This holds true
|
But mirroring has its own perils: It assumes that
|
||||||
|
both copies of the data at any given sector are the same.
|
||||||
|
This holds true
|
||||||
until a write error occurs or until you replace either side of the mirror.
|
until a write error occurs or until you replace either side of the mirror.
|
||||||
This is a poor-man's mirroring implementation. It works well enough that if
|
This is a poor-man's mirroring implementation.
|
||||||
|
It works well enough that if
|
||||||
you begin to get disk errors you should be able to backup the ccd disk,
|
you begin to get disk errors you should be able to backup the ccd disk,
|
||||||
replace the broken hardware, and then regenerate the ccd disk. If you need
|
replace the broken hardware, and then regenerate the ccd disk.
|
||||||
|
If you need
|
||||||
more than this you should look into external hardware RAID SCSI boxes,
|
more than this you should look into external hardware RAID SCSI boxes,
|
||||||
RAID controllers (see GENERIC),
|
RAID controllers (see GENERIC),
|
||||||
or software RAID systems such as
|
or software RAID systems such as
|
||||||
|
|||||||
@@ -60,5 +60,6 @@ dialout devices
|
|||||||
.Sh HISTORY
|
.Sh HISTORY
|
||||||
Originally part of cgd's com package patches, version 0.2.1, to
|
Originally part of cgd's com package patches, version 0.2.1, to
|
||||||
.Bx 386 0.1 .
|
.Bx 386 0.1 .
|
||||||
Once controlled bidirectional capabilities. Little is left to control now
|
Once controlled bidirectional capabilities.
|
||||||
|
Little is left to control now
|
||||||
that these capabilities are standard.
|
that these capabilities are standard.
|
||||||
|
|||||||
@@ -45,7 +45,8 @@ utility prints out the super block and cylinder group information
|
|||||||
for the file system or special device specified, unless
|
for the file system or special device specified, unless
|
||||||
.Fl m
|
.Fl m
|
||||||
is specified.
|
is specified.
|
||||||
The listing is very long and detailed. This
|
The listing is very long and detailed.
|
||||||
|
This
|
||||||
command is useful mostly for finding out certain file system
|
command is useful mostly for finding out certain file system
|
||||||
information such as the file system block size and minimum
|
information such as the file system block size and minimum
|
||||||
free space percentage.
|
free space percentage.
|
||||||
|
|||||||
+1
-1
@@ -267,7 +267,7 @@ it will set up the last BIOS slice to use the whole disk for
|
|||||||
.Fx
|
.Fx
|
||||||
and make it active.
|
and make it active.
|
||||||
.Sh NOTES
|
.Sh NOTES
|
||||||
The automatic calculation of starting cylinder etc. uses
|
The automatic calculation of starting cylinder etc.\& uses
|
||||||
a set of figures that represent what the BIOS thinks the
|
a set of figures that represent what the BIOS thinks the
|
||||||
geometry of the drive is.
|
geometry of the drive is.
|
||||||
These figures are taken from the in-core disklabel by default,
|
These figures are taken from the in-core disklabel by default,
|
||||||
|
|||||||
+45
-23
@@ -24,7 +24,8 @@ Sector 0 of the disk must contain boot code,
|
|||||||
a partition table,
|
a partition table,
|
||||||
and a magic number.
|
and a magic number.
|
||||||
BIOS partitions can be used to break the disk up into several pieces.
|
BIOS partitions can be used to break the disk up into several pieces.
|
||||||
The BIOS brings in sector 0 and verifies the magic number. The sector
|
The BIOS brings in sector 0 and verifies the magic number.
|
||||||
|
The sector
|
||||||
0 boot code then searches the partition table to determine which
|
0 boot code then searches the partition table to determine which
|
||||||
partition is marked
|
partition is marked
|
||||||
.Em active .
|
.Em active .
|
||||||
@@ -42,23 +43,27 @@ utility can be used to divide space on the disk into partitions and set one
|
|||||||
The
|
The
|
||||||
.Fx
|
.Fx
|
||||||
.Nm
|
.Nm
|
||||||
utility serves a similar purpose to the DOS program. The first form is used to
|
utility serves a similar purpose to the DOS program.
|
||||||
|
The first form is used to
|
||||||
display partition information or to interactively edit the partition
|
display partition information or to interactively edit the partition
|
||||||
table. The second is used to write a partition table using a
|
table.
|
||||||
|
The second is used to write a partition table using a
|
||||||
.Ar configfile
|
.Ar configfile
|
||||||
and is designed to be used by other scripts/programs.
|
and is designed to be used by other scripts/programs.
|
||||||
.Pp
|
.Pp
|
||||||
Options are:
|
Options are:
|
||||||
.Bl -tag -width time
|
.Bl -tag -width time
|
||||||
.It Fl a
|
.It Fl a
|
||||||
Change the active partition only. Ignored if
|
Change the active partition only.
|
||||||
|
Ignored if
|
||||||
.Fl f
|
.Fl f
|
||||||
is given.
|
is given.
|
||||||
.It Fl b Ar bootcode
|
.It Fl b Ar bootcode
|
||||||
Get the boot code from the file
|
Get the boot code from the file
|
||||||
.Ar bootcode .
|
.Ar bootcode .
|
||||||
.It Fl B
|
.It Fl B
|
||||||
Reinitialize the boot code contained in sector 0 of the disk. Ignored
|
Reinitialize the boot code contained in sector 0 of the disk.
|
||||||
|
Ignored
|
||||||
if
|
if
|
||||||
.Fl f
|
.Fl f
|
||||||
is given.
|
is given.
|
||||||
@@ -72,11 +77,13 @@ always modifies existing partitions, unless
|
|||||||
is also given, in which case all existing partitions are deleted (marked
|
is also given, in which case all existing partitions are deleted (marked
|
||||||
as "unused") before the
|
as "unused") before the
|
||||||
.Ar configfile
|
.Ar configfile
|
||||||
is read. The
|
is read.
|
||||||
|
The
|
||||||
.Ar configfile
|
.Ar configfile
|
||||||
can be "-", in which case
|
can be "-", in which case
|
||||||
.Ar stdin
|
.Ar stdin
|
||||||
is read. See
|
is read.
|
||||||
|
See
|
||||||
.Sx CONFIGURATION FILE ,
|
.Sx CONFIGURATION FILE ,
|
||||||
below, for file syntax.
|
below, for file syntax.
|
||||||
.Pp
|
.Pp
|
||||||
@@ -84,7 +91,8 @@ below, for file syntax.
|
|||||||
when
|
when
|
||||||
.Fl f
|
.Fl f
|
||||||
is used, you are not asked if you really want to write the partition
|
is used, you are not asked if you really want to write the partition
|
||||||
table (as you are in the interactive mode). Use with caution!
|
table (as you are in the interactive mode).
|
||||||
|
Use with caution!
|
||||||
.\" !PC98
|
.\" !PC98
|
||||||
.\" .It Fl i
|
.\" .It Fl i
|
||||||
.\" Initialize sector 0 of the disk. This implies
|
.\" Initialize sector 0 of the disk. This implies
|
||||||
@@ -100,22 +108,27 @@ table (as you are in the interactive mode). Use with caution!
|
|||||||
.It Fl s
|
.It Fl s
|
||||||
Print summary information and exit.
|
Print summary information and exit.
|
||||||
.It Fl t
|
.It Fl t
|
||||||
Test mode; do not write partition values. Generally used with the
|
Test mode; do not write partition values.
|
||||||
|
Generally used with the
|
||||||
.Fl f
|
.Fl f
|
||||||
option to see what would be written to the partition table. Implies
|
option to see what would be written to the partition table.
|
||||||
|
Implies
|
||||||
.Fl v .
|
.Fl v .
|
||||||
.It Fl u
|
.It Fl u
|
||||||
Is used for updating (editing) sector 0 of the disk. Ignored if
|
Is used for updating (editing) sector 0 of the disk.
|
||||||
|
Ignored if
|
||||||
.Fl f
|
.Fl f
|
||||||
is given.
|
is given.
|
||||||
.It Fl v
|
.It Fl v
|
||||||
Be verbose. When
|
Be verbose.
|
||||||
|
When
|
||||||
.Fl f
|
.Fl f
|
||||||
is used,
|
is used,
|
||||||
.Nm
|
.Nm
|
||||||
prints out the partition table that is written to the disk.
|
prints out the partition table that is written to the disk.
|
||||||
.It Fl 12345678
|
.It Fl 12345678
|
||||||
Operate on a single fdisk entry only. Ignored if
|
Operate on a single fdisk entry only.
|
||||||
|
Ignored if
|
||||||
.Fl f
|
.Fl f
|
||||||
is given.
|
is given.
|
||||||
.El
|
.El
|
||||||
@@ -219,7 +232,8 @@ The flags
|
|||||||
.Fl u
|
.Fl u
|
||||||
are used to indicate that the partition data is to be updated, unless the
|
are used to indicate that the partition data is to be updated, unless the
|
||||||
.Fl f
|
.Fl f
|
||||||
option is used. If the
|
option is used.
|
||||||
|
If the
|
||||||
.Fl f
|
.Fl f
|
||||||
option is not used, the
|
option is not used, the
|
||||||
.Nm
|
.Nm
|
||||||
@@ -275,7 +289,7 @@ it will setup the last BIOS partition to use the whole disk for
|
|||||||
.Fx ;
|
.Fx ;
|
||||||
and make it active.
|
and make it active.
|
||||||
.Sh NOTES
|
.Sh NOTES
|
||||||
The automatic calculation of starting cylinder etc. uses
|
The automatic calculation of starting cylinder etc.\& uses
|
||||||
a set of figures that represent what the BIOS thinks is the
|
a set of figures that represent what the BIOS thinks is the
|
||||||
geometry of the drive.
|
geometry of the drive.
|
||||||
These figures are by default taken from the incore disklabel,
|
These figures are by default taken from the incore disklabel,
|
||||||
@@ -294,8 +308,10 @@ Editing an existing partition will most likely cause you to
|
|||||||
lose all the data in that partition.
|
lose all the data in that partition.
|
||||||
.Pp
|
.Pp
|
||||||
You should run this program interactively once or twice to see how it
|
You should run this program interactively once or twice to see how it
|
||||||
works. This is completely safe as long as you answer the last question
|
works.
|
||||||
in the negative. There are subtleties that the program detects that are
|
This is completely safe as long as you answer the last question
|
||||||
|
in the negative.
|
||||||
|
There are subtleties that the program detects that are
|
||||||
not fully explained in this manual page.
|
not fully explained in this manual page.
|
||||||
.Sh CONFIGURATION FILE
|
.Sh CONFIGURATION FILE
|
||||||
When the
|
When the
|
||||||
@@ -303,7 +319,8 @@ When the
|
|||||||
option is given, a disk's partition table can be written using values
|
option is given, a disk's partition table can be written using values
|
||||||
from a
|
from a
|
||||||
.Ar configfile .
|
.Ar configfile .
|
||||||
The syntax of this file is very simple. Each line is either a comment or
|
The syntax of this file is very simple.
|
||||||
|
Each line is either a comment or
|
||||||
a specification, and whitespace (except for newlines) are ignored:
|
a specification, and whitespace (except for newlines) are ignored:
|
||||||
.Bl -tag -width Ds
|
.Bl -tag -width Ds
|
||||||
.It Xo
|
.It Xo
|
||||||
@@ -317,7 +334,8 @@ Lines beginning with a "#" are comments and are ignored.
|
|||||||
.Ar spec2
|
.Ar spec2
|
||||||
.Ar spec3
|
.Ar spec3
|
||||||
.Xc
|
.Xc
|
||||||
Set the BIOS geometry used in partition calculations. There must be
|
Set the BIOS geometry used in partition calculations.
|
||||||
|
There must be
|
||||||
three values specified, with a letter preceding each number:
|
three values specified, with a letter preceding each number:
|
||||||
.Bl -tag -width Ds
|
.Bl -tag -width Ds
|
||||||
.Sm off
|
.Sm off
|
||||||
@@ -351,7 +369,8 @@ It is an error if the following is not true:
|
|||||||
.Ed
|
.Ed
|
||||||
.Pp
|
.Pp
|
||||||
The number of cylinders should be less than or equal to 1024, but this
|
The number of cylinders should be less than or equal to 1024, but this
|
||||||
is not enforced, although a warning will be output. Note that bootable
|
is not enforced, although a warning will be output.
|
||||||
|
Note that bootable
|
||||||
.Fx
|
.Fx
|
||||||
partitions (the "/" file system) must lie completely within the
|
partitions (the "/" file system) must lie completely within the
|
||||||
first 1024 cylinders; if this is not true, booting may fail.
|
first 1024 cylinders; if this is not true, booting may fail.
|
||||||
@@ -387,7 +406,8 @@ However, if an invalid partition table is present, or the
|
|||||||
.Fl i
|
.Fl i
|
||||||
option is specified, all existing partition entries will be cleared
|
option is specified, all existing partition entries will be cleared
|
||||||
(marked as unused), and these "p" lines will have to be used to
|
(marked as unused), and these "p" lines will have to be used to
|
||||||
explicitly set partition information. If multiple partitions need to be
|
explicitly set partition information.
|
||||||
|
If multiple partitions need to be
|
||||||
set, multiple "p" lines must be specified; one for each partition.
|
set, multiple "p" lines must be specified; one for each partition.
|
||||||
.Pp
|
.Pp
|
||||||
These partition lines must occur after any geometry specification lines,
|
These partition lines must occur after any geometry specification lines,
|
||||||
@@ -397,7 +417,8 @@ The
|
|||||||
.Ar type
|
.Ar type
|
||||||
is 165 for
|
is 165 for
|
||||||
.Fx
|
.Fx
|
||||||
partitions. Specifying a partition type of zero is
|
partitions.
|
||||||
|
Specifying a partition type of zero is
|
||||||
the same as clearing the partition and marking it as unused; however,
|
the same as clearing the partition and marking it as unused; however,
|
||||||
dummy values (such as "0") must still be specified for
|
dummy values (such as "0") must still be specified for
|
||||||
.Ar start
|
.Ar start
|
||||||
@@ -427,7 +448,8 @@ p 1 165 1 2503871
|
|||||||
.Xc
|
.Xc
|
||||||
Make
|
Make
|
||||||
.Ar partition
|
.Ar partition
|
||||||
the active partition. Can occur anywhere in the config file, but only
|
the active partition.
|
||||||
|
Can occur anywhere in the config file, but only
|
||||||
one must be present.
|
one must be present.
|
||||||
.Pp
|
.Pp
|
||||||
Example: to make partition 1 the active partition:
|
Example: to make partition 1 the active partition:
|
||||||
|
|||||||
+5
-2
@@ -112,7 +112,9 @@ to be the partition and slice designators.
|
|||||||
The options are as follows:
|
The options are as follows:
|
||||||
.Bl -tag -width indent
|
.Bl -tag -width indent
|
||||||
.It Fl d
|
.It Fl d
|
||||||
Debugging mode. Just print the commands without executing them. Available
|
Debugging mode.
|
||||||
|
Just print the commands without executing them.
|
||||||
|
Available
|
||||||
only if
|
only if
|
||||||
.Nm
|
.Nm
|
||||||
is compiled to support it.
|
is compiled to support it.
|
||||||
@@ -164,7 +166,8 @@ only one file system at a time will be checked.
|
|||||||
.It Fl t Ar fstype
|
.It Fl t Ar fstype
|
||||||
Invoke
|
Invoke
|
||||||
.Nm
|
.Nm
|
||||||
only for the comma separated list of file system types. If the
|
only for the comma separated list of file system types.
|
||||||
|
If the
|
||||||
list starts with
|
list starts with
|
||||||
.Dq no
|
.Dq no
|
||||||
then invoke
|
then invoke
|
||||||
|
|||||||
@@ -83,7 +83,8 @@ option will correct; if it encounters other inconsistencies, it exits
|
|||||||
with an abnormal return status and an automatic reboot will then fail.
|
with an abnormal return status and an automatic reboot will then fail.
|
||||||
For each corrected inconsistency one or more lines will be printed
|
For each corrected inconsistency one or more lines will be printed
|
||||||
identifying the file system on which the correction will take place,
|
identifying the file system on which the correction will take place,
|
||||||
and the nature of the correction. After successfully correcting a file system,
|
and the nature of the correction.
|
||||||
|
After successfully correcting a file system,
|
||||||
.Nm
|
.Nm
|
||||||
will print the number of files on that file system,
|
will print the number of files on that file system,
|
||||||
the number of used and free blocks,
|
the number of used and free blocks,
|
||||||
@@ -171,7 +172,8 @@ the file system is marked as needing a foreground check and
|
|||||||
exits without attempting any further cleaning.
|
exits without attempting any further cleaning.
|
||||||
.It Fl b
|
.It Fl b
|
||||||
Use the block specified immediately after the flag as
|
Use the block specified immediately after the flag as
|
||||||
the super block for the file system. Block 32 is usually
|
the super block for the file system.
|
||||||
|
Block 32 is usually
|
||||||
an alternate super block.
|
an alternate super block.
|
||||||
.It Fl c
|
.It Fl c
|
||||||
Convert the file system to the specified level.
|
Convert the file system to the specified level.
|
||||||
|
|||||||
+18
-9
@@ -46,12 +46,14 @@ The
|
|||||||
utility opens
|
utility opens
|
||||||
.Ar fsname
|
.Ar fsname
|
||||||
(usually a raw disk partition) and runs a command loop
|
(usually a raw disk partition) and runs a command loop
|
||||||
allowing manipulation of the file system's inode data. You are prompted
|
allowing manipulation of the file system's inode data.
|
||||||
|
You are prompted
|
||||||
to enter a command with
|
to enter a command with
|
||||||
.Ic "fsdb (inum X)>"
|
.Ic "fsdb (inum X)>"
|
||||||
where
|
where
|
||||||
.Va X
|
.Va X
|
||||||
is the currently selected i-number. The initial selected inode is the
|
is the currently selected i-number.
|
||||||
|
The initial selected inode is the
|
||||||
root of the file system (i-number 2).
|
root of the file system (i-number 2).
|
||||||
The command processor uses the
|
The command processor uses the
|
||||||
.Xr editline 3
|
.Xr editline 3
|
||||||
@@ -101,7 +103,8 @@ Find
|
|||||||
in the current directory and make its inode the current inode.
|
in the current directory and make its inode the current inode.
|
||||||
.Ar Name
|
.Ar Name
|
||||||
may be a multi-component name or may begin with slash to indicate that
|
may be a multi-component name or may begin with slash to indicate that
|
||||||
the root inode should be used to start the lookup. If some component
|
the root inode should be used to start the lookup.
|
||||||
|
If some component
|
||||||
along the pathname is not found, the last valid directory encountered is
|
along the pathname is not found, the last valid directory encountered is
|
||||||
left as the active inode.
|
left as the active inode.
|
||||||
This command is valid only if the starting inode is a directory.
|
This command is valid only if the starting inode is a directory.
|
||||||
@@ -125,14 +128,16 @@ Set the active inode's link count to
|
|||||||
.Ar number .
|
.Ar number .
|
||||||
.Pp
|
.Pp
|
||||||
.It Cm ls
|
.It Cm ls
|
||||||
List the current inode's directory entries. This command is valid only
|
List the current inode's directory entries.
|
||||||
|
This command is valid only
|
||||||
if the current inode is a directory.
|
if the current inode is a directory.
|
||||||
.Pp
|
.Pp
|
||||||
.It Cm rm Ar name
|
.It Cm rm Ar name
|
||||||
.It Cm del Ar name
|
.It Cm del Ar name
|
||||||
Remove the entry
|
Remove the entry
|
||||||
.Ar name
|
.Ar name
|
||||||
from the current directory inode. This command is valid only
|
from the current directory inode.
|
||||||
|
This command is valid only
|
||||||
if the current inode is a directory.
|
if the current inode is a directory.
|
||||||
.Pp
|
.Pp
|
||||||
.It Cm ln Ar ino Ar name
|
.It Cm ln Ar ino Ar name
|
||||||
@@ -140,7 +145,8 @@ Create a link to inode
|
|||||||
.Ar ino
|
.Ar ino
|
||||||
under the name
|
under the name
|
||||||
.Ar name
|
.Ar name
|
||||||
in the current directory inode. This command is valid only
|
in the current directory inode.
|
||||||
|
This command is valid only
|
||||||
if the current inode is a directory.
|
if the current inode is a directory.
|
||||||
.Pp
|
.Pp
|
||||||
.It Cm chinum Ar dirslot Ar inum
|
.It Cm chinum Ar dirslot Ar inum
|
||||||
@@ -154,7 +160,8 @@ Change the name in directory entry
|
|||||||
.Ar dirslot
|
.Ar dirslot
|
||||||
to
|
to
|
||||||
.Ar name .
|
.Ar name .
|
||||||
This command cannot expand a directory entry. You can only rename an
|
This command cannot expand a directory entry.
|
||||||
|
You can only rename an
|
||||||
entry if the name will fit into the existing directory slot.
|
entry if the name will fit into the existing directory slot.
|
||||||
.Pp
|
.Pp
|
||||||
.It Cm chtype Ar type
|
.It Cm chtype Ar type
|
||||||
@@ -202,7 +209,8 @@ should be in the format
|
|||||||
.Em YYYYMMDDHHMMSS[.nsec]
|
.Em YYYYMMDDHHMMSS[.nsec]
|
||||||
where
|
where
|
||||||
.Em nsec
|
.Em nsec
|
||||||
is an optional nanosecond specification. If no nanoseconds are specified, the
|
is an optional nanosecond specification.
|
||||||
|
If no nanoseconds are specified, the
|
||||||
.Va mtimensec ,
|
.Va mtimensec ,
|
||||||
.Va ctimensec ,
|
.Va ctimensec ,
|
||||||
or
|
or
|
||||||
@@ -231,7 +239,8 @@ The
|
|||||||
.Nm
|
.Nm
|
||||||
utility uses the source code for
|
utility uses the source code for
|
||||||
.Xr fsck 8
|
.Xr fsck 8
|
||||||
to implement most of the file system manipulation code. The remainder of
|
to implement most of the file system manipulation code.
|
||||||
|
The remainder of
|
||||||
.Nm
|
.Nm
|
||||||
first appeared in
|
first appeared in
|
||||||
.Nx ,
|
.Nx ,
|
||||||
|
|||||||
@@ -58,7 +58,8 @@ now does the equivalent of
|
|||||||
itself so it is no longer necessary to
|
itself so it is no longer necessary to
|
||||||
run
|
run
|
||||||
.Nm
|
.Nm
|
||||||
by hand on a new file system. It is only used to
|
by hand on a new file system.
|
||||||
|
It is only used to
|
||||||
re-randomize or report on an existing file system.
|
re-randomize or report on an existing file system.
|
||||||
.Pp
|
.Pp
|
||||||
The
|
The
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ The link-level
|
|||||||
address
|
address
|
||||||
is specified as a series of colon-separated hex digits.
|
is specified as a series of colon-separated hex digits.
|
||||||
This can be used to
|
This can be used to
|
||||||
e.g. set a new MAC address on an ethernet interface, though the
|
e.g.\& set a new MAC address on an ethernet interface, though the
|
||||||
mechanism used is not ethernet-specific.
|
mechanism used is not ethernet-specific.
|
||||||
If the interface is already
|
If the interface is already
|
||||||
up when this option is used, it will be briefly brought down and
|
up when this option is used, it will be briefly brought down and
|
||||||
|
|||||||
+7
-4
@@ -121,7 +121,8 @@ but also inhibits running
|
|||||||
while the system is multi-user.
|
while the system is multi-user.
|
||||||
.Pp
|
.Pp
|
||||||
In addition, kernel time changes are restricted to less than or equal to one
|
In addition, kernel time changes are restricted to less than or equal to one
|
||||||
second. Attempts to change the time by more than this will log the message
|
second.
|
||||||
|
Attempts to change the time by more than this will log the message
|
||||||
.Dq Time adjustment clamped to +1 second .
|
.Dq Time adjustment clamped to +1 second .
|
||||||
.It Ic 3
|
.It Ic 3
|
||||||
Network secure mode \- same as highly secure mode, plus
|
Network secure mode \- same as highly secure mode, plus
|
||||||
@@ -189,7 +190,8 @@ program.
|
|||||||
The
|
The
|
||||||
.Nm login
|
.Nm login
|
||||||
program, when a valid user logs in,
|
program, when a valid user logs in,
|
||||||
executes a shell for that user. When this shell
|
executes a shell for that user.
|
||||||
|
When this shell
|
||||||
dies, either because the user logged out
|
dies, either because the user logged out
|
||||||
or an abnormal termination occurred (a signal),
|
or an abnormal termination occurred (a signal),
|
||||||
the
|
the
|
||||||
@@ -330,7 +332,7 @@ If run as a user process as shown in the second synopsis line,
|
|||||||
.Nm
|
.Nm
|
||||||
will emulate
|
will emulate
|
||||||
.At V
|
.At V
|
||||||
behavior, i.e. super-user can specify the desired
|
behavior, i.e., super-user can specify the desired
|
||||||
.Em run-level
|
.Em run-level
|
||||||
on a command line, and
|
on a command line, and
|
||||||
.Nm
|
.Nm
|
||||||
@@ -413,7 +415,8 @@ behave as though they have security level \-1.
|
|||||||
Setting the security level above 1 too early in the boot sequence can
|
Setting the security level above 1 too early in the boot sequence can
|
||||||
prevent
|
prevent
|
||||||
.Xr fsck 8
|
.Xr fsck 8
|
||||||
from repairing inconsistent file systems. The
|
from repairing inconsistent file systems.
|
||||||
|
The
|
||||||
preferred location to set the security level is at the end of
|
preferred location to set the security level is at the end of
|
||||||
.Pa /etc/rc
|
.Pa /etc/rc
|
||||||
after all multi-user startup actions are complete.
|
after all multi-user startup actions are complete.
|
||||||
|
|||||||
+18
-11
@@ -112,7 +112,7 @@ name search is performed.
|
|||||||
Care should be taken with this in environments where not all
|
Care should be taken with this in environments where not all
|
||||||
file systems are mounted (yet) by the time
|
file systems are mounted (yet) by the time
|
||||||
.Nm
|
.Nm
|
||||||
is being run (e.g. when they are mounted over NFS).
|
is being run (e.g.\& when they are mounted over NFS).
|
||||||
Once
|
Once
|
||||||
.Fl p
|
.Fl p
|
||||||
has been specified, optional
|
has been specified, optional
|
||||||
@@ -175,7 +175,8 @@ needs.
|
|||||||
The following options are available:
|
The following options are available:
|
||||||
.Bl -tag -width flag
|
.Bl -tag -width flag
|
||||||
.It Fl a
|
.It Fl a
|
||||||
While listing, show counter values. See also
|
While listing, show counter values.
|
||||||
|
See also
|
||||||
.Dq show
|
.Dq show
|
||||||
command.
|
command.
|
||||||
.It Fl f
|
.It Fl f
|
||||||
@@ -189,11 +190,14 @@ without actually passing them into the kernel.
|
|||||||
.It Fl q
|
.It Fl q
|
||||||
While adding, zeroing or flushing, be quiet about actions (implies '-f').
|
While adding, zeroing or flushing, be quiet about actions (implies '-f').
|
||||||
This is useful for adjusting rules by executing multiple ip6fw commands in a
|
This is useful for adjusting rules by executing multiple ip6fw commands in a
|
||||||
script (e.g. sh /etc/rc.firewall), or by processing a file of many ip6fw rules,
|
script (e.g.\& sh /etc/rc.firewall), or by processing a file of many ip6fw rules,
|
||||||
across a remote login session. If a flush is performed in normal
|
across a remote login session.
|
||||||
(verbose) mode, it prints a message. Because all rules are flushed, the
|
If a flush is performed in normal
|
||||||
|
(verbose) mode, it prints a message.
|
||||||
|
Because all rules are flushed, the
|
||||||
message cannot be delivered to the login session, the login session is
|
message cannot be delivered to the login session, the login session is
|
||||||
closed and the remainder of the ruleset is not processed. Access to the
|
closed and the remainder of the ruleset is not processed.
|
||||||
|
Access to the
|
||||||
console is required to recover.
|
console is required to recover.
|
||||||
.It Fl t
|
.It Fl t
|
||||||
While listing, show last match timestamp.
|
While listing, show last match timestamp.
|
||||||
@@ -257,7 +261,8 @@ then when a packet matches a rule with the
|
|||||||
.Dq log
|
.Dq log
|
||||||
keyword or a clear/resetlog is performed, a message will be logged to
|
keyword or a clear/resetlog is performed, a message will be logged to
|
||||||
.Xr syslogd 8 ,
|
.Xr syslogd 8 ,
|
||||||
or, if that fails, to the console. If the kernel was compiled with the
|
or, if that fails, to the console.
|
||||||
|
If the kernel was compiled with the
|
||||||
.Dv IPV6FIREWALL_VERBOSE_LIMIT
|
.Dv IPV6FIREWALL_VERBOSE_LIMIT
|
||||||
option, then logging will cease after the number of packets
|
option, then logging will cease after the number of packets
|
||||||
specified by the option are received for that particular
|
specified by the option are received for that particular
|
||||||
@@ -335,9 +340,10 @@ and the length of the port list is limited to
|
|||||||
.In netinet6/ip6_fw.h )
|
.In netinet6/ip6_fw.h )
|
||||||
ports.
|
ports.
|
||||||
.Pp
|
.Pp
|
||||||
Fragmented packets which have a non-zero offset (i.e. not the first
|
Fragmented packets which have a non-zero offset (i.e., not the first
|
||||||
fragment) will never match a rule which has one or more port
|
fragment) will never match a rule which has one or more port
|
||||||
specifications. See the
|
specifications.
|
||||||
|
See the
|
||||||
.Ar frag
|
.Ar frag
|
||||||
option for details on matching fragmented packets.
|
option for details on matching fragmented packets.
|
||||||
.Pp
|
.Pp
|
||||||
@@ -405,7 +411,7 @@ or
|
|||||||
is invalid.
|
is invalid.
|
||||||
.Pp
|
.Pp
|
||||||
A packet may not have a receive or transmit interface: packets originating
|
A packet may not have a receive or transmit interface: packets originating
|
||||||
from the local host have no receive interface. while packets destined for
|
from the local host have no receive interface, while packets destined for
|
||||||
the local host have no transmit interface.
|
the local host have no transmit interface.
|
||||||
.Pp
|
.Pp
|
||||||
Additional
|
Additional
|
||||||
@@ -469,7 +475,8 @@ with a
|
|||||||
A rule which contains a
|
A rule which contains a
|
||||||
.Ar tcpflags
|
.Ar tcpflags
|
||||||
specification can never match a fragmented packet which has
|
specification can never match a fragmented packet which has
|
||||||
a non-zero offset. See the
|
a non-zero offset.
|
||||||
|
See the
|
||||||
.Ar frag
|
.Ar frag
|
||||||
option for details on matching fragmented packets.
|
option for details on matching fragmented packets.
|
||||||
.It icmptypes Ar types
|
.It icmptypes Ar types
|
||||||
|
|||||||
+56
-38
@@ -151,7 +151,7 @@ option, then
|
|||||||
.Nm
|
.Nm
|
||||||
assumes a
|
assumes a
|
||||||
.Em stateful
|
.Em stateful
|
||||||
behaviour, i.e. upon a match it will create dynamic rules matching
|
behaviour, i.e., upon a match it will create dynamic rules matching
|
||||||
the exact parameters (addresses and ports) of the matching packet.
|
the exact parameters (addresses and ports) of the matching packet.
|
||||||
.Pp
|
.Pp
|
||||||
These dynamic rules, which have a limited lifetime, are checked
|
These dynamic rules, which have a limited lifetime, are checked
|
||||||
@@ -200,7 +200,8 @@ Also, each rule belongs to one of 32 different
|
|||||||
.Nm
|
.Nm
|
||||||
commands to atomically manipulate sets, such as enable,
|
commands to atomically manipulate sets, such as enable,
|
||||||
disable, swap sets, move all rules in a set to another
|
disable, swap sets, move all rules in a set to another
|
||||||
one, delete all rules in a set. These can be useful to
|
one, delete all rules in a set.
|
||||||
|
These can be useful to
|
||||||
install temporary configurations, or to test them.
|
install temporary configurations, or to test them.
|
||||||
See Section
|
See Section
|
||||||
.Sx SETS OF RULES
|
.Sx SETS OF RULES
|
||||||
@@ -220,7 +221,7 @@ Implies
|
|||||||
.Fl c .
|
.Fl c .
|
||||||
.It Fl c
|
.It Fl c
|
||||||
When entering or showing rules, print them in compact form,
|
When entering or showing rules, print them in compact form,
|
||||||
i.e. without the optional "ip from any to any" string
|
i.e., without the optional "ip from any to any" string
|
||||||
when this does not carry any additional information.
|
when this does not carry any additional information.
|
||||||
.It Fl d
|
.It Fl d
|
||||||
While listing, show dynamic rules in addition to static ones.
|
While listing, show dynamic rules in addition to static ones.
|
||||||
@@ -310,7 +311,7 @@ name search is performed.
|
|||||||
Care should be taken with this in environments where not all
|
Care should be taken with this in environments where not all
|
||||||
file systems are mounted (yet) by the time
|
file systems are mounted (yet) by the time
|
||||||
.Nm
|
.Nm
|
||||||
is being run (e.g. when they are mounted over NFS).
|
is being run (e.g.\& when they are mounted over NFS).
|
||||||
Once
|
Once
|
||||||
.Fl p
|
.Fl p
|
||||||
has been specified, any additional arguments as passed on to the preprocessor
|
has been specified, any additional arguments as passed on to the preprocessor
|
||||||
@@ -330,8 +331,10 @@ Section below.
|
|||||||
.Pp
|
.Pp
|
||||||
If the world and the kernel get out of sync the
|
If the world and the kernel get out of sync the
|
||||||
.Nm
|
.Nm
|
||||||
ABI may break, preventing you from being able to add any rules. This can
|
ABI may break, preventing you from being able to add any rules.
|
||||||
adversely effect the booting process. You can use
|
This can
|
||||||
|
adversely effect the booting process.
|
||||||
|
You can use
|
||||||
.Nm
|
.Nm
|
||||||
.Cm disable
|
.Cm disable
|
||||||
.Cm firewall
|
.Cm firewall
|
||||||
@@ -377,7 +380,7 @@ is invoked from
|
|||||||
Also note that each packet is always checked against the complete ruleset,
|
Also note that each packet is always checked against the complete ruleset,
|
||||||
irrespective of the place where the check occurs, or the source of the packet.
|
irrespective of the place where the check occurs, or the source of the packet.
|
||||||
If a rule contains some match patterns or actions which are not valid
|
If a rule contains some match patterns or actions which are not valid
|
||||||
for the place of invocation (e.g. trying to match a MAC header within
|
for the place of invocation (e.g.\& trying to match a MAC header within
|
||||||
.Cm ip_input()
|
.Cm ip_input()
|
||||||
), the match pattern will not match, but a
|
), the match pattern will not match, but a
|
||||||
.Cm not
|
.Cm not
|
||||||
@@ -407,16 +410,18 @@ ether_demux and bdg_forward).
|
|||||||
.Sh SYNTAX
|
.Sh SYNTAX
|
||||||
In general, each keyword or argument must be provided as
|
In general, each keyword or argument must be provided as
|
||||||
a separate command line argument, with no leading or trailing
|
a separate command line argument, with no leading or trailing
|
||||||
spaces. Keywords are case-sensitive, whereas arguments may
|
spaces.
|
||||||
|
Keywords are case-sensitive, whereas arguments may
|
||||||
or may not be case-sensitive depending on their nature
|
or may not be case-sensitive depending on their nature
|
||||||
(e.g. uid's are, hostnames are not).
|
(e.g.\& uid's are, hostnames are not).
|
||||||
.Pp
|
.Pp
|
||||||
In
|
In
|
||||||
.Nm ipfw2
|
.Nm ipfw2
|
||||||
you can introduce spaces after commas ',' to make
|
you can introduce spaces after commas ',' to make
|
||||||
the line more readable. You can also put the entire
|
the line more readable.
|
||||||
|
You can also put the entire
|
||||||
command (including flags) into a single argument.
|
command (including flags) into a single argument.
|
||||||
E.g. the following forms are equivalent:
|
E.g., the following forms are equivalent:
|
||||||
.Bd -literal -offset indent
|
.Bd -literal -offset indent
|
||||||
ipfw -q add deny src-ip 10.0.0.0/24,127.0.0.1/8
|
ipfw -q add deny src-ip 10.0.0.0/24,127.0.0.1/8
|
||||||
ipfw -q add deny src-ip 10.0.0.0/24, 127.0.0.1/8
|
ipfw -q add deny src-ip 10.0.0.0/24, 127.0.0.1/8
|
||||||
@@ -466,7 +471,7 @@ for ICMP packets
|
|||||||
When the packet can be associated with a local socket.
|
When the packet can be associated with a local socket.
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
Note that some of the above information, e.g. source MAC or IP addresses and
|
Note that some of the above information, e.g.\& source MAC or IP addresses and
|
||||||
TCP/UDP ports, could easily be spoofed, so filtering on those fields
|
TCP/UDP ports, could easily be spoofed, so filtering on those fields
|
||||||
alone might not guarantee the desired results.
|
alone might not guarantee the desired results.
|
||||||
.Bl -tag -width indent
|
.Bl -tag -width indent
|
||||||
@@ -489,7 +494,7 @@ Automatic rule numbers are assigned by incrementing the last
|
|||||||
non-default rule number by the value of the sysctl variable
|
non-default rule number by the value of the sysctl variable
|
||||||
.Ar net.inet.ip.fw.autoinc_step
|
.Ar net.inet.ip.fw.autoinc_step
|
||||||
which defaults to 100.
|
which defaults to 100.
|
||||||
If this is not possible (e.g. because we would go beyond the
|
If this is not possible (e.g.\& because we would go beyond the
|
||||||
maximum allowed rule number), the number of the last
|
maximum allowed rule number), the number of the last
|
||||||
non-default value is used instead.
|
non-default value is used instead.
|
||||||
.It Cm set Ar set_number
|
.It Cm set Ar set_number
|
||||||
@@ -693,7 +698,7 @@ protocol options, incoming or outgoing interfaces, etc.)
|
|||||||
that the packet must match in order to be recognised.
|
that the packet must match in order to be recognised.
|
||||||
In general, the patterns are connected by (implicit)
|
In general, the patterns are connected by (implicit)
|
||||||
.Cm and
|
.Cm and
|
||||||
operators -- i.e. all must match in order for the
|
operators -- i.e., all must match in order for the
|
||||||
rule to match.
|
rule to match.
|
||||||
Individual patterns can be prefixed by the
|
Individual patterns can be prefixed by the
|
||||||
.Cm not
|
.Cm not
|
||||||
@@ -813,7 +818,8 @@ specified as a dotted quad.
|
|||||||
As an example, 1.2.3.4:255.0.255.0 will match
|
As an example, 1.2.3.4:255.0.255.0 will match
|
||||||
1.*.3.*.
|
1.*.3.*.
|
||||||
This form is advised only for non-contiguous
|
This form is advised only for non-contiguous
|
||||||
masks. It is better to resort to the
|
masks.
|
||||||
|
It is better to resort to the
|
||||||
.Ar addr Ns / Ns Ar masklen
|
.Ar addr Ns / Ns Ar masklen
|
||||||
format for contiguous masks, which is more compact and less
|
format for contiguous masks, which is more compact and less
|
||||||
error-prone.
|
error-prone.
|
||||||
@@ -831,11 +837,13 @@ or ranges.
|
|||||||
The
|
The
|
||||||
.Ar masklen
|
.Ar masklen
|
||||||
field is used to limit the size of the set of addresses,
|
field is used to limit the size of the set of addresses,
|
||||||
and can have any value between 24 and 32. If not specified,
|
and can have any value between 24 and 32.
|
||||||
|
If not specified,
|
||||||
it will be assumed as 24.
|
it will be assumed as 24.
|
||||||
.br
|
.br
|
||||||
This format is particularly useful to handle sparse address sets
|
This format is particularly useful to handle sparse address sets
|
||||||
within a single rule. Because the matching occurs using a
|
within a single rule.
|
||||||
|
Because the matching occurs using a
|
||||||
bitmask, it takes constant time and dramatically reduces
|
bitmask, it takes constant time and dramatically reduces
|
||||||
the complexity of rulesets.
|
the complexity of rulesets.
|
||||||
.br
|
.br
|
||||||
@@ -874,7 +882,7 @@ character).
|
|||||||
.Pp
|
.Pp
|
||||||
.Dl "ipfw add count tcp from any ftp\e\e-data-ftp to any"
|
.Dl "ipfw add count tcp from any ftp\e\e-data-ftp to any"
|
||||||
.Pp
|
.Pp
|
||||||
Fragmented packets which have a non-zero offset (i.e. not the first
|
Fragmented packets which have a non-zero offset (i.e., not the first
|
||||||
fragment) will never match a rule which has one or more port
|
fragment) will never match a rule which has one or more port
|
||||||
specifications.
|
specifications.
|
||||||
See the
|
See the
|
||||||
@@ -883,7 +891,8 @@ option for details on matching fragmented packets.
|
|||||||
.El
|
.El
|
||||||
.Ss RULE OPTIONS (MATCH PATTERNS)
|
.Ss RULE OPTIONS (MATCH PATTERNS)
|
||||||
Additional match patterns can be used within
|
Additional match patterns can be used within
|
||||||
rules. Zero or more of these so-called
|
rules.
|
||||||
|
Zero or more of these so-called
|
||||||
.Em options
|
.Em options
|
||||||
can be present in a rule, optionally prefixed by the
|
can be present in a rule, optionally prefixed by the
|
||||||
.Cm not
|
.Cm not
|
||||||
@@ -910,8 +919,9 @@ specified as argument.
|
|||||||
Matches TCP packets that have the RST or ACK bits set.
|
Matches TCP packets that have the RST or ACK bits set.
|
||||||
.It Cm frag
|
.It Cm frag
|
||||||
Matches packets that are fragments and not the first
|
Matches packets that are fragments and not the first
|
||||||
fragment of an IP datagram. Note that these packets will not have
|
fragment of an IP datagram.
|
||||||
the next protocol header (e.g. TCP, UDP) so options that look into
|
Note that these packets will not have
|
||||||
|
the next protocol header (e.g.\& TCP, UDP) so options that look into
|
||||||
these headers cannot match.
|
these headers cannot match.
|
||||||
.It Cm gid Ar group
|
.It Cm gid Ar group
|
||||||
Matches all TCP or UDP packets sent by or received for a
|
Matches all TCP or UDP packets sent by or received for a
|
||||||
@@ -978,7 +988,7 @@ specified in the same way as
|
|||||||
Matches IP packets whose total length, including header and data, is
|
Matches IP packets whose total length, including header and data, is
|
||||||
in the set
|
in the set
|
||||||
.Ar len-list ,
|
.Ar len-list ,
|
||||||
which is either a single value or a list of values or ranges
|
which is either a single value or a list of values or ranges
|
||||||
specified in the same way as
|
specified in the same way as
|
||||||
.Ar ports .
|
.Ar ports .
|
||||||
.It Cm ipoptions Ar spec
|
.It Cm ipoptions Ar spec
|
||||||
@@ -1003,7 +1013,7 @@ Matches IP packets whose precedence field is equal to
|
|||||||
.Ar precedence .
|
.Ar precedence .
|
||||||
.It Cm ipsec
|
.It Cm ipsec
|
||||||
Matches packets that have IPSEC history associated with them
|
Matches packets that have IPSEC history associated with them
|
||||||
(i.e. the packet comes encapsulated in IPSEC, the kernel
|
(i.e., the packet comes encapsulated in IPSEC, the kernel
|
||||||
has IPSEC support and IPSEC_FILTERGIF option, and can correctly
|
has IPSEC support and IPSEC_FILTERGIF option, and can correctly
|
||||||
decapsulate it).
|
decapsulate it).
|
||||||
.Pp
|
.Pp
|
||||||
@@ -1059,7 +1069,7 @@ The rule has a limited lifetime (controlled by a set of
|
|||||||
variables), and the lifetime is refreshed every time a matching
|
variables), and the lifetime is refreshed every time a matching
|
||||||
packet is found.
|
packet is found.
|
||||||
.It Cm layer2
|
.It Cm layer2
|
||||||
Matches only layer2 packets, i.e. those passed to
|
Matches only layer2 packets, i.e., those passed to
|
||||||
.Nm
|
.Nm
|
||||||
from ether_demux() and ether_output_frame().
|
from ether_demux() and ether_output_frame().
|
||||||
.It Cm limit Bro Cm src-addr | src-port | dst-addr | dst-port Brc Ar N
|
.It Cm limit Bro Cm src-addr | src-port | dst-addr | dst-port Brc Ar N
|
||||||
@@ -1114,7 +1124,7 @@ corresponds to one of those specified as argument.
|
|||||||
.Ar mac-type
|
.Ar mac-type
|
||||||
is specified in the same way as
|
is specified in the same way as
|
||||||
.Cm port numbers
|
.Cm port numbers
|
||||||
(i.e. one or more comma-separated single values or ranges).
|
(i.e., one or more comma-separated single values or ranges).
|
||||||
You can use symbolic names for known values such as
|
You can use symbolic names for known values such as
|
||||||
.Em vlan , ipv4, ipv6 .
|
.Em vlan , ipv4, ipv6 .
|
||||||
Values can be entered as decimal or hexadecimal (if prefixed by 0x),
|
Values can be entered as decimal or hexadecimal (if prefixed by 0x),
|
||||||
@@ -1337,7 +1347,8 @@ When you disable a set, its rules behave as if they do not exist
|
|||||||
in the firewall configuration, with only one exception:
|
in the firewall configuration, with only one exception:
|
||||||
.Bd -ragged -offset indent
|
.Bd -ragged -offset indent
|
||||||
dynamic rules created from a rule before it had been disabled
|
dynamic rules created from a rule before it had been disabled
|
||||||
will still be active until they expire. In order to delete
|
will still be active until they expire.
|
||||||
|
In order to delete
|
||||||
dynamic rules you have to explicitly delete the parent rule
|
dynamic rules you have to explicitly delete the parent rule
|
||||||
which generated them.
|
which generated them.
|
||||||
.Ed
|
.Ed
|
||||||
@@ -1362,7 +1373,8 @@ Section on some possible uses of sets of rules.
|
|||||||
.Sh STATEFUL FIREWALL
|
.Sh STATEFUL FIREWALL
|
||||||
Stateful operation is a way for the firewall to dynamically
|
Stateful operation is a way for the firewall to dynamically
|
||||||
create rules for specific flows when packets that
|
create rules for specific flows when packets that
|
||||||
match a given pattern are detected. Support for stateful
|
match a given pattern are detected.
|
||||||
|
Support for stateful
|
||||||
operation comes through the
|
operation comes through the
|
||||||
.Cm check-state , keep-state
|
.Cm check-state , keep-state
|
||||||
and
|
and
|
||||||
@@ -1589,7 +1601,8 @@ where the latter means all bits in all fields are significant.
|
|||||||
.It Cm noerror
|
.It Cm noerror
|
||||||
When a packet is dropped by a dummynet queue or pipe, the error
|
When a packet is dropped by a dummynet queue or pipe, the error
|
||||||
is normally reported to the caller routine in the kernel, in the
|
is normally reported to the caller routine in the kernel, in the
|
||||||
same way as it happens when a device queue fills up. Setting this
|
same way as it happens when a device queue fills up.
|
||||||
|
Setting this
|
||||||
option reports the packet as successfully delivered, which can be
|
option reports the packet as successfully delivered, which can be
|
||||||
needed for some experimental setups where you want to simulate
|
needed for some experimental setups where you want to simulate
|
||||||
loss or congestion at a remote router.
|
loss or congestion at a remote router.
|
||||||
@@ -1615,7 +1628,7 @@ queueing delay.
|
|||||||
E.g., 50 max-sized ethernet packets (1500 bytes) mean 600Kbit
|
E.g., 50 max-sized ethernet packets (1500 bytes) mean 600Kbit
|
||||||
or 20s of queue on a 30Kbit/s pipe.
|
or 20s of queue on a 30Kbit/s pipe.
|
||||||
Even worse effects can result if you get packets from an
|
Even worse effects can result if you get packets from an
|
||||||
interface with a much larger MTU, e.g. the loopback interface
|
interface with a much larger MTU, e.g.\& the loopback interface
|
||||||
with its 16KB packets.
|
with its 16KB packets.
|
||||||
.Pp
|
.Pp
|
||||||
.It Cm red | gred Ar w_q Ns / Ns Ar min_th Ns / Ns Ar max_th Ns / Ns Ar max_p
|
.It Cm red | gred Ar w_q Ns / Ns Ar min_th Ns / Ns Ar max_th Ns / Ns Ar max_p
|
||||||
@@ -1783,7 +1796,8 @@ Current number of dynamic rules
|
|||||||
.It Em net.inet.ip.fw.dyn_keepalive : No 1
|
.It Em net.inet.ip.fw.dyn_keepalive : No 1
|
||||||
Enables generation of keepalive packets for
|
Enables generation of keepalive packets for
|
||||||
.Cm keep-state
|
.Cm keep-state
|
||||||
rules on TCP sessions. A keepalive is generated to both
|
rules on TCP sessions.
|
||||||
|
A keepalive is generated to both
|
||||||
sides of the connection every 5 seconds for the last 20
|
sides of the connection every 5 seconds for the last 20
|
||||||
seconds of the lifetime of the rule.
|
seconds of the lifetime of the rule.
|
||||||
.It Em net.inet.ip.fw.dyn_max : No 8192
|
.It Em net.inet.ip.fw.dyn_max : No 8192
|
||||||
@@ -1806,7 +1820,8 @@ Both
|
|||||||
and
|
and
|
||||||
.Em dyn_rst_lifetime
|
.Em dyn_rst_lifetime
|
||||||
must be strictly lower than 5 seconds, the period of
|
must be strictly lower than 5 seconds, the period of
|
||||||
repetition of keepalives. The firewall enforces that.
|
repetition of keepalives.
|
||||||
|
The firewall enforces that.
|
||||||
.It Em net.inet.ip.fw.enable : No 1
|
.It Em net.inet.ip.fw.enable : No 1
|
||||||
Enables the firewall.
|
Enables the firewall.
|
||||||
Setting this variable to 0 lets you run your machine without
|
Setting this variable to 0 lets you run your machine without
|
||||||
@@ -1911,7 +1926,8 @@ you can only specify ports when the rule is requesting
|
|||||||
.Cm tcp
|
.Cm tcp
|
||||||
or
|
or
|
||||||
.Cm udp
|
.Cm udp
|
||||||
packets. With
|
packets.
|
||||||
|
With
|
||||||
.Nm ipfw2
|
.Nm ipfw2
|
||||||
you can put port specifications in rules matching all packets,
|
you can put port specifications in rules matching all packets,
|
||||||
and the match will be attempted only on those packets carrying
|
and the match will be attempted only on those packets carrying
|
||||||
@@ -2035,7 +2051,8 @@ following to the top of a ruleset:
|
|||||||
.Dl "ipfw add deny ip from any to any not verrevpath in"
|
.Dl "ipfw add deny ip from any to any not verrevpath in"
|
||||||
.Pp
|
.Pp
|
||||||
This rule drops all incoming packets that appear to be coming to the
|
This rule drops all incoming packets that appear to be coming to the
|
||||||
system on the wrong interface. For example, a packet with a source
|
system on the wrong interface.
|
||||||
|
For example, a packet with a source
|
||||||
address belonging to a host on a protected internal network would be
|
address belonging to a host on a protected internal network would be
|
||||||
dropped if it tried to enter the system from an external interface.
|
dropped if it tried to enter the system from an external interface.
|
||||||
.Ss DYNAMIC RULES
|
.Ss DYNAMIC RULES
|
||||||
@@ -2115,7 +2132,7 @@ A similar effect can be achieved making use of dummynet pipes:
|
|||||||
.Dl "ipfw add pipe 10 ip from any to any"
|
.Dl "ipfw add pipe 10 ip from any to any"
|
||||||
.Dl "ipfw pipe 10 config plr 0.05"
|
.Dl "ipfw pipe 10 config plr 0.05"
|
||||||
.Pp
|
.Pp
|
||||||
We can use pipes to artificially limit bandwidth, e.g. on a
|
We can use pipes to artificially limit bandwidth, e.g.\& on a
|
||||||
machine acting as a router, if we want to limit traffic from
|
machine acting as a router, if we want to limit traffic from
|
||||||
local clients on 192.168.2.0/24 we do:
|
local clients on 192.168.2.0/24 we do:
|
||||||
.Pp
|
.Pp
|
||||||
@@ -2137,11 +2154,11 @@ limitations, the correct way is the following:
|
|||||||
.Dl "ipfw pipe 1 config bw 64Kbit/s queue 10Kbytes"
|
.Dl "ipfw pipe 1 config bw 64Kbit/s queue 10Kbytes"
|
||||||
.Dl "ipfw pipe 2 config bw 64Kbit/s queue 10Kbytes"
|
.Dl "ipfw pipe 2 config bw 64Kbit/s queue 10Kbytes"
|
||||||
.Pp
|
.Pp
|
||||||
The above can be very useful, e.g. if you want to see how
|
The above can be very useful, e.g.\& if you want to see how
|
||||||
your fancy Web page will look for a residential user who
|
your fancy Web page will look for a residential user who
|
||||||
is connected only through a slow link.
|
is connected only through a slow link.
|
||||||
You should not use only one pipe for both directions, unless
|
You should not use only one pipe for both directions, unless
|
||||||
you want to simulate a half-duplex medium (e.g. AppleTalk,
|
you want to simulate a half-duplex medium (e.g.\& AppleTalk,
|
||||||
Ethernet, IRDA).
|
Ethernet, IRDA).
|
||||||
It is not necessary that both pipes have the same configuration,
|
It is not necessary that both pipes have the same configuration,
|
||||||
so we can also simulate asymmetric links.
|
so we can also simulate asymmetric links.
|
||||||
@@ -2191,7 +2208,7 @@ on a net with per-host limits, rather than per-network limits:
|
|||||||
.Dl "ipfw pipe 1 config mask src-ip 0x000000ff bw 200Kbit/s queue 20Kbytes"
|
.Dl "ipfw pipe 1 config mask src-ip 0x000000ff bw 200Kbit/s queue 20Kbytes"
|
||||||
.Dl "ipfw pipe 2 config mask dst-ip 0x000000ff bw 200Kbit/s queue 20Kbytes"
|
.Dl "ipfw pipe 2 config mask dst-ip 0x000000ff bw 200Kbit/s queue 20Kbytes"
|
||||||
.Ss SETS OF RULES
|
.Ss SETS OF RULES
|
||||||
To add a set of rules atomically, e.g. set 18:
|
To add a set of rules atomically, e.g.\& set 18:
|
||||||
.Pp
|
.Pp
|
||||||
.Dl "ipfw set disable 18"
|
.Dl "ipfw set disable 18"
|
||||||
.Dl "ipfw add NN set 18 ... # repeat as needed"
|
.Dl "ipfw add NN set 18 ... # repeat as needed"
|
||||||
@@ -2208,7 +2225,8 @@ To test a ruleset and disable it and regain control if something goes wrong:
|
|||||||
.Dl "ipfw set enable 18; echo done; sleep 30 && ipfw set disable 18"
|
.Dl "ipfw set enable 18; echo done; sleep 30 && ipfw set disable 18"
|
||||||
.Pp
|
.Pp
|
||||||
Here if everything goes well, you press control-C before the "sleep"
|
Here if everything goes well, you press control-C before the "sleep"
|
||||||
terminates, and your ruleset will be left active. Otherwise, e.g. if
|
terminates, and your ruleset will be left active.
|
||||||
|
Otherwise, e.g.\& if
|
||||||
you cannot access your box, the ruleset will be disabled after
|
you cannot access your box, the ruleset will be disabled after
|
||||||
the sleep terminates thus restoring the previous situation.
|
the sleep terminates thus restoring the previous situation.
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
|
|||||||
@@ -48,7 +48,8 @@ utility is used to prepare a set of
|
|||||||
.Dq hints
|
.Dq hints
|
||||||
for use by the dynamic linker
|
for use by the dynamic linker
|
||||||
to facilitate quick lookup of shared libraries available in multiple
|
to facilitate quick lookup of shared libraries available in multiple
|
||||||
directories. It scans a set of built-in system directories and any
|
directories.
|
||||||
|
It scans a set of built-in system directories and any
|
||||||
.Ar directories
|
.Ar directories
|
||||||
specified on the command line (in the given order) looking for
|
specified on the command line (in the given order) looking for
|
||||||
shared libraries and stores the results in a system file to forestall
|
shared libraries and stores the results in a system file to forestall
|
||||||
@@ -57,8 +58,10 @@ operations the dynamic linker would have to perform to load the
|
|||||||
required shared libraries.
|
required shared libraries.
|
||||||
.Pp
|
.Pp
|
||||||
Files named on the command line are expected to contain directories
|
Files named on the command line are expected to contain directories
|
||||||
to scan for shared libraries. Each directory's pathname must start on a new
|
to scan for shared libraries.
|
||||||
line. Blank lines and lines starting with the comment character
|
Each directory's pathname must start on a new
|
||||||
|
line.
|
||||||
|
Blank lines and lines starting with the comment character
|
||||||
.Ql \&#
|
.Ql \&#
|
||||||
are ignored.
|
are ignored.
|
||||||
Filenames must conform to the
|
Filenames must conform to the
|
||||||
@@ -105,15 +108,18 @@ Generate the hints for a.out format shared libraries.
|
|||||||
.It Fl elf
|
.It Fl elf
|
||||||
Generate the hints for ELF format shared libraries.
|
Generate the hints for ELF format shared libraries.
|
||||||
.It Fl R
|
.It Fl R
|
||||||
Rescan the previously configured directories. This opens the previous hints
|
Rescan the previously configured directories.
|
||||||
file and fetches the directory list from the header. Any additional pathnames
|
This opens the previous hints
|
||||||
|
file and fetches the directory list from the header.
|
||||||
|
Any additional pathnames
|
||||||
on the command line are also processed.
|
on the command line are also processed.
|
||||||
This is the default action when no parameters are given.
|
This is the default action when no parameters are given.
|
||||||
.It Fl f Ar hints_file
|
.It Fl f Ar hints_file
|
||||||
Read and/or update the specified hints file, instead of the standard file.
|
Read and/or update the specified hints file, instead of the standard file.
|
||||||
This option is provided primarily for testing.
|
This option is provided primarily for testing.
|
||||||
.It Fl i
|
.It Fl i
|
||||||
Run in insecure mode. The security checks will not be performed.
|
Run in insecure mode.
|
||||||
|
The security checks will not be performed.
|
||||||
.It Fl m
|
.It Fl m
|
||||||
Instead of replacing the contents of the hints file
|
Instead of replacing the contents of the hints file
|
||||||
with those found in the directories specified,
|
with those found in the directories specified,
|
||||||
@@ -125,7 +131,8 @@ are also rescanned for new shared libraries.
|
|||||||
.It Fl r
|
.It Fl r
|
||||||
List the current contents of the hints file
|
List the current contents of the hints file
|
||||||
on the standard output.
|
on the standard output.
|
||||||
The hints file is not modified. The list of
|
The hints file is not modified.
|
||||||
|
The list of
|
||||||
directories stored in the hints file is included.
|
directories stored in the hints file is included.
|
||||||
.It Fl s
|
.It Fl s
|
||||||
Do not scan the built-in system directory
|
Do not scan the built-in system directory
|
||||||
@@ -160,7 +167,8 @@ Overrides
|
|||||||
.Fl aout
|
.Fl aout
|
||||||
or
|
or
|
||||||
.Fl elf
|
.Fl elf
|
||||||
is the default. If set, its value should be either
|
is the default.
|
||||||
|
If set, its value should be either
|
||||||
.Ql aout
|
.Ql aout
|
||||||
or
|
or
|
||||||
.Ql elf .
|
.Ql elf .
|
||||||
@@ -184,7 +192,8 @@ Determines whether
|
|||||||
.Fl aout
|
.Fl aout
|
||||||
or
|
or
|
||||||
.Fl elf
|
.Fl elf
|
||||||
is the default. If present, it must consist of a single line
|
is the default.
|
||||||
|
If present, it must consist of a single line
|
||||||
containing either
|
containing either
|
||||||
.Ql OBJFORMAT=aout
|
.Ql OBJFORMAT=aout
|
||||||
or
|
or
|
||||||
|
|||||||
@@ -105,7 +105,8 @@ Filename to use for the vnode type memory disk.
|
|||||||
.It Fl l
|
.It Fl l
|
||||||
List information about configured
|
List information about configured
|
||||||
.Xr md 4
|
.Xr md 4
|
||||||
devices. If the
|
devices.
|
||||||
|
If the
|
||||||
.Fl u
|
.Fl u
|
||||||
option is used in conjuction with this, the output is limited to
|
option is used in conjuction with this, the output is limited to
|
||||||
information on the specified device.
|
information on the specified device.
|
||||||
|
|||||||
+2
-1
@@ -65,7 +65,8 @@ and pseudo devices, and are type
|
|||||||
.Cm c .
|
.Cm c .
|
||||||
.It Ar major
|
.It Ar major
|
||||||
The major device number is an integer number which tells the kernel
|
The major device number is an integer number which tells the kernel
|
||||||
which device driver entry point to use. To learn what
|
which device driver entry point to use.
|
||||||
|
To learn what
|
||||||
major device number to use for a particular device, check
|
major device number to use for a particular device, check
|
||||||
.Pa /usr/src/sys/conf/majors .
|
.Pa /usr/src/sys/conf/majors .
|
||||||
.It Ar minor
|
.It Ar minor
|
||||||
|
|||||||
@@ -105,12 +105,15 @@ Start the file system at
|
|||||||
Normally, if the underlying device is a CD-ROM drive,
|
Normally, if the underlying device is a CD-ROM drive,
|
||||||
.Nm
|
.Nm
|
||||||
will try to figure out the last track from the CD-ROM containing
|
will try to figure out the last track from the CD-ROM containing
|
||||||
data, and start the file system there. If the device is not a CD-ROM,
|
data, and start the file system there.
|
||||||
|
If the device is not a CD-ROM,
|
||||||
or the table of contents cannot be examined, the file system will be
|
or the table of contents cannot be examined, the file system will be
|
||||||
started at sector 0. This option can be used to override the behaviour.
|
started at sector 0.
|
||||||
|
This option can be used to override the behaviour.
|
||||||
Note that
|
Note that
|
||||||
.Ar startsector
|
.Ar startsector
|
||||||
is measured in CD-ROM blocks, with 2048 bytes each. This is the same
|
is measured in CD-ROM blocks, with 2048 bytes each.
|
||||||
|
This is the same
|
||||||
as for example the
|
as for example the
|
||||||
.Cm info
|
.Cm info
|
||||||
command of
|
command of
|
||||||
|
|||||||
@@ -315,7 +315,7 @@ tune the timeout
|
|||||||
interval.)
|
interval.)
|
||||||
.It Fl w
|
.It Fl w
|
||||||
Set the write data size to the specified value.
|
Set the write data size to the specified value.
|
||||||
Ditto the comments w.r.t. the
|
Ditto the comments w.r.t.\& the
|
||||||
.Fl r
|
.Fl r
|
||||||
option, but using the
|
option, but using the
|
||||||
.Dq "fragments dropped due to timeout"
|
.Dq "fragments dropped due to timeout"
|
||||||
|
|||||||
@@ -103,7 +103,8 @@ The
|
|||||||
.Nm
|
.Nm
|
||||||
utility takes two arguments, the pathname
|
utility takes two arguments, the pathname
|
||||||
of the lower vfs (target-pn) and the pathname where the null
|
of the lower vfs (target-pn) and the pathname where the null
|
||||||
layer will appear in the namespace (mount-point-pn). After
|
layer will appear in the namespace (mount-point-pn).
|
||||||
|
After
|
||||||
the null layer is put into place, the contents
|
the null layer is put into place, the contents
|
||||||
of target-pn subtree will be aliased under mount-point-pn.
|
of target-pn subtree will be aliased under mount-point-pn.
|
||||||
.\"
|
.\"
|
||||||
@@ -111,15 +112,19 @@ of target-pn subtree will be aliased under mount-point-pn.
|
|||||||
.Sh OPERATION OF A NULL LAYER
|
.Sh OPERATION OF A NULL LAYER
|
||||||
The null layer is the minimum file system layer,
|
The null layer is the minimum file system layer,
|
||||||
simply bypassing all possible operations to the lower layer
|
simply bypassing all possible operations to the lower layer
|
||||||
for processing there. The majority of its activity centers
|
for processing there.
|
||||||
|
The majority of its activity centers
|
||||||
on the bypass routine, through which nearly all vnode operations
|
on the bypass routine, through which nearly all vnode operations
|
||||||
pass.
|
pass.
|
||||||
.Pp
|
.Pp
|
||||||
The bypass routine accepts arbitrary vnode operations for
|
The bypass routine accepts arbitrary vnode operations for
|
||||||
handling by the lower layer. It begins by examining vnode
|
handling by the lower layer.
|
||||||
|
It begins by examining vnode
|
||||||
operation arguments and replacing any null-nodes by their
|
operation arguments and replacing any null-nodes by their
|
||||||
lower-layer equivalents. It then invokes the operation
|
lower-layer equivalents.
|
||||||
on the lower layer. Finally, it replaces the null-nodes
|
It then invokes the operation
|
||||||
|
on the lower layer.
|
||||||
|
Finally, it replaces the null-nodes
|
||||||
in the arguments and, if a vnode is returned by the operation,
|
in the arguments and, if a vnode is returned by the operation,
|
||||||
stacks a null-node on top of the returned vnode.
|
stacks a null-node on top of the returned vnode.
|
||||||
.Pp
|
.Pp
|
||||||
@@ -144,11 +149,13 @@ information.
|
|||||||
.\"
|
.\"
|
||||||
.Sh INSTANTIATING VNODE STACKS
|
.Sh INSTANTIATING VNODE STACKS
|
||||||
Mounting associates the null layer with a lower layer,
|
Mounting associates the null layer with a lower layer,
|
||||||
in effect stacking two VFSes. Vnode stacks are instead
|
in effect stacking two VFSes.
|
||||||
|
Vnode stacks are instead
|
||||||
created on demand as files are accessed.
|
created on demand as files are accessed.
|
||||||
.Pp
|
.Pp
|
||||||
The initial mount creates a single vnode stack for the
|
The initial mount creates a single vnode stack for the
|
||||||
root of the new null layer. All other vnode stacks
|
root of the new null layer.
|
||||||
|
All other vnode stacks
|
||||||
are created as a result of vnode operations on
|
are created as a result of vnode operations on
|
||||||
this or other null vnode stacks.
|
this or other null vnode stacks.
|
||||||
.Pp
|
.Pp
|
||||||
@@ -168,7 +175,8 @@ the root null-node (which was created when the null layer was mounted).
|
|||||||
Now consider opening
|
Now consider opening
|
||||||
.Pa sys .
|
.Pa sys .
|
||||||
A vop_lookup would be
|
A vop_lookup would be
|
||||||
done on the root null-node. This operation would bypass through
|
done on the root null-node.
|
||||||
|
This operation would bypass through
|
||||||
to the lower layer which would return a vnode representing
|
to the lower layer which would return a vnode representing
|
||||||
the UFS
|
the UFS
|
||||||
.Pa sys .
|
.Pa sys .
|
||||||
@@ -197,8 +205,10 @@ null layer.
|
|||||||
.\"
|
.\"
|
||||||
.Sh INVOKING OPERATIONS ON LOWER LAYERS
|
.Sh INVOKING OPERATIONS ON LOWER LAYERS
|
||||||
There are two techniques to invoke operations on a lower layer
|
There are two techniques to invoke operations on a lower layer
|
||||||
when the operation cannot be completely bypassed. Each method
|
when the operation cannot be completely bypassed.
|
||||||
is appropriate in different situations. In both cases,
|
Each method
|
||||||
|
is appropriate in different situations.
|
||||||
|
In both cases,
|
||||||
it is the responsibility of the aliasing layer to make
|
it is the responsibility of the aliasing layer to make
|
||||||
the operation arguments "correct" for the lower layer
|
the operation arguments "correct" for the lower layer
|
||||||
by mapping a vnode argument to the lower layer.
|
by mapping a vnode argument to the lower layer.
|
||||||
@@ -217,7 +227,8 @@ the lower layer with the
|
|||||||
.Em VOP_OPERATIONNAME
|
.Em VOP_OPERATIONNAME
|
||||||
interface.
|
interface.
|
||||||
The advantage of this method is that it is easy to invoke
|
The advantage of this method is that it is easy to invoke
|
||||||
arbitrary operations on the lower layer. The disadvantage
|
arbitrary operations on the lower layer.
|
||||||
|
The disadvantage
|
||||||
is that vnode arguments must be manually mapped.
|
is that vnode arguments must be manually mapped.
|
||||||
.\"
|
.\"
|
||||||
.\"
|
.\"
|
||||||
@@ -228,8 +239,11 @@ UCLA Technical Report CSD-910056,
|
|||||||
.Em "Stackable Layers: an Architecture for File System Development" .
|
.Em "Stackable Layers: an Architecture for File System Development" .
|
||||||
.Sh BUGS
|
.Sh BUGS
|
||||||
THIS FILE SYSTEM TYPE IS NOT YET FULLY SUPPORTED (READ: IT DOESN'T WORK)
|
THIS FILE SYSTEM TYPE IS NOT YET FULLY SUPPORTED (READ: IT DOESN'T WORK)
|
||||||
AND USING IT MAY, IN FACT, DESTROY DATA ON YOUR SYSTEM. USE AT YOUR
|
AND USING IT MAY, IN FACT, DESTROY DATA ON YOUR SYSTEM.
|
||||||
OWN RISK. BEWARE OF DOG. SLIPPERY WHEN WET.
|
USE AT YOUR
|
||||||
|
OWN RISK.
|
||||||
|
BEWARE OF DOG.
|
||||||
|
SLIPPERY WHEN WET.
|
||||||
.Pp
|
.Pp
|
||||||
This code also needs an owner in order to be less dangerous - serious
|
This code also needs an owner in order to be less dangerous - serious
|
||||||
hackers can apply by sending mail to
|
hackers can apply by sending mail to
|
||||||
|
|||||||
@@ -53,7 +53,8 @@ file systems
|
|||||||
The
|
The
|
||||||
.Nm
|
.Nm
|
||||||
utility is a generic mechanism for attaching ``standard'' file systems to
|
utility is a generic mechanism for attaching ``standard'' file systems to
|
||||||
the file system. The
|
the file system.
|
||||||
|
The
|
||||||
.Nm
|
.Nm
|
||||||
utility currently supports the following file systems:
|
utility currently supports the following file systems:
|
||||||
.Nm devfs ,
|
.Nm devfs ,
|
||||||
@@ -96,7 +97,8 @@ man page for possible options and their meanings.
|
|||||||
The
|
The
|
||||||
.Nm
|
.Nm
|
||||||
utility examines its zeroth command-line argument (the name by which
|
utility examines its zeroth command-line argument (the name by which
|
||||||
it was called) to determine the type of file system to be mounted. If
|
it was called) to determine the type of file system to be mounted.
|
||||||
|
If
|
||||||
it is called by a name which does not end in
|
it is called by a name which does not end in
|
||||||
.Dq Li _ Ns Ar fsname ,
|
.Dq Li _ Ns Ar fsname ,
|
||||||
.Nm
|
.Nm
|
||||||
|
|||||||
@@ -58,9 +58,11 @@ The
|
|||||||
.Nm
|
.Nm
|
||||||
utility uses a set of files provided by the user to make correspondences
|
utility uses a set of files provided by the user to make correspondences
|
||||||
between uids and gids in the sub-tree's original environment and
|
between uids and gids in the sub-tree's original environment and
|
||||||
some other set of ids in the local environment. For instance, user
|
some other set of ids in the local environment.
|
||||||
|
For instance, user
|
||||||
smith might have uid 1000 in the original environment, while having
|
smith might have uid 1000 in the original environment, while having
|
||||||
uid 2000 in the local environment. The
|
uid 2000 in the local environment.
|
||||||
|
The
|
||||||
.Nm
|
.Nm
|
||||||
utility allows the subtree from smith's original environment to be
|
utility allows the subtree from smith's original environment to be
|
||||||
mapped in such a way that all files with owning uid 1000 look like
|
mapped in such a way that all files with owning uid 1000 look like
|
||||||
@@ -86,7 +88,8 @@ where the mapped subtree is to be placed.
|
|||||||
Describe the mappings to be made between identifiers.
|
Describe the mappings to be made between identifiers.
|
||||||
Briefly, the format of these files is a count of the number of
|
Briefly, the format of these files is a count of the number of
|
||||||
mappings on the first line, with each subsequent line containing
|
mappings on the first line, with each subsequent line containing
|
||||||
a single mapping. Each of these mappings consists of an id in
|
a single mapping.
|
||||||
|
Each of these mappings consists of an id in
|
||||||
the local environment and the corresponding id from the original environment,
|
the local environment and the corresponding id from the original environment,
|
||||||
separated by white space.
|
separated by white space.
|
||||||
.Ar Uid-mapfile
|
.Ar Uid-mapfile
|
||||||
@@ -100,7 +103,8 @@ will be treated as user NOBODY,
|
|||||||
and any gids not mapped in
|
and any gids not mapped in
|
||||||
.Ar gid-mapfile
|
.Ar gid-mapfile
|
||||||
will be treated as group
|
will be treated as group
|
||||||
NULLGROUP. At most 64 uids can be mapped for a given subtree, and
|
NULLGROUP.
|
||||||
|
At most 64 uids can be mapped for a given subtree, and
|
||||||
at most 16 groups can be mapped by a given subtree.
|
at most 16 groups can be mapped by a given subtree.
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
@@ -109,21 +113,26 @@ must be owned by root, and they must be writable only by root.
|
|||||||
The
|
The
|
||||||
.Nm
|
.Nm
|
||||||
utility will refuse to map the sub-tree if the ownership or permissions on
|
utility will refuse to map the sub-tree if the ownership or permissions on
|
||||||
these files are improper. It will also balk if the count of mappings
|
these files are improper.
|
||||||
|
It will also balk if the count of mappings
|
||||||
in the first line of the map files is not correct.
|
in the first line of the map files is not correct.
|
||||||
.Pp
|
.Pp
|
||||||
The layer created by the
|
The layer created by the
|
||||||
.Nm
|
.Nm
|
||||||
utility is meant to serve as a simple example of file system layering.
|
utility is meant to serve as a simple example of file system layering.
|
||||||
It is not meant for production use. The implementation is not very
|
It is not meant for production use.
|
||||||
|
The implementation is not very
|
||||||
sophisticated.
|
sophisticated.
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr mount 8 ,
|
.Xr mount 8 ,
|
||||||
.Xr mount_nullfs 8
|
.Xr mount_nullfs 8
|
||||||
.Sh BUGS
|
.Sh BUGS
|
||||||
THIS FILE SYSTEM TYPE IS NOT YET FULLY SUPPORTED (READ: IT DOESN'T WORK)
|
THIS FILE SYSTEM TYPE IS NOT YET FULLY SUPPORTED (READ: IT DOESN'T WORK)
|
||||||
AND USING IT MAY, IN FACT, DESTROY DATA ON YOUR SYSTEM. USE AT YOUR
|
AND USING IT MAY, IN FACT, DESTROY DATA ON YOUR SYSTEM.
|
||||||
OWN RISK. BEWARE OF DOG. SLIPPERY WHEN WET.
|
USE AT YOUR
|
||||||
|
OWN RISK.
|
||||||
|
BEWARE OF DOG.
|
||||||
|
SLIPPERY WHEN WET.
|
||||||
.Pp
|
.Pp
|
||||||
This code also needs an owner in order to be less dangerous - serious
|
This code also needs an owner in order to be less dangerous - serious
|
||||||
hackers can apply by sending mail to
|
hackers can apply by sending mail to
|
||||||
|
|||||||
@@ -179,8 +179,11 @@ accessible via
|
|||||||
.Xr mount_nullfs 8
|
.Xr mount_nullfs 8
|
||||||
.Sh BUGS
|
.Sh BUGS
|
||||||
THIS FILE SYSTEM TYPE IS NOT YET FULLY SUPPORTED (READ: IT DOESN'T WORK)
|
THIS FILE SYSTEM TYPE IS NOT YET FULLY SUPPORTED (READ: IT DOESN'T WORK)
|
||||||
AND USING IT MAY, IN FACT, DESTROY DATA ON YOUR SYSTEM. USE AT YOUR
|
AND USING IT MAY, IN FACT, DESTROY DATA ON YOUR SYSTEM.
|
||||||
OWN RISK. BEWARE OF DOG. SLIPPERY WHEN WET.
|
USE AT YOUR
|
||||||
|
OWN RISK.
|
||||||
|
BEWARE OF DOG.
|
||||||
|
SLIPPERY WHEN WET.
|
||||||
.Pp
|
.Pp
|
||||||
This code also needs an owner in order to be less dangerous - serious
|
This code also needs an owner in order to be less dangerous - serious
|
||||||
hackers can apply by sending mail to
|
hackers can apply by sending mail to
|
||||||
|
|||||||
@@ -78,26 +78,32 @@ FAT type (one of 12, 16, or 32).
|
|||||||
.It Fl I Ar volid
|
.It Fl I Ar volid
|
||||||
Volume ID.
|
Volume ID.
|
||||||
.It Fl L Ar label
|
.It Fl L Ar label
|
||||||
Volume label (up to 11 characters). The label should consist of
|
Volume label (up to 11 characters).
|
||||||
|
The label should consist of
|
||||||
only those characters permitted in regular DOS (8+3) filenames.
|
only those characters permitted in regular DOS (8+3) filenames.
|
||||||
.It Fl O Ar OEM
|
.It Fl O Ar OEM
|
||||||
OEM string (up to 8 characters). The default is
|
OEM string (up to 8 characters).
|
||||||
|
The default is
|
||||||
.Qq Li "BSD 4.4" .
|
.Qq Li "BSD 4.4" .
|
||||||
.It Fl S Ar sector-size
|
.It Fl S Ar sector-size
|
||||||
Number of bytes per sector. Acceptable values are powers of 2
|
Number of bytes per sector.
|
||||||
|
Acceptable values are powers of 2
|
||||||
in the range 128 through 32768.
|
in the range 128 through 32768.
|
||||||
.It Fl a Ar FAT-size
|
.It Fl a Ar FAT-size
|
||||||
Number of sectors per FAT.
|
Number of sectors per FAT.
|
||||||
.It Fl b Ar block-size
|
.It Fl b Ar block-size
|
||||||
File system block size (bytes per cluster). This should resolve to an
|
File system block size (bytes per cluster).
|
||||||
|
This should resolve to an
|
||||||
acceptable number of sectors per cluster (see below).
|
acceptable number of sectors per cluster (see below).
|
||||||
.It Fl c Ar cluster-size
|
.It Fl c Ar cluster-size
|
||||||
Sectors per cluster. Acceptable values are powers of 2 in the range
|
Sectors per cluster.
|
||||||
|
Acceptable values are powers of 2 in the range
|
||||||
1 through 128.
|
1 through 128.
|
||||||
.It Fl e Ar dirents
|
.It Fl e Ar dirents
|
||||||
Number of root directory entries (FAT12 and FAT16 only).
|
Number of root directory entries (FAT12 and FAT16 only).
|
||||||
.It Fl f Ar format
|
.It Fl f Ar format
|
||||||
Specify a standard (floppy disk) format. The standard formats
|
Specify a standard (floppy disk) format.
|
||||||
|
The standard formats
|
||||||
are (capacities in kilobytes): 160, 180, 320, 360, 640, 720, 1200,
|
are (capacities in kilobytes): 160, 180, 320, 360, 640, 720, 1200,
|
||||||
1232, 1440, 2880.
|
1232, 1440, 2880.
|
||||||
.It Fl h Ar heads
|
.It Fl h Ar heads
|
||||||
@@ -106,12 +112,14 @@ Number of drive heads.
|
|||||||
Location of the file system info sector (FAT32 only).
|
Location of the file system info sector (FAT32 only).
|
||||||
A value of 0xffff signifies no info sector.
|
A value of 0xffff signifies no info sector.
|
||||||
.It Fl k Ar backup
|
.It Fl k Ar backup
|
||||||
Location of the backup boot sector (FAT32 only). A value
|
Location of the backup boot sector (FAT32 only).
|
||||||
|
A value
|
||||||
of 0xffff signifies no backup sector.
|
of 0xffff signifies no backup sector.
|
||||||
.It Fl m Ar media
|
.It Fl m Ar media
|
||||||
Media descriptor (acceptable range 0xf0 to 0xff).
|
Media descriptor (acceptable range 0xf0 to 0xff).
|
||||||
.It Fl n Ar FATs
|
.It Fl n Ar FATs
|
||||||
Number of FATs. Acceptable values are 1 to 16 inclusive.
|
Number of FATs.
|
||||||
|
Acceptable values are 1 to 16 inclusive.
|
||||||
The default
|
The default
|
||||||
is 2.
|
is 2.
|
||||||
.It Fl o Ar hidden
|
.It Fl o Ar hidden
|
||||||
@@ -126,7 +134,8 @@ Number of sectors per track.
|
|||||||
.Sh NOTES
|
.Sh NOTES
|
||||||
FAT file system parameters occupy a "Boot Sector BPB (BIOS Parameter
|
FAT file system parameters occupy a "Boot Sector BPB (BIOS Parameter
|
||||||
Block)" in the first of the "reserved" sectors which precede the actual
|
Block)" in the first of the "reserved" sectors which precede the actual
|
||||||
file system. For reference purposes, this structure is presented
|
file system.
|
||||||
|
For reference purposes, this structure is presented
|
||||||
below.
|
below.
|
||||||
.Bd -literal
|
.Bd -literal
|
||||||
struct bsbpb {
|
struct bsbpb {
|
||||||
|
|||||||
@@ -49,7 +49,8 @@ and
|
|||||||
are the addresses used on the tunnel device.
|
are the addresses used on the tunnel device.
|
||||||
If you configure the tunnel against a cisco router, use a netmask of
|
If you configure the tunnel against a cisco router, use a netmask of
|
||||||
.Dq 255.255.255.252
|
.Dq 255.255.255.252
|
||||||
on the cisco. This is because the tunnel is a point-to-point interface
|
on the cisco.
|
||||||
|
This is because the tunnel is a point-to-point interface
|
||||||
in the
|
in the
|
||||||
.Fx
|
.Fx
|
||||||
end, a concept cisco doesn't really implement.
|
end, a concept cisco doesn't really implement.
|
||||||
|
|||||||
+44
-22
@@ -51,7 +51,8 @@ and unless this fails, the system will resume multi-user operations.
|
|||||||
.Sy Cold starts .
|
.Sy Cold starts .
|
||||||
Most i386 PCs attempt to boot first from floppy disk drive 0 (sometimes
|
Most i386 PCs attempt to boot first from floppy disk drive 0 (sometimes
|
||||||
known as drive A:) and, failing that, from hard disk drive 0 (sometimes
|
known as drive A:) and, failing that, from hard disk drive 0 (sometimes
|
||||||
known as drive C:, or as drive 0x80 to the BIOS). Some BIOSes allow
|
known as drive C:, or as drive 0x80 to the BIOS).
|
||||||
|
Some BIOSes allow
|
||||||
you to change this default sequence, and may also include a CD-ROM
|
you to change this default sequence, and may also include a CD-ROM
|
||||||
drive as a boot device.
|
drive as a boot device.
|
||||||
.Pp
|
.Pp
|
||||||
@@ -77,10 +78,12 @@ or
|
|||||||
.Sy /
|
.Sy /
|
||||||
is displayed) before
|
is displayed) before
|
||||||
.Xr loader 8
|
.Xr loader 8
|
||||||
is invoked. Booting will also be attempted at stage two, if the
|
is invoked.
|
||||||
|
Booting will also be attempted at stage two, if the
|
||||||
third stage cannot be loaded.
|
third stage cannot be loaded.
|
||||||
.Pp
|
.Pp
|
||||||
The remainder of this subsection deals only with the boot blocks. The
|
The remainder of this subsection deals only with the boot blocks.
|
||||||
|
The
|
||||||
.Xr loader 8
|
.Xr loader 8
|
||||||
program is documented separately.
|
program is documented separately.
|
||||||
.Pp
|
.Pp
|
||||||
@@ -100,11 +103,13 @@ of either the floppy or the hard disk.
|
|||||||
This boot may be aborted by typing any character on the keyboard
|
This boot may be aborted by typing any character on the keyboard
|
||||||
at the
|
at the
|
||||||
.Ql boot:
|
.Ql boot:
|
||||||
prompt. At this time, the following input will be accepted:
|
prompt.
|
||||||
|
At this time, the following input will be accepted:
|
||||||
.Bl -tag -width indent
|
.Bl -tag -width indent
|
||||||
.It Ic \&?
|
.It Ic \&?
|
||||||
Give a short listing of the files in the root directory of the default
|
Give a short listing of the files in the root directory of the default
|
||||||
boot device, as a hint about available boot files. (A
|
boot device, as a hint about available boot files.
|
||||||
|
(A
|
||||||
.Ic ?\&
|
.Ic ?\&
|
||||||
may also be specified as the last segment of a path, in which case
|
may also be specified as the last segment of a path, in which case
|
||||||
the listing will be of the relevant subdirectory.)
|
the listing will be of the relevant subdirectory.)
|
||||||
@@ -122,7 +127,8 @@ Specify boot file and flags.
|
|||||||
The drive number as recognized by the BIOS.
|
The drive number as recognized by the BIOS.
|
||||||
0 for the first drive, 1 for the second drive, etc.
|
0 for the first drive, 1 for the second drive, etc.
|
||||||
.It Ar interface
|
.It Ar interface
|
||||||
The type of controller to boot from. Note that the controller is required
|
The type of controller to boot from.
|
||||||
|
Note that the controller is required
|
||||||
to have BIOS support since the BIOS services are used to load the
|
to have BIOS support since the BIOS services are used to load the
|
||||||
boot file image.
|
boot file image.
|
||||||
.Pp
|
.Pp
|
||||||
@@ -145,11 +151,13 @@ The unit number of the drive on the interface being used.
|
|||||||
.It Oo Ar slice , Oc Ns Ar part
|
.It Oo Ar slice , Oc Ns Ar part
|
||||||
The partition letter inside the
|
The partition letter inside the
|
||||||
.Bx
|
.Bx
|
||||||
portion of the disk. See
|
portion of the disk.
|
||||||
|
See
|
||||||
.Xr disklabel 8 .
|
.Xr disklabel 8 .
|
||||||
By convention, only partition
|
By convention, only partition
|
||||||
.Ql a
|
.Ql a
|
||||||
contains a bootable image. If sliced disks are used
|
contains a bootable image.
|
||||||
|
If sliced disks are used
|
||||||
.Pq Dq fdisk partitions ,
|
.Pq Dq fdisk partitions ,
|
||||||
any
|
any
|
||||||
.Ar slice
|
.Ar slice
|
||||||
@@ -167,7 +175,8 @@ slice (also known as
|
|||||||
slice) is booted from.
|
slice) is booted from.
|
||||||
.It Ar filename
|
.It Ar filename
|
||||||
The pathname of the file to boot (relative to the root directory
|
The pathname of the file to boot (relative to the root directory
|
||||||
on the specified partition). Defaults to
|
on the specified partition).
|
||||||
|
Defaults to
|
||||||
.Pa /kernel .
|
.Pa /kernel .
|
||||||
Symbolic links are not supported (hard links are).
|
Symbolic links are not supported (hard links are).
|
||||||
.It Fl aCcDdghmnPprsv
|
.It Fl aCcDdghmnPprsv
|
||||||
@@ -181,23 +190,28 @@ ask for the device to mount as the root file system.
|
|||||||
boot from CDROM.
|
boot from CDROM.
|
||||||
.It Fl c
|
.It Fl c
|
||||||
run UserConfig to modify hardware parameters for the loaded
|
run UserConfig to modify hardware parameters for the loaded
|
||||||
kernel. If the kernel was built with one of
|
kernel.
|
||||||
|
If the kernel was built with one of
|
||||||
.Dv USERCONFIG , INTRO_USERCONFIG , VISUAL_USERCONFIG
|
.Dv USERCONFIG , INTRO_USERCONFIG , VISUAL_USERCONFIG
|
||||||
options,
|
options,
|
||||||
remain in UserConfig regardless of any
|
remain in UserConfig regardless of any
|
||||||
.Ic quit
|
.Ic quit
|
||||||
commands present in the script.
|
commands present in the script.
|
||||||
.It Fl D
|
.It Fl D
|
||||||
toggle single and dual console configurations. In the single
|
toggle single and dual console configurations.
|
||||||
|
In the single
|
||||||
configuration the console will be either the internal display
|
configuration the console will be either the internal display
|
||||||
or the serial port, depending on the state of the
|
or the serial port, depending on the state of the
|
||||||
.Fl h
|
.Fl h
|
||||||
option below. In the dual console configuration,
|
option below.
|
||||||
|
In the dual console configuration,
|
||||||
both the internal display and the serial port will become the console
|
both the internal display and the serial port will become the console
|
||||||
at the same time, regardless of the state of the
|
at the same time, regardless of the state of the
|
||||||
.Fl h
|
.Fl h
|
||||||
option. However, the dual console configuration takes effect only during
|
option.
|
||||||
the boot prompt. Once the kernel is loaded, the console specified
|
However, the dual console configuration takes effect only during
|
||||||
|
the boot prompt.
|
||||||
|
Once the kernel is loaded, the console specified
|
||||||
by the
|
by the
|
||||||
.Fl h
|
.Fl h
|
||||||
option becomes the only console.
|
option becomes the only console.
|
||||||
@@ -209,12 +223,15 @@ as early as possible in kernel initialization.
|
|||||||
.It Fl g
|
.It Fl g
|
||||||
use the GDB remote debugging protocol.
|
use the GDB remote debugging protocol.
|
||||||
.It Fl h
|
.It Fl h
|
||||||
toggle internal and serial consoles. You can use this to switch
|
toggle internal and serial consoles.
|
||||||
console devices. For instance, if you boot from the internal console,
|
You can use this to switch
|
||||||
|
console devices.
|
||||||
|
For instance, if you boot from the internal console,
|
||||||
you can use the
|
you can use the
|
||||||
.Fl h
|
.Fl h
|
||||||
option to force the kernel to use the serial port as its
|
option to force the kernel to use the serial port as its
|
||||||
console device. Alternatively, if you boot from the serial port,
|
console device.
|
||||||
|
Alternatively, if you boot from the serial port,
|
||||||
you can use this option to force the kernel to use the internal display
|
you can use this option to force the kernel to use the internal display
|
||||||
as the console instead.
|
as the console instead.
|
||||||
The serial port driver
|
The serial port driver
|
||||||
@@ -223,7 +240,8 @@ has a flag to override this option.
|
|||||||
If that flag is set, the serial port will always be used as the console,
|
If that flag is set, the serial port will always be used as the console,
|
||||||
regardless of the
|
regardless of the
|
||||||
.Fl h
|
.Fl h
|
||||||
option described here. See the man page for
|
option described here.
|
||||||
|
See the man page for
|
||||||
.Xr sio 4
|
.Xr sio 4
|
||||||
for more details.
|
for more details.
|
||||||
.It Fl m
|
.It Fl m
|
||||||
@@ -233,7 +251,8 @@ ignore key press to interrupt boot before
|
|||||||
.Xr loader 8
|
.Xr loader 8
|
||||||
is invoked.
|
is invoked.
|
||||||
.It Fl P
|
.It Fl P
|
||||||
probe the keyboard. If no keyboard is found, the
|
probe the keyboard.
|
||||||
|
If no keyboard is found, the
|
||||||
.Fl D
|
.Fl D
|
||||||
and
|
and
|
||||||
.Fl h
|
.Fl h
|
||||||
@@ -262,7 +281,8 @@ be verbose during device probing (and later).
|
|||||||
You may put a BIOS drive number, a controller type, a unit number,
|
You may put a BIOS drive number, a controller type, a unit number,
|
||||||
a partition, a kernel file name, and any valid option in
|
a partition, a kernel file name, and any valid option in
|
||||||
.Pa /boot.config
|
.Pa /boot.config
|
||||||
to set defaults. Enter them in one line just as you type at the
|
to set defaults.
|
||||||
|
Enter them in one line just as you type at the
|
||||||
.Ql boot:
|
.Ql boot:
|
||||||
prompt.
|
prompt.
|
||||||
.Sh FILES
|
.Sh FILES
|
||||||
@@ -325,7 +345,8 @@ On older machines, or otherwise where EDD support (disk packet
|
|||||||
interface support) is not available, all boot-related files and
|
interface support) is not available, all boot-related files and
|
||||||
structures (including the kernel) that need to be accessed during the
|
structures (including the kernel) that need to be accessed during the
|
||||||
boot phase must reside on the disk at or below cylinder 1023 (as the
|
boot phase must reside on the disk at or below cylinder 1023 (as the
|
||||||
BIOS understands the geometry). When a
|
BIOS understands the geometry).
|
||||||
|
When a
|
||||||
.Dq Disk error 0x1
|
.Dq Disk error 0x1
|
||||||
is reported by the second-stage bootstrap, it generally means that this
|
is reported by the second-stage bootstrap, it generally means that this
|
||||||
requirement has not been adhered to.
|
requirement has not been adhered to.
|
||||||
@@ -341,7 +362,8 @@ Due to space constraints, the keyboard probe initiated by the
|
|||||||
.Fl P
|
.Fl P
|
||||||
option is simply a test that the BIOS has detected an
|
option is simply a test that the BIOS has detected an
|
||||||
.Dq extended
|
.Dq extended
|
||||||
keyboard. If an
|
keyboard.
|
||||||
|
If an
|
||||||
.Dq XT/AT
|
.Dq XT/AT
|
||||||
keyboard (with no F11 and F12 keys, etc.) is attached, the probe will
|
keyboard (with no F11 and F12 keys, etc.) is attached, the probe will
|
||||||
fail.
|
fail.
|
||||||
|
|||||||
@@ -205,7 +205,8 @@ The
|
|||||||
.Fl r
|
.Fl r
|
||||||
flag precludes an interactive file extraction and can be
|
flag precludes an interactive file extraction and can be
|
||||||
detrimental to one's health if not used carefully (not to mention
|
detrimental to one's health if not used carefully (not to mention
|
||||||
the disk). An example:
|
the disk).
|
||||||
|
An example:
|
||||||
.Bd -literal -offset indent
|
.Bd -literal -offset indent
|
||||||
newfs /dev/da0s1a
|
newfs /dev/da0s1a
|
||||||
mount /dev/da0s1a /mnt
|
mount /dev/da0s1a /mnt
|
||||||
@@ -279,7 +280,8 @@ tries to determine the media block size dynamically.
|
|||||||
Normally,
|
Normally,
|
||||||
.Nm
|
.Nm
|
||||||
will try to determine dynamically whether the dump was made from an
|
will try to determine dynamically whether the dump was made from an
|
||||||
old (pre-4.4) or new format file system. The
|
old (pre-4.4) or new format file system.
|
||||||
|
The
|
||||||
.Fl c
|
.Fl c
|
||||||
flag disables this check, and only allows reading a dump in the old
|
flag disables this check, and only allows reading a dump in the old
|
||||||
format.
|
format.
|
||||||
@@ -472,8 +474,10 @@ thus a full dump must be done to get a new set of directories
|
|||||||
reflecting the new inode numbering,
|
reflecting the new inode numbering,
|
||||||
even though the contents of the files is unchanged.
|
even though the contents of the files is unchanged.
|
||||||
.Pp
|
.Pp
|
||||||
To do a network restore, you have to run restore as root. This is due
|
To do a network restore, you have to run restore as root.
|
||||||
to the previous security history of dump and restore. (restore is
|
This is due
|
||||||
|
to the previous security history of dump and restore.
|
||||||
|
(restore is
|
||||||
written to be setuid root, but we are not certain all bugs are gone
|
written to be setuid root, but we are not certain all bugs are gone
|
||||||
from the restore code - run setuid at your own risk.)
|
from the restore code - run setuid at your own risk.)
|
||||||
.Pp
|
.Pp
|
||||||
|
|||||||
+6
-3
@@ -46,7 +46,8 @@
|
|||||||
The
|
The
|
||||||
.Nm
|
.Nm
|
||||||
utility is used to manually manipulate the network
|
utility is used to manually manipulate the network
|
||||||
routing tables. It normally is not needed, as a
|
routing tables.
|
||||||
|
It normally is not needed, as a
|
||||||
system routing table management daemon, such as
|
system routing table management daemon, such as
|
||||||
.Xr routed 8 ,
|
.Xr routed 8 ,
|
||||||
should tend to this task.
|
should tend to this task.
|
||||||
@@ -65,7 +66,8 @@ The following options are available:
|
|||||||
Run in debug-only mode, i.e., do not actually modify the routing table.
|
Run in debug-only mode, i.e., do not actually modify the routing table.
|
||||||
.It Fl n
|
.It Fl n
|
||||||
Bypass attempts to print host and network names symbolically
|
Bypass attempts to print host and network names symbolically
|
||||||
when reporting actions. (The process of translating between symbolic
|
when reporting actions.
|
||||||
|
(The process of translating between symbolic
|
||||||
names and numerical equivalents can be quite time consuming, and
|
names and numerical equivalents can be quite time consuming, and
|
||||||
may require correct operation of the network; thus it may be expedient
|
may require correct operation of the network; thus it may be expedient
|
||||||
to forget this, especially when attempting to repair networking operations).
|
to forget this, especially when attempting to repair networking operations).
|
||||||
@@ -356,7 +358,8 @@ the routing tables.
|
|||||||
.Sh DIAGNOSTICS
|
.Sh DIAGNOSTICS
|
||||||
.Bl -diag
|
.Bl -diag
|
||||||
.It "add [host \&| network ] %s: gateway %s flags %x"
|
.It "add [host \&| network ] %s: gateway %s flags %x"
|
||||||
The specified route is being added to the tables. The
|
The specified route is being added to the tables.
|
||||||
|
The
|
||||||
values printed are from the routing table entry supplied
|
values printed are from the routing table entry supplied
|
||||||
in the
|
in the
|
||||||
.Xr ioctl 2
|
.Xr ioctl 2
|
||||||
|
|||||||
+10
-6
@@ -211,9 +211,11 @@ It continues listening to RIP while using Router Discovery
|
|||||||
if multi-homed to ensure all interfaces are used.
|
if multi-homed to ensure all interfaces are used.
|
||||||
.Pp
|
.Pp
|
||||||
The Router Discovery standard requires that advertisements
|
The Router Discovery standard requires that advertisements
|
||||||
have a default "lifetime" of 30 minutes. That means should
|
have a default "lifetime" of 30 minutes.
|
||||||
|
That means should
|
||||||
something happen, a client can be without a good route for
|
something happen, a client can be without a good route for
|
||||||
30 minutes. It is a good idea to reduce the default to 45
|
30 minutes.
|
||||||
|
It is a good idea to reduce the default to 45
|
||||||
seconds using
|
seconds using
|
||||||
.Fl P Cm rdisc_interval=45
|
.Fl P Cm rdisc_interval=45
|
||||||
on the command line or
|
on the command line or
|
||||||
@@ -240,7 +242,7 @@ facility described below to support "legacy" systems
|
|||||||
that can handle neither RIPv2 nor Router Discovery.
|
that can handle neither RIPv2 nor Router Discovery.
|
||||||
.Pp
|
.Pp
|
||||||
By default, neither Router Discovery advertisements nor solicitations
|
By default, neither Router Discovery advertisements nor solicitations
|
||||||
are sent over point to point links (e.g. PPP).
|
are sent over point to point links (e.g.\& PPP).
|
||||||
The netmask associated with point-to-point links (such as SLIP
|
The netmask associated with point-to-point links (such as SLIP
|
||||||
or PPP, with the IFF_POINTOPOINT flag) is used by
|
or PPP, with the IFF_POINTOPOINT flag) is used by
|
||||||
.Nm
|
.Nm
|
||||||
@@ -286,7 +288,8 @@ This is typically used on a gateway to the Internet,
|
|||||||
or on a gateway that uses another routing protocol whose routes
|
or on a gateway that uses another routing protocol whose routes
|
||||||
are not reported to other local routers.
|
are not reported to other local routers.
|
||||||
Notice that because a metric of 1 is used, this feature is
|
Notice that because a metric of 1 is used, this feature is
|
||||||
dangerous. It is more commonly accidentally used to create chaos with a
|
dangerous.
|
||||||
|
It is more commonly accidentally used to create chaos with a
|
||||||
routing loop than to solve problems.
|
routing loop than to solve problems.
|
||||||
.It Fl h
|
.It Fl h
|
||||||
cause host or point-to-point routes to not be advertised,
|
cause host or point-to-point routes to not be advertised,
|
||||||
@@ -514,7 +517,7 @@ To set parameters for remote or external interfaces,
|
|||||||
a line starting with
|
a line starting with
|
||||||
.Cm if=alias(Hname) ,
|
.Cm if=alias(Hname) ,
|
||||||
.Cm if=remote(Hname) ,
|
.Cm if=remote(Hname) ,
|
||||||
etc. should be used.
|
etc.\& should be used.
|
||||||
.Ss Parameters
|
.Ss Parameters
|
||||||
Lines that start with neither "net" nor "host" must consist of one
|
Lines that start with neither "net" nor "host" must consist of one
|
||||||
or more of the following parameter settings, separated by commas or
|
or more of the following parameter settings, separated by commas or
|
||||||
@@ -535,7 +538,8 @@ This parameter must appear by itself on a line.
|
|||||||
The network number must specify a full, 32-bit value, as in 192.0.2.0
|
The network number must specify a full, 32-bit value, as in 192.0.2.0
|
||||||
instead of 192.0.2.
|
instead of 192.0.2.
|
||||||
.Pp
|
.Pp
|
||||||
Do not use this feature unless necessary. It is dangerous.
|
Do not use this feature unless necessary.
|
||||||
|
It is dangerous.
|
||||||
.It Cm ripv1_mask Ns = Ns Ar nname Ns / Ns Ar mask1 , Ns Ar mask2
|
.It Cm ripv1_mask Ns = Ns Ar nname Ns / Ns Ar mask1 , Ns Ar mask2
|
||||||
specifies that netmask of the network of which
|
specifies that netmask of the network of which
|
||||||
.Ar nname Ns / Ns Ar mask1
|
.Ar nname Ns / Ns Ar mask1
|
||||||
|
|||||||
@@ -112,7 +112,8 @@ specify a future time in one of two formats:
|
|||||||
or
|
or
|
||||||
.Ar yymmddhhmm ,
|
.Ar yymmddhhmm ,
|
||||||
where the year, month, and day may be defaulted
|
where the year, month, and day may be defaulted
|
||||||
to the current system values. The first form brings the system down in
|
to the current system values.
|
||||||
|
The first form brings the system down in
|
||||||
.Ar number
|
.Ar number
|
||||||
minutes and the second at the absolute time specified.
|
minutes and the second at the absolute time specified.
|
||||||
.It Ar warning-message
|
.It Ar warning-message
|
||||||
@@ -127,15 +128,18 @@ input.
|
|||||||
.Pp
|
.Pp
|
||||||
At intervals, becoming more frequent as apocalypse approaches
|
At intervals, becoming more frequent as apocalypse approaches
|
||||||
and starting at ten hours before shutdown, warning messages are displayed
|
and starting at ten hours before shutdown, warning messages are displayed
|
||||||
on the terminals of all users logged in. Five minutes before
|
on the terminals of all users logged in.
|
||||||
|
Five minutes before
|
||||||
shutdown, or immediately if shutdown is in less than 5 minutes,
|
shutdown, or immediately if shutdown is in less than 5 minutes,
|
||||||
logins are disabled by creating
|
logins are disabled by creating
|
||||||
.Pa /var/run/nologin
|
.Pa /var/run/nologin
|
||||||
and copying the
|
and copying the
|
||||||
warning message there. If this file exists when a user attempts to
|
warning message there.
|
||||||
|
If this file exists when a user attempts to
|
||||||
log in,
|
log in,
|
||||||
.Xr login 1
|
.Xr login 1
|
||||||
prints its contents and exits. The file is
|
prints its contents and exits.
|
||||||
|
The file is
|
||||||
removed just before
|
removed just before
|
||||||
.Nm
|
.Nm
|
||||||
exits.
|
exits.
|
||||||
|
|||||||
@@ -66,7 +66,8 @@ Autoenable the VJ header compression option, if the other end of the link
|
|||||||
is capable of VJ header compression then it will be used otherwise normal
|
is capable of VJ header compression then it will be used otherwise normal
|
||||||
headers will be used.
|
headers will be used.
|
||||||
.It Fl c
|
.It Fl c
|
||||||
Enable the VJ header compression option. Note that both ends of the link
|
Enable the VJ header compression option.
|
||||||
|
Note that both ends of the link
|
||||||
must be able to use VJ header compression for this to work.
|
must be able to use VJ header compression for this to work.
|
||||||
.It Fl e Ar exit-command
|
.It Fl e Ar exit-command
|
||||||
Specify a command to be invoked within a shell
|
Specify a command to be invoked within a shell
|
||||||
@@ -83,7 +84,8 @@ Turn on cts/rts style flow control on the slip port, by default no flow
|
|||||||
control is done.
|
control is done.
|
||||||
.It Fl l
|
.It Fl l
|
||||||
Disable modem control (CLOCAL) and ignore carrier detect on the slip
|
Disable modem control (CLOCAL) and ignore carrier detect on the slip
|
||||||
port. By default the
|
port.
|
||||||
|
By default the
|
||||||
.Ar redial-command
|
.Ar redial-command
|
||||||
is invoked upon carrier drop and
|
is invoked upon carrier drop and
|
||||||
.Nm
|
.Nm
|
||||||
@@ -91,7 +93,8 @@ aborts if no
|
|||||||
.Ar redial-command
|
.Ar redial-command
|
||||||
is specified.
|
is specified.
|
||||||
.It Fl n
|
.It Fl n
|
||||||
Throw away ICMP packets. The slip interface will ignore ICMP packets
|
Throw away ICMP packets.
|
||||||
|
The slip interface will ignore ICMP packets
|
||||||
to prevent slow lines being saturated by ICMP responses.
|
to prevent slow lines being saturated by ICMP responses.
|
||||||
.It Fl r Ar redial-command
|
.It Fl r Ar redial-command
|
||||||
Specify a command to be invoked within a shell
|
Specify a command to be invoked within a shell
|
||||||
@@ -116,7 +119,8 @@ and
|
|||||||
.Ar new
|
.Ar new
|
||||||
are the slip unit numbers when the line was
|
are the slip unit numbers when the line was
|
||||||
last opened and the unit number of the current slip connection
|
last opened and the unit number of the current slip connection
|
||||||
respectively. The unit number can change after redialing if you are
|
respectively.
|
||||||
|
The unit number can change after redialing if you are
|
||||||
using more than one slip line.
|
using more than one slip line.
|
||||||
When
|
When
|
||||||
.Nm
|
.Nm
|
||||||
@@ -150,7 +154,8 @@ If FRAME_END is not received in
|
|||||||
this amount of time, re-connect occurs.
|
this amount of time, re-connect occurs.
|
||||||
The default value is no timeout.
|
The default value is no timeout.
|
||||||
.It Fl O Ar outfill
|
.It Fl O Ar outfill
|
||||||
Set SLIP "out fill" timeout in seconds. It forces at least one FRAME_END
|
Set SLIP "out fill" timeout in seconds.
|
||||||
|
It forces at least one FRAME_END
|
||||||
to be sent during this time period, which is necessary for the "keep alive"
|
to be sent during this time period, which is necessary for the "keep alive"
|
||||||
timeout on the remote side.
|
timeout on the remote side.
|
||||||
The default value is no timeout.
|
The default value is no timeout.
|
||||||
@@ -185,7 +190,8 @@ To setup
|
|||||||
to redial the phone when carrier is lost, use the
|
to redial the phone when carrier is lost, use the
|
||||||
.Fl r Ar redial-command
|
.Fl r Ar redial-command
|
||||||
option to specify a script or executable that will reconnect the
|
option to specify a script or executable that will reconnect the
|
||||||
serial line to the slip server. For example, the script could redial
|
serial line to the slip server.
|
||||||
|
For example, the script could redial
|
||||||
the server and log in, etc.
|
the server and log in, etc.
|
||||||
.Pp
|
.Pp
|
||||||
To reconfigure the network interface in case the slip unit number
|
To reconfigure the network interface in case the slip unit number
|
||||||
@@ -198,8 +204,10 @@ where
|
|||||||
and
|
and
|
||||||
.Ar new
|
.Ar new
|
||||||
are the slip unit numbers before and after
|
are the slip unit numbers before and after
|
||||||
reconnecting the line. The unit number can change if you have more
|
reconnecting the line.
|
||||||
than one line disconnect at the same time. The first to succeed in
|
The unit number can change if you have more
|
||||||
|
than one line disconnect at the same time.
|
||||||
|
The first to succeed in
|
||||||
reconnecting will get the lowest unit number.
|
reconnecting will get the lowest unit number.
|
||||||
.Pp
|
.Pp
|
||||||
To kill
|
To kill
|
||||||
@@ -240,7 +248,8 @@ The
|
|||||||
.Nm
|
.Nm
|
||||||
utility
|
utility
|
||||||
also logs failure to set the controlling terminal or failure to install
|
also logs failure to set the controlling terminal or failure to install
|
||||||
signal handlers. Upon connection and redial the ttyname and baud rate
|
signal handlers.
|
||||||
|
Upon connection and redial the ttyname and baud rate
|
||||||
are logged and on shutdown the ttyname is logged.
|
are logged and on shutdown the ttyname is logged.
|
||||||
.Sh FILES
|
.Sh FILES
|
||||||
.Bl -tag -width /usr/share/examples/slattach/* -compact
|
.Bl -tag -width /usr/share/examples/slattach/* -compact
|
||||||
|
|||||||
@@ -117,11 +117,11 @@ In the latter case, the use of an authentication protocol will be
|
|||||||
turned off for the named interface.
|
turned off for the named interface.
|
||||||
This has the side-effect of
|
This has the side-effect of
|
||||||
clearing the other authentication-related parameters for this
|
clearing the other authentication-related parameters for this
|
||||||
interface as well (i.e. system name and authentication secret will
|
interface as well (i.e., system name and authentication secret will
|
||||||
be forgotten).
|
be forgotten).
|
||||||
.It Va myauthproto Ns Li = Ns Ar protoname
|
.It Va myauthproto Ns Li = Ns Ar protoname
|
||||||
Same as above, but only for my end of the link.
|
Same as above, but only for my end of the link.
|
||||||
I.e. this is the
|
I.e., this is the
|
||||||
protocol when remote is authenticator, and I am the peer required to
|
protocol when remote is authenticator, and I am the peer required to
|
||||||
authenticate.
|
authenticate.
|
||||||
.It Va hisauthproto Ns Li = Ns Ar protoname
|
.It Va hisauthproto Ns Li = Ns Ar protoname
|
||||||
@@ -221,7 +221,7 @@ Display the settings for
|
|||||||
.Li bppp0 .
|
.Li bppp0 .
|
||||||
The interface is currently in
|
The interface is currently in
|
||||||
.Em dead
|
.Em dead
|
||||||
phase, i.e. the LCP layer is down, and no traffic is possible.
|
phase, i.e., the LCP layer is down, and no traffic is possible.
|
||||||
Both
|
Both
|
||||||
ends of the connection use the CHAP protocol, my end tells remote the
|
ends of the connection use the CHAP protocol, my end tells remote the
|
||||||
system name
|
system name
|
||||||
|
|||||||
@@ -121,7 +121,8 @@ the string is used to specify a dial sequence.
|
|||||||
No string written by default.
|
No string written by default.
|
||||||
You can specify several
|
You can specify several
|
||||||
.Fl s Ar stringN
|
.Fl s Ar stringN
|
||||||
arguments to use with each try, f.e. several host phone numbers.
|
arguments to use with each try, f.e.
|
||||||
|
several host phone numbers.
|
||||||
.It Fl A Ar annexname
|
.It Fl A Ar annexname
|
||||||
The
|
The
|
||||||
.Nm
|
.Nm
|
||||||
@@ -144,11 +145,13 @@ Disable modem control (waiting for carrier and carrier drop sense) for
|
|||||||
.Ar device .
|
.Ar device .
|
||||||
Modem control is enabled by default.
|
Modem control is enabled by default.
|
||||||
.It Fl U Ar upscript
|
.It Fl U Ar upscript
|
||||||
Specify a script to run when a SLIP interface becomes connected. This may
|
Specify a script to run when a SLIP interface becomes connected.
|
||||||
|
This may
|
||||||
contain
|
contain
|
||||||
.Xr ifconfig 8 ,
|
.Xr ifconfig 8 ,
|
||||||
.Xr route 8 ,
|
.Xr route 8 ,
|
||||||
and other appropriate commands. The arguments that
|
and other appropriate commands.
|
||||||
|
The arguments that
|
||||||
are passed to the script are "slX up".
|
are passed to the script are "slX up".
|
||||||
Default value is
|
Default value is
|
||||||
.Pa /sbin/ifconfig .
|
.Pa /sbin/ifconfig .
|
||||||
@@ -158,8 +161,10 @@ passed via
|
|||||||
.Ev LINE
|
.Ev LINE
|
||||||
environment variable.
|
environment variable.
|
||||||
.It Fl D Ar downscript
|
.It Fl D Ar downscript
|
||||||
Specify a script to run when a SLIP connection goes away. The arguments that
|
Specify a script to run when a SLIP connection goes away.
|
||||||
are passed to the script are "slX down". Default value is
|
The arguments that
|
||||||
|
are passed to the script are "slX down".
|
||||||
|
Default value is
|
||||||
.Pa /sbin/ifconfig .
|
.Pa /sbin/ifconfig .
|
||||||
Dial sequence number (see
|
Dial sequence number (see
|
||||||
.Fl s )
|
.Fl s )
|
||||||
|
|||||||
+531
-259
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user