Oracle Video Server Utilities User's Guide
Release 2.1.7

A42268-3

Library

Product

Contents

Index

Prev Next

Chapter 2
Media Data Store (MDS) Utilities

The media data store utilities perform standard file operations for the Oracle Media Data Store (MDS), the RAID-based real-time file system for the Oracle Video Server. The media data store utilities are:

mdschecksum  

Calculates and prints a checksum for any MDS or host file. The checksum is a 16-bit value expressed in hexadecimal.  

mdsconcat  

Concatenates files together on either the host computer or within an MDS volume.  

mdscopy  

Copies one file to another or a number of files to an MDS volume or to a directory on the host.  

mdscreate  

Creates a file in an MDS volume or on the host system containing the random data currently on disk.  

mdsdelete  

Removes files from MDS volumes.  

mdsdir  

Provides information about an MDS volume and the files it contains.  

mdsdiskmode  

Places disks into either rebuild mode or normal mode. You must put a disk into rebuild mode before rebuilding its data with the mdsrebuild utility. mdsdiskmode is also used to spare and unspare a disk.  

mdsdump  

Displays the hexadecimal equivalent of a file in an MDS volume or on the host system.  

mdslock  

Locks a file in an MDS volume in read-only mode. When a file is locked in read-only mode, it can be read but not written.  

mdsrebuild  

Rebuilds data onto a new disk after a disk failure.  

mdsrename  

Renames an existing file in an MDS volume.  

mdstar  

Loads files from an MDS volume or host to a tape drive or from a tape drive to an MDS volume or host.  

mdstruncate  

Truncates an existing file in the MDS volume.  

mdsundelete  

Restores a file that has been previously removed from the MDS volume with the mdsdelete utility.  

mdsunlock  

Unlocks a file in the MDS volume that was locked in read-only mode with the mdslock utility.  

mdsvolinit  

Creates a definition of an MDS volume, as it appears in a voltab file, to each of the volume's disks.  

mdsvstat  

Provides general information and statistics about MDS volumes.  

mdschecksum

This utility calculates and prints a checksum for any MDS or host computer file. The checksum is a 16-bit value expressed in hexadecimal notation.

Syntax

mdschecksum [-e {integer |0xinteger}] [-l {integer | 0xinteger}]
[-s {integer |0xinteger}] filename...

where:

-e

checksums the file stopping with the specified decimal or hexadecimal byte position. If you omit -e, mdschecksum continues to the end of the file.

-l

length of the file to checksum in bytes.

-s

checksums the file starting with the specified decimal or hexadecimal byte position. If you omit -s, mdschecksum starts at the beginning of the file.

filename

the specified file.You can repeat this syntax to checksum several files.

Usage Notes

You can use mdschecksum to determine whether files were corrupted by large file operations such as moving several files from computer to computer. Run mdschecksum, record the checksum values, perform the file operations, run mdschecksum again, and compare the checksum values with those you calculated originally.

Example

This example calculates and prints the checksum for the file shawshnk.mpg:

% mdschecksum shawshnk.mpg
shawshnk.mpg: cf5f

The checksum value is cf5f.

mdsconcat

This utility concatenates MDS or host computer files together. If you have a movie split across multiple files you may want to concatenate them so that the movie is in a single file.

Syntax

To concatenate files together, use this syntax:

mdsconcat input_filename1 input_filename2... output_filename

where:

input_filename

specifies two or more files to be concatenated.

output_filename

specifies the result of the concatenation.

Usage Notes

The files you concatenate together must have been created as a single file. You cannot concatenate files from different sources together. For example, a commercial and a movie file cannot be made into one file.

mdsconcat requires at least two input files.

If you concatenate content files, you cannot concatenate the individual tag files to create a single tag file for the resulting content file. You must generate a tag file for the concatenated file with the vstag utility.

Example

This example concatenates redoct1.mpg and redoct2.mpg into redoctober.mpg:

% mdsconcat redoct1.mpg redoct2.mpg redoctober.mpg

mdscopy

This utility copies one file to another, or a number of files to an MDS volume or to a directory on the host file system.

Syntax

Copying One File

This syntax copies one file to another:

mdscopy [ -s {integer | 0xinteger} ] [-l {integer | 0xinteger}]
[ -e {integer | 0xinteger} ] [-p integer] [-n slave-specification]
filename1 filename2

where:

-e

copies the file stopping with the specified decimal or hexadecimal byte position. If you omit -e, mdscopy copies to the end of the file.

-l

length of the file to copy in bytes.

-n

runs parallel copying processes in the configuration specified. This is implementation specific. Generally, this applies to MPP server systems. To use parallel copying you must set the environment variable OMS_BIN to the path of mdscopy.

-p

specifies the number of parallel copying processes. If you omit -p, mdscopy does not start parallel copying processes and performs all the copying itself.

-s

copies the file starting with the specified decimal or hexadecimal byte position. If you omit -s, mdscopy copies from the beginning of the file.

filename1

is the source file to be copied

filename2

is the destination file. If this file already exists, mdscopy overwrites it with the contents of the source file. If the source file is in the MDS and you omit the volume path to place the file in, mdscopy copies the source file to a destination file in the same volume.
Copying Several Files

This syntax copies a number of files to an MDS volume or a directory on a video server host computer:

mdscopy [ -s {integer | 0xinteger} ] [ -e {integer | 0xinteger} ] 
[-p integer ] filename... volume-name

where:

-s, -e, and -p are the same as in the previous syntax and apply to each file individually.
filename
is one or more source files to be copied.
volume-name
is the destination to which the source files are copied. The destination directory must already exist.

Usage Notes

Use the -p switch of mdscopy to copy files using parallel copying processes. On some systems copying a file in parallel is faster than copying it with only one process. Since each file is copied by all parallel processes, parallel copying improves performance whether you copy several files or only one.

Note

It is recommended that parallel processes only be used on systems which have MPP video servers.

Examples

Example 1

This example copies the file /mds/classics/falcon.mpg to the file /mds/bogart/falcon.mpg:

% mdscopy /mds/classics/falcon.mpg /mds/bogart/falcon.mpg
Example 2

This example copies all of the files in the MDS volume arnold to the MDS volume action:

% mdscopy /mds/arnold /mds/action
Example 3

This example copies all files ending in .txt from the current directory into the MDS volume stuff:

% mdscopy "./*txt" /mds/stuff
Example 5

This example copies all files in the MDS volume movies to the /usr/backup directory on the video server host:

% mdscopy "/mds/movies/*" /usr/backup

mdscreate

This utility creates a file in the MDS.

Syntax

mdscreate -l [integer | 0xinteger] filename...

where:

-l

length of the file in bytes.

filename

is one or more files to be created.

Usage Notes

mdscreate makes a file of the specified size out of undefined data. You can use this utility to reserve space for a content file to be added to the MDS volume at a later date. When you want to add the new file, use mdsdelete to remove the file serving as a place holder and use mdscopy or mdstar to place the new file in the volume.

Example

This example creates a 150 Mb file called film.mpg:

% mdscreate -l 150000000 film.mpg 

mdsdelete

This utility deletes files from the MDS.

Syntax

mdsdelete [-e] mds-filename...

where:

-e

clears the disk space. If you omit -e, mdsdelete makes the removed file invisible to Video Server components but does not clear it from the disk.

mds-filename

specifies one or more files to be removed.

Usage Notes

If you inadvertently remove a file from an MDS volume, you can restore the file with the mdsundelete utility any time until the file is overwritten by another file loaded into the same volume. You can determine whether the file has been overwritten with the mdsdir utility. The overwriting of invisible, removed files by newly loaded files is not predictable. You cannot restore a file that you remove with the -e switch.

Examples

Example 1

This example deletes the files repoman.mpg and decline.mpg from the volume underground:

% mdsdelete /mds/underground/repoman.mpg /mds/underground/decline.mpg
Example 2

This example deletes the file rockyhor.mpg from the volume horror and clears it from the MDS:

% mdsdelete -e /mds/horror/rockyhor.mpg

The file rockyhor.mpg cannot be restored with mdsundelete.

For More Information

For more information on restoring a removed file, see mdsundelete later in this chapter.

mdsdir

This utility gives you information about MDS volumes and the files
they contain.

Syntax

mdsdir [-a] [-b] [-c] [-d] [-f] [-l] [-p] [-s] [volume-name...]

where:

-a

lists all files, including invalid files and files removed but not yet overwritten, in the specified volume. This switch can be used with other mdsdir switches.

-b

lists file names, dates, and sizes in bytes.

-c

lists the volume's available bandwidth and total bandwidth.

-d

prints out the status of each disk in a volume: normal, rebuild,
and/or if it is spared.

-f

lists free space in the specified volume.

-l

lists file names, sizes, dates, and whether each file is locked.

-p

lists a physical map of the specified volume.

-s

displays only the number of files in the volume.

If you use no switches, mdsdir lists only file names.

volume-name

lists the files in the specified volume. If you do not specify a volume, mdsdir lists files in all MDS volumes.

Examples

Example 1

This example lists the files in the volume /mds/classics, including ones that have been deleted but not yet overwritten:

% mdsdir -a /mds/classics

The output might look like this:

Volume:  /mds/classics (ro)   12 matches
acntrl0.txt clapton2.mpg clifprev.mpg cliftitl.mpg
control0.txt dls14.mpg dls28.mpg mason.mpg(INV)
mason.txt masont2.mpg mdsdump.test pvrintro.mpf(DEL)

This listing shows:

Example 2

This example lists the free space in the MDS:

% mdsdir -f /mds/rebuild
Volume: /mds/rebuild 2 matches
1985 MB's of free space in 1 fragment(s)
Largest free block is 1985 MB's
Example 3

This example lists files in the volume /mds/classics with the size, date and time, and name of each file:

% mdsdir -l /mds/classics
Volume: /mds/classics 50 matches
273b Mar 18 00:04 rw acntrl0.txt
294m Feb 26 17:09 rw clapton2.mpg
19m Feb 26 16:57 rw clifprev.mpg
904k Feb 26 16:57 r- cliftitl.mpg
172b Mar 18 00:04 r- control0.txt
10m Feb 26 16:57 rw dls14.mpg

The -l listing uses:

Example 4

This example also lists files in the volume /mds/classics with the size in bytes, date and time, and name of each file:

% mdsdir -b /mds/classics
Volume: /mds/classics 50 matches
273 Mar 18 00:04 rw acntrl0.txt
308258300 Feb 26 17:09 rw clapton2.mpg
20441688 Feb 26 16:57 rw clifprev.mpg
926016 Feb 26 16:57 rw cliftitl.mpg
...

The -b listing gives the exact size of each file in bytes.

Example 5

This example gives a physical map of the volume /mds/classics:

% mdsdir -p /mds/classics
Volume: /mds/classics 50 matches
1 start 6182 len 405091608 Feb 26 16:57 topgun.mpg
6183 start 15 len 926016 Feb 26 16:57 clifttl.mpg
6198 start 160 len 10467980 Feb 26 16:57 dls14.mpg
6358 start 43 len 2801408 Feb 26 16:57 dls28.mpg
12509 start 1836 len 120324096 ------------------Free Space
14345 start 288 len 18830832 Feb 26 16:47 vv13.mpg
64579 start 1577 len 10335027 ------------------Free Space
1034 MB's of free space in 4 fragment(s) Largest free block is 782 MB's

The file dls28.mpg, for example, begins in RAID stripe 6358, occupies 43 RAID stripes, and is 2801408 bytes long.

mdsdiskmode

This utility puts disks into either rebuild mode or normal mode. You must put a disk into rebuild mode before:

mdsdiskmode is also used to replace failed disks with disk sparing. For more information on disk sparing refer to the Chapter 3, Administering the Oracle Video Server in the Oracle Video Server Administrator's Guide .

Note

Disk sparing is not supported on MPP systems.

Syntax

mdsdiskmode -f voltab {-r | -n | -s spare-disk-name | -u } disk

where:

-f

identifies the voltab file containing the definition for the volume containing the disk, such $ORACLE_HOME/admin/vs23/voltab. You must specify
-f.

-n

puts disks into normal mode. In normal mode a disk can be both written and read.

-r

puts disks into rebuild mode. In rebuild mode a disk can be written but not read.

-s

spares a failed disk to the designated spare disk and places it in rebuild mode.

-u

unspares a spare disk and transfers disk I/O operations to the replaced disk in the specified volume.

disk

specifies the disk to put in rebuild or normal mode.

Usage Notes

After rebuilding data onto a new disk with the mdsrebuild utility, do not use mdsdiskmode to put the disk into normal mode. The mdsrebuild utility automatically puts the disk into normal mode after rebuilding data onto it.

When the media data store process (mdsdirsrv) starts, it puts each disk in each of its volumes into the mode, either normal mode or rebuild mode, that the disk was in when mdsdirsrv was last shut down. For example, if the Oracle Video Server fails after you place a new disk into rebuild mode with the mdsdiskmode utility, and then began rebuilding data onto that disk with the mdsrebuild utility, restarting mdsdirsrv places the disk in rebuild mode. You can then restart rebuilding data onto the failed disk.

If you have created a spare disk in your volume specification, mdsdiskmode places a spare disk in rebuild mode when used with the -s option. This prepares the spare disk to have the data from a failed disk written to it. Note that you can only use the -s and -u options for MDS volumes where a spare disk has been created.

Example

Example 1

This example puts the disk /dev/scsi/sd041 into rebuild mode:

% mdsdiskmode -f $ORACLE_HOME/admin/vs23/voltab -r /dev/rdsk/c0t1d0s0
Example 2

This example spares the failed disk /dev/rdsk/c0t1d0s0 to the spare disk
/dev/rdsk/c3t5d0s0:

% mdsdiskmode -f $ORACLE_HOME/admin/vs23/voltab -s /dev/rdsk/c3t5d0s0
/dev/rdsk/c0t1d0s0

For a detailed example of replacing a failed disk with a spare, refer to Chapter 3, Administering the Oracle Video Server in the Oracle Video Server Administrator's Guide.

For More Information

For information on using mdsdiskmode with mdsrebuild, see the section on mdsrebuild later in this chapter.

mdsdump

This utility shows you the hexadecimal equivalent of a file in the MDS or
host computer.

Syntax

mdsdump [ -s {integer | 0xinteger} ] 
[ -e {integer | 0xinteger} | -l {integer | 0xinteger} ]
filename...

where:

-e

dumps each file stopping with the specified decimal or hexadecimal byte position. If you omit -e, mdsdump dumps each file to its end.

-l

length of the file to dump in bytes.

-s

dumps each file starting with the specified decimal or hexadecimal byte position. If you omit -s, mdsdump dumps each file from its beginning.

filename

specifies one or more files to be dumped.

Usage Notes

If you dump multiple files, the output for each file is preceded by the file name.

The output of mdsdump might look like this:

0000000020 6778 4669 6c65 6e61 6d65 4669 6c74 6572 gxFilenameFilter 
0000000030 2074 6861 7420 7061 7273 6573 2061 2073 that parses a s
0000000040 7472 696e 6720 696e 746f 0a61 2076 6f6c tring into.a vol
0000000050 756d 656e 616d 6520 616e 6420 6120 6669 umename and a fi
0000000060 6c65 6e61 6d65 2e0a 0a52 756c 6520 313a lename...Rule 1:
0000000070 2076 6f6c 756d 6520 6f72 2066 696c 6520 volume or file
0000000080 6e61 6d65 7320 646f 6e27 7420 636f 6e74 names don't cont
0000000090 6169 6e20 2f2e 0a52 756c 6520 323a 206e ain /..Rule 2: n
00000000a0 616d 6573 2061 7265 2063 6173 6520 696e ames are case in
00000000b0 7365 6e73 6974 6976 652e 2020 464f 4f20 sensitive. FOO
00000000c0 3d20 666f 6f2e 0a52 756c 6520 333a 2074 = foo..Rule 3: t
00000000d0 6865 2061 6273 6f6c 7574 6520 7061 7468 he absolute path
00000000e0 2066 6f72 2061 6e79 2066 696c 6520 6973 for any file is

Output is arranged in multiple rows. Each row contains 10 fields and represents 16 bytes of data:

To save space, repeated rows are not printed. An asterisk (*) represents one or more rows identical to the previous row.

0000000000 2321 2f62 696e 2f73 680a 6578 6563 204e #!/bin/sh.exec N 
0000000010 4320 2430 2022 2440 220a 0000 0000 0000 C $0 "$@".......
0000000020 2d6e 2031 0a00 0000 0000 0000 0000 0000 -n 1............
0000000030 0000 0000 0000 0000 0000 0000 0000 0000 ................
*
0000000100 7f45 4c46 0101 0100 0000 0000 0000 0000 ELF............
0000000110 0200 1000 0100 0000 0000 0000 3400 0000 ............4...
0000000120 40d7 0700 0000 0000 3400 2000 0300 2800 @.......4. ...(.
0000000130 0c00 0800 0600 0000 9800 0000 0000 0000 ................
0000000140 0000 0000 4000 0000 4000 0000 0400 0000 ....@...@.......
0000000150 0000 0000 0100 0000 d800 0000 0000 0000 ................
0000000160 0300 0000 4c14 0300 4c14 0300 0500 0000 ....L...L.......

Example

This example returns the hexadecimal equivalent of the file test1 from the address 0x20 to 0x100, as in the first example in the "Usage Notes":

mdsdump -s 0x20 -e 0x100 /mds/dev/test1

mdslock

This utility locks a file in the MDS in read-only mode. When a file is locked in read-only mode, it can be read but not written.

Syntax

mdslock mds-filename...

where:

mds-filename

specifies one or more MDS files to be locked.

Usage Notes

This utility provides protection from inadvertently overwriting files. For example, you can lock a video file so that another user does not overwrite it while you are playing it. In a production environment you may want to lock all the content and tag files in the MDS.

You can determine whether a file is locked in read-only mode with the
mdsdir utility.

Once a file is locked in read-only mode, you can only unlock it with the mdsunlock utility so that it can be both read and written. Restarting mdsdirsrv does not unlock a file.

Example

This example locks the file ghogday.mpg in read-only mode:

% mdslock /mds/comedy/ghogday.mpg

For More Information

For more information on unlocking a file locked in read-only mode, see mdsunlock later in this chapter.

mdsrebuild

This utility rebuilds data onto a new disk after a disk failure or onto a disk used as a spare. You can only rebuild data if the volume containing the failed disk was set up for RAID protection before its content was loaded, and if there are no other failures in the RAID set containing the disk.

Syntax

mdsrebuild -f voltab disk

where:

-f

identifies the voltab file containing the definition for the volume containing the disk, such $ORACLE_HOME/admin/vs23/voltab. You must specify
-f.

disk

is the disk to be rebuilt.

Usage Notes

All partitions listed in the voltab file or files and mounted by the server will be rebuilt by mdsrebuild.

The Media Data Store can only support one rebuild operation at a time. If you have more than one failed disk in the same MDS volume set, you cannot rebuild them with concurrent mdsrebuild commands; you must wait for one command to return before issuing the next. If you attempt to run more than one instance of mdsrebuild all but the first instance will fail with the message "cannot execute more than one disk rebuild per volume set."

Please note, that if you run mdsrebuild with other MDS utilities, the maxbw parameter in the voltab file must be set or the disk I/O of the other MDS utilities may fail.

When a disk needs to be rebuilt, the media data store process (mdsdirsrv) will display the message "rebuild disk disk_name immediately." While mdsdirsrv will place the disk in rebuild mode and mount the volume, you should rebuild the disk as soon as possible.

Example

Example

This example identifies the voltab file in /ORACLE_HOME/admin/voltab as the correct definition to rebuild the disk /dev/rdsk/c2t4d0t0:

% mdsrebuild -f $ORACLE_HOME/admin/vs23/voltab /dev/rdsk/c2t4d0t0

mdsrename

This utility renames an existing file in the MDS.

Syntax

mdsrename mds-filename1 mds-filename2

where:

mds-filename1

is the source file to be renamed.

mds-filename2

is the destination file or the new name. If a file by this name already exists, mdsrename overwrites it. You cannot use mdsrename to move a file from one MDS volume to another.

Example

This example renames the file schindlr.mpg in the classics volume to bestpict.mpg:

% mdsrename /mds/classics/schindlr.mpg /mds/classics/bestpict.mpg

mdstar

This utility loads files from the MDS to a tar archive, from a tar archive to the MDS, and lists files contained in a tar archive.

Syntax

mdstar {-c | -x | -t} -f archive-filename [-b integer] 
[-p volume-name] [-l integer]

where:

-b
specifies the blocking factor to be used. If you do not specify a blocking factor tar defaults to 20.
-c
creates a tar archive and writes the named files to the archive.
-f
the device-name to use as an archive.
-l
length of a file segment.
-p
the volume to place files into during extraction.
-t
lists the files contained in a tar archive.
-x
extracts a file from a tar archive to the MDS volume specified.

Usage Notes

When extracting from a tar archive, you must use the same blocking factor that was specified when the archive was created. For this reason you must specify the correct blocking factor for your Video Server platform. Refer to your server platform's documentation for the correct value. The default blocking factor for mdstar is 20.

If mdstar is abnormally terminated, it marks the new files as invalid. An invalid file may not play properly. You can identify invalid files with the mdsdir utility. You can then remove them with the mdsdelete utility and reload them with mdstar.

Segmenting Large Files

To load a file larger than the supported capacity of the host system, specify a limit size value with -l.

If you load a file larger than the limit size specified with -l, mdstar divides the file into multiple file segments, each no larger than the limit size, and loads each separately. Names of segment files have this form:

__integer1_integer2_file

where:

integer1

is a hexadecimal integer representing the byte position in the original file where this file begins.

integer2

is hexadecimal integer representing the size of the original file in bytes.

filename

is the name of the original file.

For example, mdstar divides a 5 GB file named angels.mpg2 into these 3 files when the tape archive is created:

__0_140000000_angels.mpg2
__7fffffff_140000000_angels.mpg2
__ffffffff_140000000_angels.mpg2

If your host file system does not support files of 2 GB or greater, you can create files using __integer1_integer2_file.ext naming format, put them on tape, and mdstar will concatenate them into one large file named file.ext when you load them into a MDS volume.

Examples

Example 1

This example archives the file /mds/volume1/star_wars.mpg to the device /dev/scsi/rmt8.

% mdstar -ct -f /dev/scsi/rmt7 /mds/volume1/star_wars.mpg 
a star_wars.mpg, 1610612789 bytes, 1 segment(s), 293 kb/s

This example uses the default blocking factor of 20. To ensure that you are using the correct blocking factor, refer to your server platform documentation.

Note that this example and others in this section use the -T option. This option enables verbose mode, which lists additional information about actions taken on files.

Example 2

This example archives all files in /mds/volume1 with the extension .mpg to a file:

% mdstar -ct -f /tmp/film.tar "/mds/volume1/*.mpg" 
a star_wars.mpg, 1610612789 bytes, 1 segment(s), 278 kb/s
a clip1.mpg, 3610612 bytes, 1 segment(s), 289 kb/s
Example 3

This example extracts files from the archive film.tar and places them in the MDS volume volume1.

% mdstar -x -f /tmp/film.tar -p /mds/volume1
Example 4

This example extracts all files with the .mpg extension and places the files in the MDS volume primetime:

% mdstar -x -b 128 -f /dev/scsi/rmt7 -p /mds/primetime ".mpg*"

This archive was originally created with a blocking factor of 128. You must always extract or list the contents of an archive with the same blocking factor that was used to create it.

Example 5

This example lists the contents of the archive device /dev/scsi/rmt7:

% mdstar -t -f /dev/scsi/rmt7
star_wars.mpg, 1610612789 bytes, 3145729 blocks, 1 segments, Feb 12
11:18:26
clip1.mpg, 3610612 bytes, 7052 blocks, 1 segments, Feb 12 11:19:05

When listing the contents of an archive you must use the blocking factor the archive was created with.

For more information refer to your Unix tar documentation.

mdstruncate

This utility truncates an existing MDS file.

Syntax

mdstruncate [-l {integer | 0xinteger}] mds-filename...

where:

-l

new length of the file. If not specified, the default length is zero.

mds-filename

specifies one or more MDS files to be truncated.

Example

This example truncates the file eraserhe.mpg to 104678 bytes:

% mdstruncate -l 104678 eraserhe.mpg

mdsundelete

This utility restores an MDS file that has been previously removed with the mdsdelete utility.

Syntax

mdsundelete mds-filename...

where:

mds-filename

specifies one or more MDS files to be restored.

Usage Notes

When the mdsdelete utility removes a file, it does not overwrite the file unless the -e switch is specified, it simply makes the file invisible to Oracle Video Server components. If you inadvertently remove a file from the MDS volume, you can restore the file with the mdsundelete utility unless the file has been overwritten by another file that has since been loaded into the same volume or unless you used the -e switch of mdsdelete to overwrite the file with zeroes when you removed it. You can identify removed files that have not yet been overwritten with the mdsdir utility. If you try to restore a removed file that has been overwritten, mdsundelete returns an error message "file not found". The overwriting of invisible removed files by newly loaded files is not predictable.

Example

This example removes two files with mdsdelete and restores one of them with mdsundelete:

% mdsdelete   /mds/classics/repoman.mpg /mds/classics/stripes.mpg
% mdsundelete /mds/classics/repoman.mpg

mdsunlock

This utility unlocks a file in the MDS that has been locked with the mdslock utility in read-only mode.

Syntax

mdsunlock mds-filename...

where:

mds-filename

specifies one or more MDS files to be unlocked.

Usage Notes

You can identify MDS files locked in read-only mode with the mdsdir utility.

When a file is unlocked, it can be written by a read-write media data store process (mdsdirsrv) if the corresponding volume has been mounted in read-write mode. An unlocked file cannot be written to by a read only mdsdirsrv.

Example

This example unlocks the file ghogday.mpg located in the comedy volume:

% mdsunlock /mds/comedy/ghogday.mpg

The file can now be both read and written.

mdsvolinit

This utility writes the definition of an MDS volume, as it appears in a voltab file, to each of the volume's disks. It can be used to either initialize a volume specification and/or to clear a volumes's table of contents.

Syntax

mdsvolinit [ -b disk... | -s ] [-t] -f voltab volume...

where:

-b

specifies that certain disks have failed.

-f

identifies the voltab file containing the volume definition.

-s

initializes volume specification. This should be used whenever a new volume is created.

-t

indicates that the table of contents is to be initialized. This should be used whenever a new volume is created or the user wants to clear all files from the selected volume.
Note
The -t option removes all content from the specified volume.

voltab

specifies the voltab file to be used, such as $ORACLE_HOME/admin/vs23/voltab.

volume

specifies the volume.

Usage Notes

When you start mdsdirsrv, it returns an error message if the volume definitions of the voltab file do not match those of the disk. You can then examine the message to determine why they do not match:

Always use the -s and -t switches together. Running mdsvolinit will initialize the disk according to the new voltab and erase the current volume.
Warning
For all other voltab changes, such as changing the raid size, you must reinitialize your volume with both the -s and -t options. This will destroy your current volume.
You will be prompted for a yes/no reply when using the
-s flag.

After resolving the differences between voltab and the disks, restart mdsdirsrv.

If you try to write volume definitions to a failed disk, mdsvolinit returns an error. If a volume contains a failed disk and you want to write the volume definition to its other disks, specify the failed disk with the -b switch. Later if you replace the failed disk and rebuild data onto the replacement disk with the mdsrebuild utility, mdsrebuild also writes the volume definition to the disk, so you need not use mdsvolinit.

Example

This example initializes the volumes action and classics using the voltab file located in the directory $ORACLE_HOME/admin/vs23:

% mdsvolinit -s -t -f $ORACLE_HOME/admin/vs23/voltab action classics

You must initialize your MDS volume with this syntax before you start the Oracle Video Server. Be aware that initializing an MDS volume erases all content from the volume.

mdsvstat

This utility queries an MDS volume for the following information and statistics:

Note

mdsvstat is not supported on MPP systems.

Syntax

mdsvstat [-s] [-d] [-a] [-f voltab-file] [-c integer] [-m integer] 
[-b integer] [-i disk-name] [-r integer] [volume-name...]

where:

-a

obtains the maxbw value for an MDS volume. For information on maxbw see Chapter 4, Oracle Video Server Components Reference of the Oracle Video Server Administrator's Guide.

-b

specifies the video bit rate to use when using -a. Specify this value in Mbps (refer to The Video Pump section of Chapter 4, Oracle Video Server Components Reference in the Oracle Video Server Administrator's Guide).

-c

use this option with -a to determine the length in seconds of the simulation; the default is 15 seconds.

-d

produces an average disk I/O time in microseconds for a specified MDS volume.

-f

identifies the voltab file containing the volume definition.

-i

averages the specified disk's I/O time in milliseconds. Use this option in conjunction with -d.

-m

determines the maximum number of I/Os when used with -d; the default is 15.

-r

determines how often messages are logged in milliseconds when using -a to obtain the maxbw value. This option provides additional information about how a system is performing under a given load.
Note
To see the additional logging you must also specify verbose mode with
-T.

-s

creates a list of statistics about the specified volume.

volume-name

an MDS volume about which to report. You may specify multiple volume names. If you specify no volume-name, mdsvstat operates on all volumes.

Usage Notes

mdsvstat performs intensive I/O operations when querying an MDS volume. For this reason mdsvstat should always be used on its own, and never on a volume being accessed by other Oracle Video Server utilities or clients (such as the video pump).

When testing a volume for its maxbw value, mdsvstat can be used with -b to test a volume with a specific video bit rate. This allows you to compare the number of concurrent video streams that can be provided at different bit rates by changing the bit rate value of the video pump (vspump) and encoding your content at different rates.

When sampling the average I/O time of a disk with the -d option, you can set the number of disk I/Os with -m. If mdsvstat overloads a disk and returns an error, reduce the number of disk I/Os. Specifying more I/Os produces a more accurate average of I/O times.

The media data store process (mdsdirsrv) does not need to be running to use mdsvstat.

Examples

Example 1

The maxbw value determines the maximum available bandwidth that an MDS volume can deliver. An accurate maxbw value is crucial when determining the number of concurrent video streams that the server can deliver.

This example obtains the maxbw value for the volume movies:

% mdsvstat -a -f ./voltab movies 
Disk average = 15643 usecs, theoretical maxbw is 160.88 mbs.
Attempting a maxbw of 10.05 bytes/usec, 80 mbs
52 streams, 208 IO buffers, 13631488 bytes RAM
Attempting a maxbw of 10.05 bytes/usec, 80 mbs
52 streams, 208 IO buffers, 13631488 bytes RAM
Attempting a maxbw of 5.03 bytes/usec, 40 mbs
26 streams, 104 IO buffers, 6815744 bytes RAM
Attempting a maxbw of 5.03 bytes/usec, 40 mbs
26 streams, 104 IO buffers, 6815744 bytes RAM
..... etc. Attempting a maxbw of 9.43 bytes/usec, 75 mbs
49 streams, 196 IO buffers, 12845056 bytes RAM
Attempting a maxbw of 9.11 bytes/usec, 72 mbs
47 streams, 188 IO buffers, 12320768 bytes RAM
Attempting a maxbw of 9.27 bytes/usec, 74 mbs
48 streams, 192 IO buffers, 12582912 bytes RAM
Recommended maxbw setting for volume movies is: 55 mbs

mdsvstat will attempt various I/O rates until it determines the correct maxbw value through a process of elimination.

Example 2

You can use mdsvstat to list general statistics about a volume with the -s option. This example displays statistics for the volume video.

% mdsvstat -s -f ./voltab video 
--------------------------------------------------------------------
Volume name: video
Parity: yes
IO size, individual disk: 65536 b, 64 k
IO size, full stripe: 327680 b, 320 k
IO size, full stripe minus parity: 262144 b, 256 k
Number of normal disks: 5
Number of spare disks: 1
Disks per raidset: 5
Number of raidsets in volume: 1
TOC size: 262144 b, 256 k
Maximum files possible in volume: 4095
Raw capacity of each disk: 1048576 b, 1024 k, 1 m
Available capacity of each disk: 786432 b, 768 k
Stripes per raidset/disk: 12
Total stripes in volume: 12
Total volume capacity: 2883584 b, 2816 k
Example 3

This example samples the I/O speed of a random disk in the volume movies. The time of the I/O operation is recorded in microseconds. mdsvstat first sends I/O data of the size specified individually and averages the time, and then in batches. Batch numbers should be the same or lower than the individual I/O times. If they are not, the device drivers used by the disks are not as efficient as they could be.

% mdsvstat -d -f ./voltab movies 
Disk Name IO size Num IOs Avg (us)
-----------------------------------------------------------------------
/dev/rdsk/c1t2d0s3 512 15 10066
/dev/rdsk/c1t2d0s3 512 15 6517(batch)
/dev/rdsk/c1t2d0s3 4096 15 9301
/dev/rdsk/c1t2d0s3 4096 15 7331(batch)
/dev/rdsk/c1t2d0s3 65536 15 21935 *
/dev/rdsk/c1t2d0s3 65536 15 15126(batch) *



Prev

Next
Oracle
Copyright © 1997 Oracle Corporation.

All Rights Reserved.

Library

Product

Index