Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

shblk(8) [osf1 man page]

shblk(8)						      System Manager's Manual							  shblk(8)

NAME
shblk - Displays disk blocks, as unformatted hexadecimal numbers SYNOPSIS
/sbin/advfs/shblk [-sb start_block] [-bc block_count] special OPTIONS
Specifies the block on which to start. Specifies the number of blocks to display. OPERANDS
Specifies the device special file for the volume on which the block(s) are located. You can specify the volume by either its character or block device special file name. If you are executing the command from the mount point for the volume, you must specify the character device special file, as speci- fying the block device special file produces a device busy error. DESCRIPTION
The shblk command displays the selected blocks as hexadecimal numbers. The blocks are not formatted to any data or metadata representa- tion. You must be the root user to use this command. EXAMPLES
The following example shows a user whose current file system is mounted on /dev/disk/dsk3a attempting to display block 1 of the a partition on that device. Using the block device special file for the command does not work; using the character device special file does work. The display is truncated on the right due to page width limitations: # /sbin/advfs/shblk -sb 1 -bc 1 /dev/disk/dsk3a open: Device busy # /sbin/advfs/shblk -sb 1 -bc 1 /dev/rdisk/dsk3a 1: 47ff041f c0200002 20009800 00000000 a7a10000 d340000a 43c4153e 4... 1: b7fe0018 47ff0411 47ff0412 d34000e8 00000000 47ff041f 2ffe0000 4... 1: 243d0000 20218050 245d0000 204243e0 b7e10000 40211401 40410524 f... 1: 6bfa8001 47ff041f 2ffe0000 47ff041f 243dffff 23deffe0 20217f90 b... 1: a4410000 b53e0008 b55e0010 b57e0018 e440000b 47f00409 47e1040a 4... 1: a62a0000 47e90410 d34004ad e400000c a42a0008 214a0008 4160300b f... 1: 201fffff a75e0000 a53e0008 a55e0010 a57e0018 23de0020 6b9a8001 2... 1: 47eb0400 c3fffff7 47ff041f 47ff041f 23defff0 43f00011 b75e0000 4... 1: 47ff0412 47ff0413 47ff0414 47ff0415 d3400083 4807f680 a75e0000 4... 1: 40003520 23de0010 6b9a8001 47ff041f 23defff0 b75e0000 b53e0008 4... 1: d340049f 47e00412 47e21410 47e90411 47ff0413 47ff0414 47ff0415 d... 1: 4807d689 45207009 e5200002 201fffff c3e00001 43e00000 a75e0000 a... 1: 23de0010 6b9a8001 47ff041f 47ff041f 23deffe0 b75e0000 b53e0008 b... 1: 47f00409 d3400486 203f03ff 47e0040a 400107a2 4441048a e540000c 2... 1: 47e05410 47ff0411 47e90412 47e03413 47ff0414 47ff0415 d3400051 e... 1: 4140352a 21290001 f55ffff5 a75e0000 a53e0008 a55e0010 23de0020 6... # SEE ALSO
advfs(4), fs(4) shblk(8)

Check Out this Related Man Page

nvbmtpg(8)						      System Manager's Manual							nvbmtpg(8)

NAME
nvbmtpg - Display pages of an AdvFS BMT file SYNOPSIS
/sbin/advfs/nvbmtpg [-R] [-v] { domain_id | bmt_id } [-f] /sbin/advfs/nvbmtpg [-R] [-v] bmt_id page [-f] /sbin/advfs/nvbmtpg [-R] [-v] bmt_id page mcell [-c] /sbin/advfs/nvbmtpg [-R] [-v] bmt_id [-a] /sbin/advfs/nvbmtpg [-R] [-v] domain_id fileset_id [file_id] [-c] /sbin/advfs/nvbmtpg [-R] [-v] { domain_id | volume_id } -l /sbin/advfs/nvbmtpg [-R] [-v] bmt_id -s b block [-c] /sbin/advfs/nvbmtpg [-R] [-v] domain_id fileset_id -s f frag [-c] /sbin/advfs/nvbmtpg [-R] [-v] { bmt_id | domain_id [fileset_id] } -s t tag [-c] /sbin/advfs/nvbmtpg [-R] [-v] volume_id -b block [mcell] /sbin/advfs/nvbmtpg [-R] volume_id -d dump_file OPTIONS
Display all the pages in the BMT. Specifies the logical block number of a disk block on an AdvFS volume. Display the entire chain of mcells. Alternatively, continue to search. Specifies the name of a file that will hold the contents of the specified BMT file. Display the number of free mcells. Display the deferred delete list of mcells. Specifies that information about the Reserved Bitmap Metadata Ta- ble (RBMT) is to be displayed, instead of information about the BMT. Specifies the logical block number of a disk block on an AdvFS vol- ume. When you use this option, the utility searches the specified BMT file for a mcell that has an extent record for a file that contains the specified block. Specifies the number of a file fragment in the frag file for a fileset. When you use this option, the utility searches all BMT files (there is one on each AdvFS volume) for a mcell that: Belongs to a file in the specified fileset Has an attribute record that indicates the file is using the specified frag ID. Specifies the file tag number. When you use this option, the utility searches one or all of the BMT files for a mcell with this tag. Display all the data in a specified mcell. OPERANDS
Specifies the BMT file on an AdvFS volume or a BMT file that has been saved by the utility as a dump_file. Use the following format: Spec- ify 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 an AdvFS fileset using the following format: Specify the [-S] option to force the command to interpret the name you supply as a fileset name. Specify the fileset by entering either the name of the fileset, fileset, or the file's fileset tag number, -T file- set_tag. Specifies a file name in the following format: Specify the file by entering either the fileset relative pathname, file, or the file's tag number, -t file_tag. Specifies the number of a metadata cell (mcell) in a BMT file. Specifies the file page number of the BMT file. DESCRIPTION
The nvbmtpg utility formats, dumps, and displays pages of the Bitfile Metadata Table (BMT) files. For Tru64 UNIX Version 5.0 and beyond, the utility also formats, dumps, and displays pages of the Reserved Bitfile Metadata Table (RBMT) files. RBMT files are metadata structures that extend BMT files. BMTs are composed of mcells. Each file in an AdvFS domain is described by a collection of mcells. The mcells for each file are chained together. The first mcell in a chain is called the primary mcell. There is one BMT file on each volume of an AdvFS domain. A BMT file is an array of 8 Kbyte file pages, each page containing a header and an array of metadata cells (mcells). The purpose of a BMT file is to contain all the metadata for all files that are stored on an AdvFS volume. This utility has the following functions: Display a summary of the BMT on one AdvFS volume or a summary of all the BMT files (there is one per volume) in a domain. Display a page of mcells or one mcell or a chain of mcells. The page can be specified by a BMT page number or a volume block number. An mcell can be specified by a number or by specifying the primary mcell of a file. Search for an mcell. The search can be for an extent that maps a volume block or a file that uses a given frag ID. Display a Summary of BMTs By specifying just a domain and (possibly) the -f option, you cause the utility to display a summary of the BMT on all volumes in the domain. Without the -f option, the summary shows how long the BMT is, in pages. With the -f option, the summary also displays how many free mcells are in the BMT for each volume. For example, the following command causes the utility to read BMT page 0 (zero) in every volume of the domain and display the number of pages in each BMT, the number of extents used to describe the BMT, and the number of free mcells in BMT page 0: # /sbin/advfs/nvbmtpg -r my_domain For example, the following command causes the utility to read the entire BMT in every volume of the domain and display the number of pages in each BMT, the number of extents use, and the number of free mcells in BMT page 0. In addition, the utility displays the number of free mcells not on page 0: # /sbin/advfs/nvbmtpg my_domain -f Specifying just a volume (and possibly the -f option) displays a summary for the BMT on that volume. Two examples are: # /sbin/advfs/nvbmtpg -D my_domain 1 -f # /sbin/advfs/nvbmtpg dsk12c Displaying a BMT Page The utility can display information from a specified BMT page. It can display the whole page or one mcell on a page. It can also display all the mcells on an AdvFS volume. Each AdvFS volume contains its own BMT file, so you must specify the volume and the page to get the page you want to display. For example, to display the first page (page 0) of the BMT on volume /dev/disk/dsk5a, you would enter the following command: # /sbin/advfs/nvbmtpg /dev/disk/dsk5a 0 The volume can also be specified by domain name and volume index. For example, to display page 0 or volume 1 of the domain_1 domain, enter the following command: # /sbin/advfs/nvbmtpg domain_1 1 0 You can specify a single mcell to display. For example, you could display mcell 5 on page 4 of the third AdvFS volume in the file domain domain_1 by entering the following command: # /sbin/advfs/nvbmtpg domain_1 3 4 5 To display all the mcells on dsk5a, enter the following command: # /sbin/advfs/nvbmtpg /dev/disk/dsk5a -a Note This use of the command can generate megabytes of output: use it carefully. Displaying Primary mcells The primary mcell of a file in an AdvFS domain is the first mcell in a chain of mcells that describe the file. The primary mcell for a fileset in an AdvFS domain is the first mcell in a chain of mcells that describes the fileset. Use this utility to locate and display the primary mcell of a file or a fileset. To locate the primary mcell (for either a file or a fileset) you must uniquely identify it in the command line. A fileset can be uniquely identified by its domain and fileset names. A file can be uniquely identified by its domain, fileset, fileset relative path name. For example, you can display the primary mcell for a file file_1 in a directory dir_1 in a fileset fileset_1 in a domain domain_i by enter- ing the following command: # /sbin/advfs/nvbmtpg domain_1 fileset_1 dir_1/file_1 You can also display the primary mcell by its tag number. For example, if the file_1 had a tag number of 5, the command to display the pri- mary mcell for the file would be: # /sbin/advfs/nvbmtpg domain_1 fileset_1 -t 5 Note If there is no danger of confusing tag 5 with a file named 5 in the root directory, then the -t option is optional. Displaying mcell Chains The mcells that describe one BMT file are chained, and are not necessarily contiguous. Use the [-c] option to display these mcell chains. For example, display the entire chain of mcells that describe the file named file_1 in the root directory of the fileset named fileset_1 in the domain named domain_1, enter the following command: # /sbin/advfs/nvbmtpg domain_1 fileset_1 file_1 -c Displaying the Deferred Delete List Each volume in a domain has a linked list of mcells which represent storage to be freed. The -l option displays the mcells in this list. If just the domain is specified, the option displays the deferred delete list for every volume in the domain. For example: # /sbin/advfs/nvbmtpg domain_1 -l If an AdvFS volume is specified, the option displays the deferred delete list for that volume. For example: # /sbin/advfs/nvbmtpg dsk5c -l Displaying Corrupted Volumes If the volume is corrupted, the metadata structure needed to find specific mcells can be missing. In this case, you can specify a disk block and the utility displays a page containing the specified disk block. For example: you have a corrupted AdvFS domain, but you have the logical block number of a BMT page. To display logical block number 1024 on AdvFS volume /dev/disk/dsk5c in AdvFS domain domain, forcing it to be formatted as a BMT page, you use the following command: # /sbin/advfs/nvbmtpg dsk5c -b 1024 For example: you have a corrupted AdvFS domain, but you have a domain and an index number and the logical block number of a BMT page. To display logical block number 1024 on AdvFS volume 2 in AdvFS domain domain, forcing it to be formatted as a BMT page, you use the following command: # /sbin/advfs/nvbmtpg domain 2 -b 1024 Saving a BMT File Use the utility to read the BMT file and save it to another file. Later, you can use the utility to display information from this dump_file. For example, to save the BMT file from volume index 2 in a domain named domain_1 to a file named dump_domain.2 in the current working directory, enter the following command: # /sbin/advfs/nvbmtpg domain_1 2 -d dump_domain.2 Later, you can examine the file dump_domain.2 to obtain a summary of its BMT pages, by entering the following command: # /sbin/advfs/nvbmtpg dump_domain.2 You can also use the utility to display other information from the dump_file, such as: any mcell, a page of mcells, or the mcell free list in a page of mcells. Searching for Disk Blocks You can determine which file is using a logical block number by searching for and displaying the mcell that contains a file extent that includes that block. The mcell contains the fileset tag and the file tag number of the file that includes that block. Use the tag2name utility to find the file name. For example, you can search for a mcell record that describes the use of a disk block on an AdvFS volume. If you want to determine which file was using logical block number 1234 on AdvFS volume dsk12c, you can enter the following command: # /sbin/advfs/nvbmtpg dsk12c -s b 1234 A given block should only appear in one mcell. However, a corrupted volume may have two or more extents describing the same block. There- fore, if you want to find the disk block shown above and continue the command, searching for any files that also have a file extent that includes block 1234, you can enter the following command: # /sbin/advfs/nvbmtpg dsk12c -s b 1234 -c Searching for Fragment Files AdvFS creates one fragment file for each fileset in an AdvFS file domain. You can determine the file that is using a given file fragment ID and display the primary mcell for that file. For example, if you want to determine which file in domain domain and fileset fileset was using the fragment id 1234, you can enter the following command: # /sbin/advfs/nvbmtpg domain fileset -s f 1234 A given fragment ID can only be used by one file in a fileset. However, a corrupted fileset may have a given fragment ID used by two or more files. Therefore, if you want to find the fragment file ID above and continue the command, searching for any additional files that own the file fragment, you can enter the command: # /sbin/advfs/nvbmtpg domain fileset -s f 1234 -c Searching for a Specified Tag If you specify a domain, a fileset and a file tag (as shown before in the section on displaying primary mcells) the utility uses other metadata files in the domain to find the primary mcell in the BMT. However, the utility can also search for a mcell with a given tag with- out using any other metadata files if you specify the -s t option. This option searches a saved BMT file, or the BMT on one volume, or all the BMT files in a domain for an mcell with the tag you specify. If you specify a domain and fileset, the utility narrows the search to mcells that belong to the fileset. However, if you specify a fileset, the utility must use other metadata files in the domain. In this case, the search syntax displays the first mcell it finds that contains the specifed tag. This mcell could be (but may not be) the primary mcell for the file. To continue the search and display all mcells for the specified tag, add the -c option. The following example searches all BMT files for mcells with tag 123: # /sbin/advfs/nvbmtpg domain_1 -s t 123 -c The following example searches a saved BMT file for mcells that belong to file tag 456: # /sbin/advfs/nvbmtpg save_bmt -s t 456 -c 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 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 AdvFS volumes in domain_name SEE ALSO
Commands: vfilepg(8), nvfragpg(8), nvlogpg(8), vsbmpg(8), nvtagpg(8), tag2name(8) nvbmtpg(8)
Man Page