JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Sun QFS and Sun Storage Archive Manager 5.3 Reference Manual     Sun QFS and Sun Storage Archive Manager 5.3 Information Library
search filter icon
search icon

Document Information

Preface

1.  User Commands (Man Pages Section 1)

2.  Maintenance Commands (Man Pages Section 1M)

archive_audit(1M)

archive_mark(1M)

archiver(1M)

archiver.sh(1M)

arcopy(1M)

arfind(1M)

auditslot(1M)

backto(1M)

build_cat(1M)

chmed(1M)

cleandrive(1M)

clri(1M)

damage(1M)

dev_down.sh(1M)

dmpshm(1M)

dump_cat(1M)

dump_log(1M)

exarchive(1M)

export(1M)

fsmadm(1M)

fsmdb(1M)

fsmgmtd(1M)

fsmgr(1M)

fsmgr_setup(1M)

fsmupd(1M)

generic(1M)

gnutar(1M)

HAStoragePlus_samfs(1M)

import(1M)

itemize(1M)

load(1M)

load_notify.sh(1M)

log_rotate.sh(1M)

mccfg(1M)

mount_samfs(1M)

move(1M)

nrecycler.sh(1M)

odlabel(1M)

qfsdump(1M)

qfsrestore(1M)

rearch(1M)

recover.sh(1M)

recycler(1M)

recycler.sh(1M)

releaser(1M)

reserve(1M)

restore.sh(1M)

robots(1M)

rpc.sam(1M)

sam-amld(1M)

sam-archiverd(1M)

sam-arcopy(1M)

sam-arfind(1M)

sam-catserverd(1M)

sam-clfsd(1M)

sam-clientd(1M)

sam-dbupd(1M)

sam-fsalogd(1M)

sam-fsd(1M)

sam-ftpd(1M)

sam-genericd(1M)

sam-grau_helper(1M)

sam-ibm3494d(1M)

sam-nrecycler(1M)

sam-recycler(1M)

sam-releaser(1M)

sam-rftd(1M)

sam-robotsd(1M)

sam-rpcd(1M)

sam-scannerd(1M)

sam-serverd(1M)

sam-sharefsd(1M)

sam-shrink(1M)

sam-sony_helper(1M)

sam-sonyd(1M)

sam-stagealld(1M)

sam-stagerd(1M)

sam-stagerd_copy(1M)

sam-stk_helper(1M)

sam-stkd(1M)

samadm(1M)

sambcheck(1M)

samchaid(1M)

samcmd(1M)

samcrondump(1M)

samcronfix(1M)

samd(1M)

samdb(1M)

samexplorer(1M)

samexport(1M)

samfsck(1M)

samfsconfig(1M)

samfsdump(1M)

samfsinfo(1M)

samfsrestore(1M)

samfstyp(1M)

samgetmap(1M)

samgetvol(1M)

samgrowfs(1M)

samimport(1M)

samload(1M)

sammkfs(1M)

samncheck(1M)

samquota(1M)

samquotastat(1M)

samset(1M)

samsharefs(1M)

samsnoop(1M)

samstorade(1M)

samtrace(1M)

samu(1M)

samunhold(1M)

save_core.sh(1M)

scanner(1M)

scsi_trace_decode(1M)

sefreport(1M)

sendtrap(1M)

set_admin(1M)

set_state(1M)

showqueue(1M)

stageall(1M)

stageback.sh(1M)

star(1M)

tapealert(1M)

tarback.sh(1M)

tplabel(1M)

tpverify(1M)

trace_rotate(1M)

umount_samfs(1M)

unarchive(1M)

undamage(1M)

unload(1M)

unrearch(1M)

unreserve(1M)

3.  Library Functions (Man Pages Section 3)

4.  Library Functions (Man Pages Section 3X)

5.  File Formats (Man Pages Section 4)

6.  Standards, Environment, and Macros (Man Pages Section 5)

7.  Device and Network Interfaces (Man Pages Section 7)

samdb(1M)

NAME
     samdb - SAM-QFS sideband database commands

SYNOPSIS
     samdb check family_set [-f] [-s] [-q]

     samdb create family_set [-s schema_file]

     samdb dump family_set [-a] [-s] [-f file name]

     samdb drop family_set

     samdb load family_set [-i] [-f file name]

     samdb query family_set [-t type] [-c] [-s] [-i inum]
         [-f file] [-v vsn]

DESCRIPTION
     The samdb commands are used to configure and query a SAM-QFS
     MySQL  database.  This database retains metadata information
     for each file in the file system. Use of the  SAM-QFS  MySQL
     database  implies  the  SAM-QFS server has access to a MySQL
     server. The SAM-QFS server need not host the MySQL server if
     as  network access to the database host system is available.
     The samdb.conf(4) configuration  file  contains  the  access
     parameters for the database.

     Use of the SAM-QFS MySQL database is optional and is  speci-
     fied  by the mount option sam_db. If set, the fsalogd daemon
     is started at mount time.  The file system sends  events  to
     the  fsalogd  who  writes the events to a log file. A second
     daemon, sam-dbupd, reads the events  from  the  fsalogd  log
     files and updates the SAM-QFS database.

     The database is initially populated by the samdb  load  com-
     mand.  Input  to  the  samdb  load  command is the load file
     created by samfsdump.

     Example 1: Generate load file from an existing dumpfile.

     # samfsrestore -S -Z /tmp/samfs1/dbload -f /path/to/dump/samfs1.dump

     Example 2: Generate load file while  performing  a  samfsre-
     store.

     # samfsrestore -Z /tmp/samfs1dbload -f /path/to/dump/samfs1.dump

     Example 3: Pipelining samfsdump to load database.

     # samfsdump -S -Z - /samfs1 | samdb load samfs1

     Once the SAM-QFS MySQL database is  populated,  the  perfor-
     mance of samfsdump(1M) can be improved by using the database
     for path name creation.  This is either  done  with  a  file
     created by samdb dump or pipelined together.

     Example: Pipelining samdb dump to samfsdump

     # samdb dump samfs1 | samfsdump -Y -f /path/samfs1.dump -

SAMDB COMMANDS
     A series of commands are provided to configure and query the
     SAM-QFS  MySQL database. The specific options to the indivi-
     dual commands are listed below.

     family set

         Specifies the family set name of the file  system.  This
         family  set  name  must  be configured in the samdb.conf
         file.

     help

         Displays a command syntax summary.

     Here is a list of the samdb commands and an  explanation  of
     the options.

     samdb check family_set [-f] [-s] [-q]

         Checks the database against specified  file  system  for
         consistency.   This  scans  the inodes of the filesystem
         making sure the entries in the database are correct.

     -f

         Perform a fast consistency check.  This  skips  checking
         the  directory  namespace  in  the  database, using only
         information found in the inode.

     -s

         Perform a scan without repairing database errors.

     -q

         Quiet output, only display the number of problems found.

     samdb create family_set [-s schema_file]

         Creates the database for the specified filesystem.

     -s schema_file

         Specifies the schema file to use. The  default  file  is
         /opt/SUNWsamfs/etc/samdb.schema.  The  schema  file con-
         tains a series of CREATE TABLE commands.

     samdb dump family_set [-a] [-s] [-f file name]

         Generates a list of files for samfsdump.

     -a

         Use absolute pathnames in file list.   This  will  allow
         samfsdump  to be ran outside of the root of the filesys-
         tem.  The default is relative pathnames.

     -s

         Sort dump file by parent  directory  ids.   This  option
         groups  files  together  in the dump file based on their
         parent directories.   Subsequent  samfsdump  performance
         will not be improved when using this option.

     -f file name

         Specifies file to send output  to.  If  a  file  is  not

         supplied, output goes to standard out.

     samdb drop family_set

         Drops the database for the  specified  file  system.   A
         confirmation prompt will appear.

     samdb load family_set [-f file name]

         Loads a database from a samfsdump file.  After loading a
         database  a  samdb  check  should  be performed for that
         filesystem.

     -i

         Use an inode scan instead of a load  file  to  load  the
         database.   This can be used if no recent samfsdump file
         is available to generate the load file with.

     -f filename

         The filename of  the  load  file,  default  is  standard
         input.This    file    can    be    generated    by
         samfsdump(1M)/samfsrestore(1M) -Z option.

     samdb query family_set [-t type] [-c] [-s] [-i inum]
         [-f file] [-v vsn]

         Queries a database for files or vsns based  on  provided
         file  or  vsn  information.   Multiple -ifv terms can be
         provided.  Like terms  are  OR'd  together,  and  unlike
         terms are AND'd.

     -t {vsn,file}

         The query type to produce, either vsn or file.   If  vsn
         is chosen a list of vsns matching the -ifv terms will be
         output.  If file is chosen a list of files matching  the
         -ifv  terms  will  be  output.   If both query types are
         chosen, e.g. -t vsn -t file, then a list of files broken
         down by vsn will be output.  The default is file.

     -c

         Produce  a  count  instead  outputing  a  result   list.
         Depending  on  the  query  type,  the output will be the
         number of either vsns  or  files  that  match  the  -ifv
         terms.

     -s

         Sort the results.   Results  are  sorted  alphabetically
         ascending.

     -i inum

         Match the provided inode number.  This  is  provided  to
         query  the  database  for  which  files or vsns have the
         given inode number.

     -f filename

         Match the provided filename.  This queries the  database
         for files that match the given filename.  The % wildcard
         character can be used within a filename to match  multi-
         ple  files.  Paths must either being with a wildcard, or
         be absolute relative to the mount point.

         For example /dir1/file1 or %dir1/file1 are  valid.   The
         first would match the dir1 directory in the mount point.
         The second would match any directory ending in dir1.

     -v vsn

         Match the provided vsn. Depending on the query type this
         will  output a list of files on the vsn, or restrict the
         results to the provided vsn.

SEE ALSO
     samdb.conf(4) samfsdump(1M) samfsrestore(1M)