Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../usr/man/man8/sysobjadm.8
Real path: /usr/share/man/man8/sysobjadm.8
Zurück
'\" te .\" Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. .TH sysobjadm 8 "22 April 2019" "Oracle Solaris 11.4" "System Administration Commands" .SH NAME sysobjadm \- administrative command for the system object database .SH SYNOPSIS .LP .nf /usr/sbin/sysobjadm [-R \fIrootpath\fR] initialize .fi .LP .nf /usr/sbin/sysobjadm [-R \fIrootpath\fR] restore [-l] [-f \fIfile\fR] [\fIname\fR] .fi .LP .nf /usr/sbin/sysobjadm [-R \fIrootpath\fR] regenaux .fi .LP .nf /usr/sbin/sysobjadm [-R \fIrootpath\fR] dump [search] .fi .LP .nf /usr/sbin/sysobjadm [-R \fIrootpath\fR] dump [class] .fi .LP .nf /usr/sbin/sysobjadm [-R \fIrootpath\fR] \fIdevice-list\fR [-P] [-I] [-i] [-a] [-u \fIuuid\fR | -p \fIpath\fR | -d \fIdriver\fR] .fi .LP .nf /usr/sbin/sysobjadm [-R \fIrootpath\fR] device-remove -u \fIuuid\fR | -p \fIpath\fR | -d \fIdriver\fR [-i] .fi .LP .nf /usr/sbin/sysobjadm [-R \fIrootpath\fR] device-set-instance -u \fIuuid\fR | -p \fIpath\fR <\fIinstance\fR> .fi .SH DESCRIPTION .sp .LP The \fBsysobjadm\fR command is the administrative command that interacts with the system object daemon (\fBsysobjd\fR) and the system object database itself. .sp .LP The subcommands that deal with initializing or restoring the database should not be necessary under normal system operation. Unless an alternate root is specified, they should not be run while \fBsysobjd\fR is running; \fBsysobjadm\fR checks for this. .sp .LP Additionally, a reboot is required after running most of these subcommands if no alternate root is specified. Normally, the expected sequence of commands for the initialize and restore commands is: .sp .in +2 .nf # \fBsvcadm disable -t sysobj\fR [if the sysobj SMF service is running] # \fBsysobjadm {backup|restore} ...\fR # \fBreboot\fR .fi .in -2 .sp .SH OPTIONS .sp .LP The following global option is supported: .sp .ne 2 .mk .na \fB\fB-R\fR\fR .ad .RS 6n .rt Specifies an alternate root path (base dir) to be used. This can be used to do maintenance of the system object database on a different boot environment. For more information, see the \fBbeadm\fR(8) man page. .RE .SH SUB-COMMANDS .sp .ne 2 .mk .na \fB\fBinitialize\fR\fR .ad .br .sp .6 .RS 4n Creates a new, empty database. .RE .sp .ne 2 .mk .na \fB\fBrestore\fR [\fB-l\fR] [\fB-f\fR \fIfile\fR] [\fIname\fR]\fR .ad .br .sp .6 .RS 4n Restores the database from a backup file. The \fB-l\fR option lists all available backup files created by the standard \fBsysobjd\fR backup mechanism. .sp The backup file can be specified in two ways: .sp .RS +4 .TP .ie t \(bu .el o Through \fB-f\fR <\fBfile\fR> for a non-standard backup file. For example, copied to a non-standard location by the system administrator. .RE .RS +4 .TP .ie t \(bu .el o Using the <\fIname\fR> parameter, which selects a file from the standard location. .RE After restoring the database, all auxiliary files (if any), generated by \fBsysobjd\fR plugins, will be regenerated using the restored database. .RE .sp .ne 2 .mk .na \fB\fBdump\fR [\fIsearch\fR]\fR .ad .br .sp .6 .RS 4n Prints all aliases and properties of system objects. The optional <\fIsearch\fR> parameter specifies the class of objects to be printed. If it is omitted, all objects will be printed. The <\fIsearch\fR> parameter has the same syntax as the search string specified to sysobj_lookup(3SYSOBJ). .sp This subcommand can be run by an unprivileged user, although the user should be aware that not all classes of objects might be accessible without privileges. .RE .sp .ne 2 .mk .na \fB\fBregenaux\fR\fR .ad .br .sp .6 .RS 4n Regenerates any auxiliary files as managed by \fBsysobjd\fR plugins. If the daemon is not running, or an alternate root is specified, \fBsysobjadm\fR loads the plugins itself, and instructs them to rewrite the files. This command can be used if the generated files got out of sync with the database, which is not expected to happen under normal system operation. .RE .SS "DEVICE SUBCOMMANDS" .sp .LP These are the subcommands specified by the \fBsysobj\fR device plugin. These commands are not expected to be used commonly; instead they act as replacements for the rare case where the system administrator might have edited the \fBpath_to_inst\fR file. For more information, see the \fBpath_to_inst\fR(5) man page. Since these commands manipulate vital device metadata, they should be used with care. .sp .LP A 'running device' in this section refers to a situation where the command is executed on the main database ( if \fB-R\fR option is not specified), and the specified device is active. When executed on the current boot environment (for example, without \fB-R\fR option), a reconfigure boot (\fBreboot -- -r\fR) is likely needed to make sure \fB/dev\fR and \fB/devices\fR are in sync. .sp .ne 2 .mk .na \fB\fBdevice-list\fR [\fB-P\fR] [\fB-I\fR] [\fB-i\fR] [\fB-a\fR] [\fB-u\fR \fIuuid\fR | \fB-p\fR \fIpath\fR | \fB-d\fR \fIdriver\fR]\fR .ad .br .sp .6 .RS 4n Lists device objects in the database, prints their UUID, driver, instance and state (active or inactive). If \fB-P\fR option is specified, the device path is printed instead of the UUID. .sp If \fB-I\fR option is specified, the format of \fBpath_to_inst\fR is mimicked, printing the path, driver and instance. The \fB-I\fR flag is mutually exclusive with the \fB-P\fR flag. .sp If \fB-u\fR, \fB-p\fR or \fB-d\fR option is not specified, this will list all device objects, else only devices with the specified UUID, path or driver will be listed. .sp With the \fB-a\fR option, only active devices are listed. With the \fB-i\fR option, only inactive devices (currently not in the system) are listed. Without either of these options, all devices are listed. .sp It is important to note that when the global \fB-R\fR option is specified, the active/inactive state reflects the state the device had when the database in the alternate root path was last active and not the current state. .RE .sp .ne 2 .mk .na \fB\fBdevice-remove\fR \fB-u\fR \fIuuid\fR | \fB-p\fR \fIpath\fR\fR .ad .br .na \fB\fBdevice-remove\fR \fB-d\fR \fIdriver\fR [\fB-i\fR]\fR .ad .br .sp .6 .RS 4n Removes a device from the database, specified by device path or UUID. To remove a running device, the \fBsysobj\fR service must be disabled, and the command should be followed by a reboot. The second form of the command removes all devices with the specified device driver from the database, removing all inactive devices only if \fB-i\fR option is specified. .sp See the \fBdevice-list\fR command for what the device active/inactive state means in the case of the use of the global \fB-R\fR flag. .RE .sp .ne 2 .mk .na \fB\fBdevice-set-instance\fR \fB-u\fR \fIuuid\fR | \fB-p\fR \fIpath\fR <\fIinstance\fR>\fR .ad .br .sp .6 .RS 4n Sets the instance number for a device. If done on an running device, this command should be run with the \fBsysobj\fR service disabled, and followed by a reboot. .RE .SS "DEVICE COMMAND EXAMPLES" .sp .LP This example displays how a number of old device entries can be removed, and then the remaining device instances can be reassigned to have low, contiguous instance numbers. This example uses the USB 'hid' driver as an example, removing old instances of the mouse/keyboard devices. .sp .in +2 .nf # \fBsvcadm disable -t sysobj\fR # \fBsysobjadm device-list -d hid\fR 002f2bf6-bb28-4e6c-b484-9e59e7b376c9 hid 10 inactive 3dbaed01-1165-4003-8ca7-c7c1f0d03c7c hid 12 inactive 41a60dfd-c584-4e47-b370-feae64a06539 hid 13 active 39b2cd4c-ae80-4028-843b-b205629c8e41 hid 9 active # \fBsysobjadm device-remove -d hid -i\fR # \fBsysobjadm device-list -d hid\fR 41a60dfd-c584-4e47-b370-feae64a06539 hid 13 active 39b2cd4c-ae80-4028-843b-b205629c8e41 hid 9 active # \fBsysobjadm device-list -P -d hid\fR /pci@0,0/pci1028,498@1a/hub@1/device@4/input@1 hid 13 active /pci@0,0/pci1028,498@1d/hub@1/device@5/keyboard@0 hid 9 active # \fBsysobjadm device-set-instance -u 41a60dfd-c584-4e47-b370-feae64a06539 0\fR # \fBsysobjadm device-set-instance -u 39b2cd4c-ae80-4028-843b-b205629c8e41 1\fR # \fBreboot\fR [after reboot] # \fBsysobjadm device-list -d hid\fR 41a60dfd-c584-4e47-b370-feae64a06539 hid 0 active 39b2cd4c-ae80-4028-843b-b205629c8e41 hid 1 active .fi .in -2 .sp .sp .LP This example shows how sysobjadm(8) can be used to fix a duplicate instance number problem, if for example two devices have been in error assigned the same instance number. In this case, two sd devices have been assigned the instance number 1. .sp .in +2 .nf # \fBsvcadm disable -t sysobj\fR # \fBsysobjadm device-list -I\fR "/pseudoscsibus/pseudoscsibus@0,0/pseudoscsi@0/sd@0,0" 1 "sd" "/pseudoscsibus/pseudoscsibus@0,0/pseudoscsi@0/sd@1,0" 1 "sd" # \fBsysobjadm device-set-instance -p /pseudoscsibus/pseudoscsibus@0,0/pseudoscsi@0/sd@1,0 2\fR # \fBreboot\fR [ after reboot ] # \fBsysobjadm device-list -I\fR "/pseudoscsibus/pseudoscsibus@0,0/pseudoscsi@0/sd@0,0" 1 "sd" "/pseudoscsibus/pseudoscsibus@0,0/pseudoscsi@0/sd@1,0" 2 "sd" .fi .in -2 .sp .sp .LP This example is the same as above, but illustrates how sysobjadm(8) can be used to repair a duplicate instance assignment on a mounted root image. .sp .in +2 .nf [ mount alternate root image on /mnt ] # \fBsysobjadm -R /mnt device-list -I\fR "/pseudoscsibus/pseudoscsibus@0,0/pseudoscsi@0/sd@0,0" 1 "sd" "/pseudoscsibus/pseudoscsibus@0,0/pseudoscsi@0/sd@1,0" 1 "sd" # \fBsysobjadm -R /mnt device-set-instance -p /pseudoscsibus/pseudoscsibus@0,0/pseudoscsi@0/sd@1,0 2\fR # \fBsysobjadm -R /mnt device-list -I\fR "/pseudoscsibus/pseudoscsibus@0,0/pseudoscsi@0/sd@0,0" 1 "sd" "/pseudoscsibus/pseudoscsibus@0,0/pseudoscsi@0/sd@1,0" 2 "sd" # \fBbootadm update-archive -R /mnt\fR [ unmount alternate root image on /mnt ] .fi .in -2 .sp .sp .LP It is possible to import path_to_inst into sysobj directly. The path_to_inst file can be a known good copy restored from a backup or an updated version of the file provided by the administrator. Note: sysobj will itself import the path_to_inst file on the machine if it determines that the kdevdata file is corrupted or missing. .sp .in +2 .nf # \fBsvcadm disable -t sysobj\fR [ restore or otherwise fix /etc/devices/path_to_inst ] # \fBrm /etc/devices/kdevdata\fR # \fBbootadm update-archive\fR # \fBreboot\fR [ after reboot ] WARNING: kdevdata file bad or not found; falling back to path_to_inst sysobj: inconsistent boot data; regenerating sysobj: rebooting the system .fi .in -2 .sp .sp .LP Bootstrapping is the process of generating a path_to_inst with instance assignments for the set of devices installed on a system. This process is used by Solaris for installation and can also be used as an administrative recovery procedure. .sp .in +2 .nf # \fBsvcadm disable -t sysobj\fR # \fBrm /etc/devices/kdevdata\fR # \fBmv /etc/devices/path_to_inst /etc/devices/path_to_inst.original\fR # \fBecho '#path_to_inst_bootstrap_1' > /etc/devices/path_to_inst\fR # \fBbootadm update-archive\fR # \fBreboot\fR [ after reboot ] WARNING: kdevdata file bad or not found; rebuilding sysobj: inconsistent boot data; regenerating sysobj: rebooting the system .fi .in -2 .sp .SH EXIT STATUS .sp .LP The following exit values are returned: .sp .ne 2 .mk .na \fB\fB0\fR\fR .ad .RS 6n .rt Successful completion. .RE .sp .ne 2 .mk .na \fB\fB>0\fR\fR .ad .RS 6n .rt A fatal error occurred. One or more error messages are displayed on standard error. The exit code is an error code as specified in \fBIntro\fR(2). For invalid command line arguments, \fBEINVAL\fR is returned, and other exit codes depend on the command. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Availability system/core-os _ Interface Stability Evolving .TE .sp .SH SEE ALSO .sp .LP \fBsysobjd\fR(8), \fBlibsysobj\fR(3LIB), \fBsvcadm\fR(8), \fBbeadm\fR(8)