unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (OSF1-V5.1-alpha)
Page:
Section:
Apropos / Subsearch:
optional field



nvbmtpg(8)							   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

  -a  Display all the pages in the BMT.

  -b block
      Specifies	the logical block number of a disk block on an AdvFS volume.

  -c  Display the entire chain of mcells.  Alternatively, continue to search.

  -d dump_file
      Specifies	the name of a file that	will hold the contents of the speci-
      fied BMT file.

  -f  Display the number of free mcells.

  -l  Display the deferred delete list of mcells.

  -R  Specifies	that information about the Reserved Bitmap Metadata Table
      (RBMT) is	to be displayed, instead of information	about the BMT.

  -s b block
      Specifies	the logical block number of a disk block on an AdvFS volume.
      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.

  -s f frag
      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.

  -s t tag
      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.

  -v  Display all the data in a	specified mcell.

OPERANDS

  bmt_id
      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:

      volume_id	| [-F] dump_file
	  Specify the -F option	to force the utility to	interpret the name
	  you supply as	a file name.

  domain_id
      Specifies	an AdvFS file domain using the following format:

      [-r] [-D]	domain
	  By default, the utility opens	all volumes using block	device spe-
	  cial 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.

  volume_id
      Specifies	an AdvFS volume	using the following format:

      [-V] volume | domain_id volume_index
	  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 special file.

	  Alternatively, specify the volume by using arguments for its
	  domain, domain_id, and its volume index number, volume_index.

  fileset_id
      Specifies	an AdvFS fileset using the following format:

      [-S] fileset | -T	fileset_tag
	  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 fileset_tag.

  file_id
      Specifies	a file name in the following format:

      file | [-t] file_tag
	  Specify the file by entering either the fileset relative pathname,
	  file,	or the file's tag number, -t file_tag.

  mcell
      Specifies	the number of a	metadata cell (mcell) in a BMT file.

  page
      Specifies	the file page number of	the BMT	file.

DESCRIPTION

  The nvbmtpg utility formats, dumps, and displays pages of the	Bitfile	Meta-
  data 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	care-
       fully.

  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 identi-
  fied 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 entering 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 primary 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 exam-
  ple, 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 log-
  ical 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. Therefore, 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 without using any other meta-
  data 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 con-
  tinue	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 contradictory 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 running.
  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

  /sbin/advfs/nvbmtpg
      Specifies	the command path.

  /etc/fdmns/domain_name
      Specifies	the AdvFS volumes in domain_name

SEE ALSO

  Commands: vfilepg(8),	nvfragpg(8), nvlogpg(8), vsbmpg(8), nvtagpg(8),
  tag2name(8)