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)

samfsck(1M)

NAME
     samfsck - Checks and repairs a Sun QFS or SAM-QFS file  sys-
     tem

SYNOPSIS
     samfsck [ -s scratch_dir ] [ -F [ -R ] ] [ -G ] [ -S ] [  -U
     ] [ -u fs_version ] [ -V ] [ -p ] [ -A ] fs_name

AVAILABILITY
     SUNWsamfs

DESCRIPTION
     The samfsck command checks and optionally repairs a Sun  QFS
     or  SAM-QFS file system from the disk partitions that belong
     to fs_name. For fs_name, specify either a  family  set  name
     from  the  mcf file or a mount point absolute path name from
     the /etc/vfstab file.   One  or  more  disk  partitions  are
     specified  in  the  mcf  file.  If no options are specified,
     samfsck checks and reports, but does  not  repair,  all  the
     blocks  that  belong  to  inodes and lists inodes which have
     duplicate blocks.  samfsck also  checks  inodes  which  have
     blocks that are free blocks.  If only one inode is listed in
     the duplicate list, that inode contains a block that is also
     free.   To  repair  the file system, the file system must be
     unmounted, and the -F option specified.

     If there are files encountered that are not  attached  to  a
     parent    directory,    they    will   be   moved   to   the
     /mount_point/lost+found directory.  If this  directory  does
     not  exist, you must create this directory first and make it
     sufficently large to hold the  expected  number  of  discon-
     nected  files if you wish this to happen.  Here is how to do
     this in the Bourne shell for a SAM file  system  mounted  on
     /sam:

     /bin/mkdir /sam/lost+found
     cd /sam/lost+found
     N=0
     while [ $N -lt 1024 ]; do
         touch TMPFILE$N
         N=`expr $N + 1`
     done
     rm TMPFILE*

OPTIONS
     -s scratch_dir
          Specifies the scratch directory.   If  specified,  this
          directory  is used for the scratch files that are used.
          The default scratch directory is /tmp.

     -F   Check and repair the file system. For all  inodes  that
          have  duplicate  blocks,  mark  those inodes offline if

          they have been archived.  If the  file  system  is  not
          unmounted samfsck will exit with an error.

     -G   Generate directory entry hash.   In  SAM-FS  3.5.0  and
          above,  a  hash  code was added to directory entries to
          speed up directory searches. This is particularly  use-
          ful  for longer file names. The -G option, when used in
          conjunction with the -F option, will  modify  directory
          entries which do not have a proper hash value to have a
          hash. When the -G option is used without the -F option,
          the  number  of directory entries which could be hashed
          is reported.  The presence  of  a  hash  value  has  no
          effect on versions of SAM-FS prior to 3.5.0.

     -S   Convert the filesystem from a non-shared filesystem  to
          a  shared  filesystem.  This option is not available to
          filesystems with a version 1 superblock.  The -F option
          must  also  be specified to convert a filesystem.  This
          will cause samfsck to update the on-disk structures  to
          make the filesystem shared.  Note that samfsck does not
          update the /etc/vfstab entry (see vfstab(4)),  the  mcf
          entry  (see  mcf(4)),  or  the  shared  hosts file (see
          samsharefs(1M)) for the filesystem, nor does it config-
          ure  the services file (see services(4)) for shared SAM
          operations.   These  must  be  configured  and  updated
          before the filesystem is converted.

     -U   Convert the filesystem from a shared  filesystem  to  a
          non-shared  filesystem.   The  -F  option  must also be
          specified to convert a filesystem.  The on-disk  struc-
          tures  of  the  filesystem  are  updated  to  make  the
          filesystem non-shared.   Note  that  samfsck  does  not
          update  the  /etc/vfstab  entry (see vfstab(4)), or the
          mcf entry (see mcf(4)).  These must be  configured  and
          updated before the filesystem is converted.

     -u  fs_version
          Convert the filesystem to the  given  fs_version.   The
          only  value that is valid for 5.0 is 2A.  Only Filesys-
          tems version 2 can be  converted  to  2A.   Filesystems
          version 2A can use 5.0 features like Online add/remove,
          Large  Host  Table  and  Project  IDs.   Note  that  2A
          filesystems are only mountable on 5.0 and not backwards
          compatible.  The -F option must also  be  specified  to
          convert  a  filesystem.   The on-disk structures of the
          filesystem are updated to make the  filesystem  version
          2A.   Note that version 2A filesystems are not backward
          compatible or reversible.

     -V   Turns on a verbose display of DEBUG  information.  This
          information is useful to Oracle analysts.

     -R   Rename the file system.  When specified along with  the
          -F  option,  the -R option will rewrite the super block
          with  the  disk  cache  family  set   name   found   in
          /etc/opt/SUNWsamfs/mcf.  No action will be taken if the
          -R option is used without the -F option. It  is  impor-
          tant  that  sam-fsd  be  notified  after  any change to
          /etc/opt/SUNWsamfs/mcf (see samd(1M)).

     -p   Return an indication of the filesystem's health.   Non-
          zero return indicates that the filesystem should not be
          mounted without first using samfsck to check and repair
          the  filesystem (see EXIT STATUS).  A zero return value
          indicates that the filesystem can  be  mounted  immedi-
          ately.

     -A   Convert the POSIX exteneded ACL to the  NFSV4  extended
          ACL.   This  operation  is  not  reversible,  and  only
          applies to file system versions  V2  or  V2A.   The  -F
          option  must also be specified to convert a filesystem.
          NOTE: This option is only available for Solaris release
          after Solaris 10.

EXIT STATUS
     The following exit values are returned:

     0         The filesystem is consistent.

     4         Nonfatal:  Filesystem  block  counts  need  to  be
               reconciled.

     5         Nonfatal: Filesystem blocks can be reclaimed.

     10        Nonfatal:  Orphan   inodes   can   be   moved   to
               lost+found.

     20        Fatal: invalid directory blocks exist, overlapping
               blocks mapped to 2 inodes exist. Files/directories
               will be marked offline if an archive  copy  exists
               or damaged if no archive copy exists.

     30        Fatal: I/O Errors occurred, but samfsck kept  pro-
               cessing. Filesystem is not consistent.

     35        Fatal: Argument errors terminated samfsck.

     36        Fatal: Malloc errors terminated samfsck.

     37        Fatal: Device errors terminated samfsck.

     40        Fatal: Filesystem superblock is invalid.

     41        Fatal: Filesystem option  mask  has  non-backwards
               compatible options.

     45        Fatal: Filesystem .inodes file is invalid.

     50        Fatal: I/O Errors terminated samfsck.

     55        Nonfatal:  The -p option was  specified,  and  the
               filesystem should be checked and repaired prior to
               mounting.

FILES
     /etc/opt/SUNWsamfs/mcf
                         The configuration file for samfs

     /etc/vfstab         File system defaults table

SEE ALSO
     samd(1M).  samsharefs(1M).

     mcf(4), services(4), vfstab(4).

Caret>