Storage and File System AdministrationCommands and Utilities lvsync Synchronize stale mirrors in LVM logical volumes The mkfdmn command Tru64 UNIX The mkfdmn command creates a domain, a
Trang 1Storage and File System Administration
Commands and Utilities
lvsync Synchronize stale mirrors in LVM logical volumes
The mkfdmn command (Tru64 UNIX)
The mkfdmn command creates a domain, a logical construct containing both physical volumes (disks or disk partitions) and filesets You must specify one volume when you create a domain This can be an LSM volume
The mkfset command (Tru64 UNIX)
The mkfset command creates an AdvFS fileset within an existing domain There can be more than one fileset
in a domain unless that fileset is enabled for the data management API (DMAPI) You can mount and unmount each fileset independently of the other filesets in the domain You can assign fileset quotas (block and file usage limits) to filesets
A domain is not active until it has a mounted fileset
The mkfs command (HP-UX)
The HP-UX mkfs command creates a file system; the file system type is specified with the -F option
The mount command (HP-UX and Tru64 UNIX)
The mount command is used to mount a file system, that is, to attach a file system to a directory (a
mountpoint) so that the files on the mounted file system can be accessed The file systems are unmounted with the umount command
Using the mount command without any options or arguments displays the currently mounted file systems.The options for this command vary between both operating systems; for example, the -F option under the HP-UX operating system specifies the file system type; under Tru64 UNIX, the option is -t See the
appropriate reference page for more information
The mount_hfs and mount_vxfs commands (HP-UX)
The mount_hfs and mount_vxfs commands are wrappers for the HP-UX mount command They are used to mount an HFS file system and a VxFS file system, respectively
The newfs command (HP-UX and Tru64 UNIX)
The newfs command is used to create a new file system on a disk Specifically, the HP-UX version of this command creates an HFS or VxFS file system, as designated with the -F option, on a disk The Tru64 UNIX version creates a UFS file system on either a whole disk or a disk partition
The options for this command differ from one operating system to the other See the corresponding reference page for additional information
The newfs_hfs and newfs_vxfs commands (HP-UX)
The newfs_hfs and newfs_vxfs commands are wrappers for the HP-UX newfs command They create an HFS file system and a VxFS file system, respectively
The pfs_mount command (HP-UX)
The pfs_mount command is used to mount a CD-ROM
Trang 2Storage and File System Administration
Commands and Utilities
The pv* commands (HP-UX)
The following commands are available for LVM operations on physical volumes:
pvchange Change characteristics and access path of physical volume in LVM volume group
pvck Check or repair a physical volume in LVM volume group
pvcreate Create physical volume for use in LVM volume group
pvdisplay Display information about LVM physical volumes within LVM volume group
pvmove Move allocated physical extents from one LVM physical volume to other physical volumes
pvremove Remove LVM data structure from a physical volume
The quotacheck command (HP-UX and Tru64 UNIX)
The quotacheck command examines each of the specified file systems, building a table of current disk usage, then compares this table against the table stored in the disk quota file for the file system Both the quota file and the current system copy of the incorrect quotas are updated if any inconsistencies are detected
The available options for this command differ between HP-UX and Tru64 UNIX For example, the option to specify the file system type under HP-UX is -F; under Tru64 UNIX, the same capability requires the -t
option
System Information utility (dxsysinfo) (Tru64 UNIX)
Use the System Information graphical user interface, dxsysinfo, for the following tasks:
• To obtain general information about the operating system and its version
• To display the amount of RAM used, and number of CPUs
• To monitor CPU activity, in-use memory, available swap space, and file system usage
• To set and modify file system thresholds
The swapon command (HP-UX and Tru64 UNIX)
Under HP-UX, the swapon command enables devices or file systems on which paging is to take place; swap devices are listed in the /etc/fstab file Under Tru64 UNIX, the swapon command is used to specify
additional disk partitions for paging and swapping; swap partitions are specified in the /etc/sysconfigtab
file
The swapinfo command (HP-UX)
The swapinfo command displays information about device and file system paging space
The tunefs command (HP-UX and Tru64 UNIX)
Use the tunefs command to alter dynamic parameters that affect the file system layout policies under HFS and UFS
The umount command (HP-UX and Tru64 UNIX)
The umount command unmounts a file system
Trang 3Storage and File System Administration
Commands and Utilities
The vdf command (Tru64 UNIX)
The vdf utility displays information about the disk usage of AdvFS file domains and filesets In addition, the utility computes and displays the sizes of metadata files in a domain or fileset
The vg* commands (HP-UX)
The following commands are available for LVM operations on volume groups:
vgvcfgbackup Create or update LVM volume group configuration backup file
vgvcfgrestore Display or restore LVM volume group configuration from backup file
vgchange Set LVM volume group availability
vgchgid Modify the Volume Group ID (VGID) on a given set of physical devices
vgdisplay Display information about LVM volume groups
vgexport Export an LVM volume group and its associated logical volumes
vgextend Extend an LVM volume group by adding physical volumes
vgimport Import an LVM volume group onto the system
vgreduce Remove physical volumes from an LVM volume group
vgremove Remove LVM volume group definition from the system
vgscan Scan physical volumes for LVM volume groups
vgsync Synchronize stale logical volume mirrors in LVM volume groups
The voldiskadm utility (Tru64 UNIX)
The voldiskadm utility is an interactive tool that presents a menu of possible operations for LSM disk administration to the user When an operation is selected, the script guides the user through the necessary steps, and prompts for data needed to complete the operation
The vol* commands (Tru64 UNIX)
The following commands are also available for LSM operations:
volassist Interface to create, mirror, back up, grow, shrink, and move LSM volumes
voldctl Controls the Logical Storage Manager volume configuration daemon
voldg Manages Logical Storage Manager disk groups
voldisk Defines and manages Logical Storage Manager disks
voldiskadd Adds one or more disks for use with the Logical Storage Manager
voldisksetup Sets up a disk for use with the Logical Storage Manager (LSM)
voledit Creates, removes, and modifies Logical Storage Manager (LSM) records
Trang 4Storage and File System Administration
Commands and Utilities
volinfo Print accessibility and usability of volumes
volinstall Sets up Logical Storage Manager (LSM) environment after LSM installation
voliod Starts, stops, and reports on Logical Storage Manager kernel I/O daemons
vollogcnvt Logical Storage Manager BCL-to-DRL logging conversion utility
volmake Create Logical Storage Manager objects
volmend Mends simple problems in configuration records
volmigrate, volunmigrate
Moves AdvFS domain storage from physical storage to LSM volumes (volmigrate) or from LSM volumes to physical storage (volunmigrate)
volmirror Mirrors volumes on a disk or control default mirroring
volnotify Displays Logical Storage Manager configuration events
volplex Perform Logical Storage Manager operations on plexes
volprint Displays records from the Logical Storage Manager configuration
volreattach Reattaches disk drives that have once again become accessible
volrecover Performs volume recovery operations
volrestore Restores a complete or partial Logical Storage Manager (LSM) configuration
volrootmir Creates mirror of areas necessary for booting on a new disk
volsave Saves a Logical Storage Manager (LSM) configuration
volsd Perform Logical Storage Manager operations on subdisks
volsetup, lsmsetup
Initializes Logical Storage Manager (LSM) by creating the rootdg disk group
volstat Logical Storage Manager statistics management utility
voltrace Trace operations on volumes
volume Performs Logical Storage Manager operations on volumes
volunmigrate Moves AdvFS domain storage from LSM volumes to physical storage (volunmigrate)
volunroot Remove Logical Storage Manager hooks for rootable volumes
volwatch Monitors the Logical Storage Manager (LSM) for failure events and performs hot sparing
The vxdiskadm command (HP-UX)
The vxdiskadm command provides a menu-driven interface to perform common VxVM disk administration tasks The vxdiskadm command is an interactive script that prompts you for responses and supplies default values where appropriate
The vxtunefs command (HP-UX)
The vxtunefs commands sets or prints tunable I/O parameters of mounted file systems; this command can set parameters describing the I/O properties of the underlying device, the parameters to indicate when to treat an I/O as direct I/O, or the parameters to control the extent allocation policy for the specified file system
Trang 5Storage and File System Administration
Commands and Utilities
The vx* commands (HP-UX)
The following commands are available for LVM operations:
vxdiskusg Generate VxFS disk accounting data by user ID
vxdump, rvxdump Incremental VxFS file system dump, local or across network
vxenablef Enable VxFS DMAPI or OnLineJFS functionality in the kernel
vxfsconvert Convert a file system to a VxFS file system
vxlicense VxFS and VxVM licensing key utility
vxrestore, rvxrestore
Restore file system incrementally, local, or across network
vxupgrade Upgrade the disk layout of a VxFS file system
Trang 6Storage and File System Administration
Commands and Utilities
Trang 714 System Startup and Shutdown
The most basic operations for the System Administrator are the start up and the shut down of the operating system This chapter discusses these operations and their associated topics
The processing of booting the operating system, either normally or interactively, differs between the
operating systems; however, the run levels and methods for system shutdown are very similar
Trang 8System Startup and Shutdown
Normal Startup
Normal Startup
This section describes the simplified system start-up procedures for both the HP-UX and Tru64 UNIX operating systems These procedures differ between the HP-UX and Tru64 UNIX operating systems because they stem from the boot firmware, which was developed independently
HP-UX
Automatic boot processes on various HP-UX systems follow a similar, general sequence
The normal start-up process from a cold start executes three software components: the Processor Dependent Code (PDC), which initiates the Initial System Loader (ISL), which in turn starts the hpux secondary system loader for bootstrap
Finally, the loaded image displays numerous configuration and status messages and passes control to the init process At this point, the HP-UX init process reads the /etc/inittab file to complete initialization
Processor Dependent Code
The Processor Dependent Code (PDC) is the firmware that implements all processor dependent functionality, including the initialization and self-test of the processor The PDC is activated when the HP-UX system processor is powered on or when the system Reset button is pressed
This firmware gives the system administrator the option to override the autoboot sequence by pressing the
Esc key A message resembling the following usually appears on the console
(c) Copyright, Hewlett-Packard Company,
All rights reserved.
PDC ROM rev xxx.x
xx MB of memory configured and tested.
Selecting a system to boot.
To stop selection process, press and hold the ESCAPE key
On completion, the PDC loads and transfers control to the Initial System Loader utility
See the pdc (1M) reference page for additional information.
Initial System Loader utility
The Initial System Loader utility (ISL) is the operating system independent portion of the bootstrap process
on an HP system It is loaded and executed after self-test and initialization have completed successfully When control is transferred to the ISL, an autoboot sequence takes place, which allows a complete bootstrap operation to occur without intervention from the operator While an auto-boot sequence occurs, ISL finds and executes the autoexecute file that requests that hpux, the next component, be run with the appropriate arguments The console displays messages like the following:
Booting from: scsi.x HP aaaa
Hard booted.
ISL Revision A.xx.xx date
ISL booting hpux boot disk(;0)/stand/vmunix
See the isl (1M) reference page for additional information.
Secondary System Loader Utility, hpux
The Secondary System Loader, hpux, displays the load image’s device file, as well as the TEXT size, DATA size, the BSS size, and start address of the load image before control passes to the image Here is an example
Trang 9System Startup and Shutdown
Normal Startup
Booting disk(scsi.x;0)/stand/vmunix
966616+397312+409688 start 0x6c50
See the hpux (1M) reference page for additional information.
The setboot utility
The HP-UX operating system offers a utility that enables you to display and modify variables that influence the boot sequence, so that you do not need to bring the system down These variables reside in an area of high-reliability memory called “stable storage.” This storage contains the boot path information along with other critical file system parameters even if the storage card is removed from the backplane After the initial memory controller is initialized, the processor-dependent code (PDC) accesses stable storage to determine the boot device and console selection process; this information consists of the following:
• the primary boot path
• the alternate boot path
• whether the autosearch sequence is enabled or disabled
• whether the autoboot sequence is enabled or disabled
The setboot utility provides option flags for setting this information To read the current values, enter the setboot utility without any options or parameters, as shown here:
The factory default action is to halt the system after the system after the system self-test and leave the console device in SRM console mode Setting the auto_action SRM environment variable to the value boot
allows you to continue booting the operating system using the default SRM parameters Enter the following command at the SRM console prompt to determine the current setting of the auto_action SRM environment variable:
>>> show auto_action
The response indicates either halt or boot Use the set SRM console command to change the setting as needed You can change these settings with the consvar command after Tru64 UNIX has loaded
Enter the boot command to boot the operating system from the SRM console
The boot command shown in the following example boots the operating system to multi-user mode (using the
A flag) from the file /vmunix on the default boot disk
>>>boot -flag A -file vmunix
block 0 of dkb400.4.0.1.2 is a valid boot block
reading xx blocks from dkb400.4.0.1.2
bootstrap code read in
base - xxxxxx, image_start = 0, image_bytes = xxxx
initializing HWRPB at xxxx
Trang 10System Startup and Shutdown
Normal Startup
initializing page table at xxxxxxxx
setting affinity to the primary CPU
jumpstrap to bootstrap code
manual (released with Version 5.1B)
The consvar utility
The Tru64 UNIX consvar utility enables you to manipulate the firmware console environment variables from the operating system level You can have the option of saving the SRM console environment variables in volatile memory with the -s option or in non-volatile memory with the -a option The -l option enables you to list the current values of the console environment variables, as shown here; the -d option lists the system and exception database information
Trang 11System Startup and Shutdown
Interactive Boot
Interactive Boot
With an interactive boot, you can specify a boot device or kernel different from the default This is especially useful for testing a newly configured kernel Also, you have the ability to interact with the firmware to display or set the system firmware parameters These procedures differ between the HP-UX and Tru64 UNIX operating systems because they stem from the boot firmware, which was developed independently
Selecting a system to boot
To stop selection process, press and hold the ESCAPE key
Selection process stopped
Searching for Potential Boot Devices
To terminate search, press and hold the ESCAPE key
Device Selection Device Path Device Type
-
P0 scsi.x.0 device type for p0
P1 scsi.y.0 device type for p1
P2 lan.ffffff-ffffff.f.f device type for p2
b) Boot from specified device
s) Search for bootable devices
a) Enter Boot Administration mode
x) Exit and continue boot sequence
Select from menu:
The system automatically searches the SCSI busses, the local area network (LAN), and other possible interfaces for all potential boot devices and lists them in table form
The PDC also provides a menu of options in the event you wanted to perform some task other than boot the system
You need to specify option b to boot the system You also need to specify the device shown in the Device Selection column that contains the program to be booted and the name of that program, usually isl The Initial System Loader utility controls the loading of the operating system The following example shows how
to boot the ISL from device P2:
Select from menu: b p0 isl
The system displays first a few messages, then the ISL prompt At this point, you have the following
Trang 12System Startup and Shutdown
See the hpux (1M) reference page for additional information.
To continue booting to single-user mode, enter the following command:
ISL>hpux -is
The i option to the hpux utility passes its argument to the init process; this argument specifies the run level; run levels are described in “Run Levels” on page 302 In this example, the string s indicates single user mode Continuing the example, the output from the hpux utility resembles the following:
Boot
: disk(scsi.x;0)/stand/vmunix
xxxxxx+yyyyyy+zzzzzz start 0xnnnn
Kernel Startup Messages Omitted
INIT: Overriding default level with level ‘s’
INIT: SINGLE USER MODE
WARNING: YOU ARE SUPERUSER!!
#
Usually the system administrator invokes the init utility with run level 2 or 3 to start multi-user mode
See the Operator’s Guide for your processor for more information.
Tru64 UNIX
A Tru64 UNIX system can be booted from a number of devices including a local system disk, a DVD/CD-ROM drive, a disk connected to the system through a CIPCA adapter, by Ethernet from a remote disk on a remote system, or a bootable tape
When a Tru64 UNIX system is booted, the SRM console is activated Its factory default setting is to halt the system after its self-test and to remain in SRM console mode, which enables you to perform any of the following:
• to boot the default operating system from the default boot device
• to boot a newly configured kernel
• to boot from another disk
• to boot from a bootable tape
• to display or set an SRM console variable; the Tru64 UNIX consvar command also enables you to display
or set these console variables; see the consvar(8) reference page for more information
The remainder of this section describes how to interact with the SRM console to establish a default boot device
You can direct the SRM console to boot the operating system automatically on powering up the system or on restart The auto_action environment variable can be set to either halt or boot Use the set command as follows for the automatic boot-up feature The boot sequence uses the set values of the SRM console
environment variables to determine the boot parameters
>>>set auto_action boot
Trang 13System Startup and Shutdown
dd is the two-letter designator for a port or class device driver, usually:
dk SCSI drive or CD-ROM
a specifies the adaptor number
u specifies the device unit number For SCSI devices, this is 100 times the bus node number;
for MSCP devices, this is a unique increasing value
n identifies the bus node number
c is the channel or PCI function number; this is meaningful only for multi-channel or
multi-function devices
s specifies the device’s logical slot number The show config command displays the logical
slot numbers for devices in a system
h is the device’s hose number
Be sure to select the boot device that is appropriate for the media for the operating system The show boot*
command displays the boot environment variables Verify the current setting of the bootdef_dev
environment variable and, if necessary, change it with the set command In the following example, there is
no default boot device and the set command is used to set the default boot device to device dkb100:
Use the boot command to boot the operating system
See the Firmware Reference manual for your processor for additional information on the SRM console.
Trang 14System Startup and Shutdown
S Single User State with only
essential system services (NOTE: with this run level, the console is maintained at the tty where init was run)
Single User State with only essential system services
(NOTE: with this run level the console is maintained at the tty as defined by the
CONSOLE SRM environment variable
s Single User State with only
essential system services
Single User State with only essential system services
1 Starts a subset of essential
system processes; the file systems in /etc/fstab are mounted It can also be used
to perform system administration tasks
N/A
2 The operating mode is
typically called "multi-user state" This mode allows all users to access the system
Network and NFS client are enabled
Multi-User Mode without Network Services
3 Multi-User Mode NFS and
X Server enabled In this mode, NFS file systems can
be exported, as required for NFS servers
Multi-User Mode with Network Services
4 For HP VUE users In this
mode, HP VUE is active
Trang 15System Startup and Shutdown
System Shutdown
System Shutdown
With both operating systems, you can use either the shutdown command or a graphical utility to shutdown the system
The shutdown command (HP-UX and Tru64 UNIX)
The shutdown commands for both operating systems are similar; the most often used options (-h and -r) appear in both There are differences in the options to the command line for system shutdown are
Graphical Utilities
HP-UX
You can shut down the system through the HP-UX SAM utility as follows:
1 Select the Routine Tasks icon
-h Shut down system and halt -h Shut down the system or cluster and
halt
-r Shut down the system and reboot -r Shut down the system and reboot
-y Do not require any interactive
responses
-b Send shutdown message to the rwalld
daemon on remote client hosts that have mounted NFS file systems
-o In a diskless cluster environment, shut
down the server only, but do not reboot
the clients
-f Fast shut down
-k Send message to users without shutting
down the system
-n Bypasses normal disk synchronization
before shutting down
-s Executes the stop entry point of the
run-level transition scripts in
/sbin/rc0.d/Knn_name, /bin/rc2.d/Knn_name, and
/sbin/rc0d/K45syslog
Trang 16System Startup and Shutdown
System Shutdown
The Routine Tasks window opens
Trang 17System Startup and Shutdown
System Shutdown
2 Select the System Shutdown icon The System Shutdown dialog box opens
3 Select the appropriate options, then select OK
Tru64 UNIX
The Tru64 UNIX SysMan Menu also provides a graphical utility for shutting down the system
1 Select General Tasks from the SysMan Menu The General Tasks menu expands
Trang 18System Startup and Shutdown
System Shutdown
2 Select Shutdown the system The Shutdown Window opens
3 Choose the Shutdown type from the menu The choices are:
4 Slide the selector to set the number of minutes until shutdown; the setting of 0 is equivalent to “now”
5 Enter the shutdown message, which will be broadcast to the currently logged-in users
6 You have the option of specifying whether to broadcast the message to NFS clients, execute run level transition shell scripts, running a specified shell script before the actual shutdown occurs, and either a fast shutdown or one in which the disks are not synchronized with the superblock before shutdown
7 Select Shutdown