vlsnpg(8) [osf1 man page]
vlsnpg(8) System Manager's Manual vlsnpg(8) NAME
vlsnpg - displays the LSN of a page of the log SYNOPSIS
/sbin/advfs/vlsnpg special [page_LBN] OPERANDS
Specifies the volume on which the page is located. Specifies the logical block number (LBN) of the requested page; the default is zero. DESCRIPTION
Given the device and the LBN, the vlsnpg utility displays the logical sequence number of the page of the log. The page takes on the logical sequence number (LSN) of its first record. Use this command in a script to loop through logical sequence numbers for several pages to find the end of the log. RESTRICTIONS
You must have root user privileges to access this command. SEE ALSO
advfs(4) vlsnpg(8)
Check Out this Related Man Page
nvlogpg(8) System Manager's Manual nvlogpg(8) NAME
nvlogpg - Display the log file of an AdvFS file domain SYNOPSIS
/sbin/advfs/nvlogpg log_id /sbin/advfs/nvlogpg [-v | -B] log_id page [record_offset [-f]] /sbin/advfs/nvlogpg [-v | -B] log_id { -R | -a } /sbin/advfs/nvlogpg [-v | -B] log_id { -s | -e } [page_offset] /sbin/advfs/nvlogpg domain_id | volume_id -d dump_file /sbin/advfs/nvlogpg [-v | -B] volume_id -b block OPTIONS
Specifies that all the pages in the log file be displayed. Brief. Specifies that only the transaction id for each log file entry be dis- played. Specifies the logical block number of a disk block on an AdvFS volume. Specifies the name of a file that will hold the contents of the specified log file. Specifies that the last active record in the log file--the end of the log file--is to be displayed. Specifies that all subtransactions of the parent transaction are to be followed. Specifies that the first active record in the log file--the start of the log file--is to be displayed. Verbose. Display all the data in a specified log, page, or record. OPERANDS
Specifies a log file in an AdvFS domain or a log file that has been saved by the utility as a dump_file. Use the following format: Specify the -F option to force the utility to interpret the name you supply as a file name. Specifies an AdvFS file domain using the following format: By default, the utility opens all volumes using block device special files. Specify the -r option to operate on the raw device (character device special file) of the domain instead of the block device. Specify the [-D] option to force the utility to interpret the name you supply in the domain argument as a domain name. Specifies an AdvFS volume using the following format: Specify the -V option to force the utility to interpret the name you supply in the volume argument as a volume name. The volume name argument also can be a full or partial path for the volume, for example /dev/disk/dsk12a or dsk12a. Specifying a partial path name always opens the character device spe- cial file. Alternatively, specify the volume by using arguments for its domain, domain_id, and its volume index number, volume_index. Speci- fies the name of a file that contains the output from this utility. Specifies the file page number of a file. Specifies the offset relative to the start or the end of the active region in the log file. Specifies a byte offset in a page of the log file. DESCRIPTION
The nvlogpg command locates the log file of an AdvFS file domain and displays records from it in various ways. The log file for a domain is a bitfile, organized as an array of 8 Kbyte disk pages. Each page consists of a fixed-size header record, a number of variable-sized data records, and a fixed-size trailer record. Each data record consists of a fixed-size header and a variable amount of data. The log file for a domain contains the metadata, the log, of each transaction. Before a transaction is written to disk, its logged meta- data is written to disk. Because the log of a transaction contains the information necessary to redo the transaction, the file system can maintain consistency on disk and recover from system failures when they occur. These transactions and the metadata they include are used to replay transactions that did not complete, for example if the system crashed, when the domain is next activated. Displaying a Summary You can specify a domain or volume name to display a summary of the log file that includes its location, size, and the location of its starting and ending records. For example, to display a summary of the log file for domain domain_1, enter the following command: # /sbin/advfs/nvlogpg domain_1 Displaying Log File Pages and Records There are several ways you can specify log file pages and records. To display page five of a log file for a domain that you know is on device rz5a, enter the following command: # /sbin/advfs/nvlogpg rz5a 5 To display the record at byte offset 234 in page seven of the log file in the domain named domain_1, enter the following command: # /sbin/advfs/nvlogpg domain_1 7 234 You can use the command to find the start or the end of the active log. The start of the log is the first record whose data is not yet written to the metadata files. The end of the log is the last record that has been written to the log. For example, to display the first record in domain domain_1 whose record is not yet written to metadata files, enter the following command: # /sbin/advfs/nvlogpg domain_1 -s To display the end of the log in domain domain_1--the last record that has been written to the log--enter the following command: # /sbin/advfs/nvlogpg domain_1 -e You can use the utility to display pages and records that are before or after the start or the end of the active log. For example, to dis- play the second page after the start of the log file for domain_1, enter the following command: # /sbin/advfs/nvlogpg domain_1 -s 2 To display the page before the end of the log for domain_1, enter the following comand: # /sbin/advfs/nvlogpg domain_1 -e -1 To display the record at byte offset 234 on the page of the log that holds the last log record in the log file for domain_1, enter the fol- lowing command: # /sbin/advfs/nvlogpg domain_1 -e 0 234 The page offset is relative to the page that contains the start and end records of the log file. Note that the record offset is relative to the specified page. Following a Transaction The utility can follow the log records that belong to one transaction. For example, you can follow a set of log records from one transac- tion by specifying a record and the -f option. Specify one particular log record and specify the -f option. For example, to display the log record at page 1, byte offset 128, and all the following records that belong to the same transaction, enter: # /sbin/advfs/nvlogpg domain_1 1 128 -f Because the -S option also specifies one record, the -f option can be used with it. For example: # /sbin/advfs/nvlogpg domain_1 -s -f Saving and Examining the Log File You can use the command to write the log file to another file, a dump_file, and later use the command to examine it. For example, you can extract the log file for domain domain_1 and write it to a file named domain_1_log by entering the following command: # /sbin/advfs/nvlogpg domain_1 -d domain_1_log Later, you can examine the log file you extracted. You use the same command syntax on the file as you did for the log in the domain, except you use the -F option to force the utility to interpret the name as a file name, in case there is a domain or volume with the same name. For example, you can display a summary of the file, domain_1_log by entering the following command: # /sbin/advfs/nvlogpg -F domain_1_log NOTES
An active domain, which is a domain with one or more of its filesets mounted, has all of its volumes opened using block device special files. These devices cannot be opened a second time without first being unmounted. However, the character device special files for the volumes can be opened more than once while still mounted. It can be misleading to use this utility on a domain with mounted filesets because the utility does not synchronize its read requests with AdvFS file domain read and write requests. For example, the AdvFS can be writing to the disk as the utility is reading from the disk. Therefore, when you run the utility, metadata may not have been flushed in time for the utility to read it and consecutive reads of the same file page may return unpredictable or con- tradictory results. [The domain is not harmed.] To avoid this problem, unmount all the fileset in the domain before using this utility. RESTRICTIONS
The utility can fail to open a block device, even when there are no filesets mounted for the domain and the AdvFS daemon, advfsd, is run- ning. The daemon, as it runs, activates the domain for a brief time. If the nvlogpg utility fails in this situation, run it again. EXIT STATUS
The utility returns a 0 (zero) on success, otherwise it returns a nonzero value and an error diagnostic. FILES
Specifies the command path. Specifies the volumes in the domain. SEE ALSO
Commands: nvbmtpg(8), nvfragpg(8), tag2name(8), vfilepg(8), vsbmpg(8) Files: advfs(4) nvlogpg(8)