      DFSee version 9.15 21-03-2009  (c) 1994-2009: Jan van Wijk
 =========================[ www.dfsee.com ]==========================

_______________________________________________________________________________

C O N T E N T S:
_______________________________________________________________________________

   Command reference    = overview of JFS specific commands
   Detailed description = description for every command


  Note: All generic commands can be found in DFSCMDS.TXT, for example:

        ALLOC,  CHECK,  CLONE,  RESIZE,  RECOVER,  SAVETO,  SCAN,  WIPE

        However, most of these command will not be functional for JFS
        filesystems due to currently lacking FS-specific functions.

_______________________________________________________________________________

C O M M A N D   R E F E R E N C E:
_______________________________________________________________________________

JFS specific commands

Active filesystem : JFS, specific commands are:



 \path-spec      = find and show file/directory relative to root (FINDPATH)
 ALLOC     [+|-] = Display allocation map for JFS, more [+] or less [-] detail
 BL              = Translate and display 'this' LSN as a block number
 BL block  [cmd] = Translate specified block-number to LSN, display using 'cmd'
 CA   [lsn][opt] = Check Allocation integrity for (current) INODE lsn
 DELFIND  [name] = Find deleted files, with name-info matching (partial) name
 DFSJFLDR  [img] = Create compressed imagefile containing the JFS LDR sectors
 DIRTY [d|c|m|#] = Display/set DIRTY, CLEAN, MOUNT status or numeric value #
 FILEFIND [name] = Find normal files, with name-info matching (partial) name
 FINO  [fDyzgui] = Search all or specified type of Inodes (f=file, D=directory)
 FIXBOOT [drive] = Create JFS bootsector from superblock, template and P-table
 FIXJFLDR  [img] = Replace the JFS bootloader on a bootable JFS partition
 FRAGFILES       = Search File Inode's for fragmented files  (internal nodes)
 IAG  [nr] [opt] = Show details about Inode Allocation Group data structure
 INAG [inode-nr] = Calculate LSN for aggregate Inode, or translate 'this' LSN
 INO             = Translate and display 'this' LSN as a Fileset1 INODE number
 INO   inode-nr  = Calculate LSN for a Fileset1 INODE number, default display
 QFI [name][opt] = Quick find Inodes matching specified options (for recovery)
 SUPER     [ 2 ] = Display the filesystem primary or [secondary] SUPERBLOCK
 SYNC       1|2  = Sync superblock, copy from 1st or from 2nd instance

 For an up-to-date list of commands, use the '?' command

 JFS specific sector types  (see ??? command)

             's' = JFS  superblock

             For an up-to-date list, use the '???" command
_______________________________________________________________________________

D E T A I L E D   D E S C R I P T I O N:
_______________________________________________________________________________

_______________________________________________________________________________

 BL               = Translate and display 'this' LSN as a block nr

 Purpose:       Display block value for the CURRENT sector 'this'

 Parameters:    none

 Output:        cluster value

 Remarks:       JFS specific, and alias for the generic 'CL' command
_______________________________________________________________________________

 BL   block [cmd] = Translate hex block number to hex LSN, display using cmd

 Purpose:       Display sector for specified block in default or cmd format

 Parameters:    block   mandatory  Block value 0 .. max-block

                cmd     optional   Command to use for displaying the sector

 Output:        display of the sector

 Remarks:       JFS specific, and alias for the generic 'CL' command
_______________________________________________________________________________

 CHECK   [drive] = Check filesystem integrity for drive-letter (CHKDSK)

 Purpose:       Perform a filesystem check, and report the errors found

 Parameters:    drive     PID or driveletter for partition to check.
                          When not specified, the CURRENT object is checked.

 Options:       -r        Force refresh of the Sector Lookup Table (SLT)
                          even if one exists already

                -M        Add file recovery information to the filesystem
                          for later undelete/recover (JFS filesystems only)


 Output:        Two lines for each sector in error that is found, the first
                lists the sector number, where it is referenced from and a
                short description. The second line is an error description

                For JFS the reported errors are:

                0x000001  Linked to some structure, but not in allocation-map
                0x000002  Allocated in allocation-map, but no known link
                0x000004  Sector does not contain a valid File or Dir Inode
                0x000008  File Inode has incorrect data allocation information
                0x000010  Sector does not contain a valid Directory Btree page
                0x000020  Invalid Inode number, not allocated, not in use
                0x000040  Invalid Inode number, larger than maximum for FS
                0x000100  Superblock 'JFS1' signature has incorrect value
                0x000200  Invalid Inode location, LSN out of range for FS
                0x800000  The filesystem is marked DIRTY (open files)
                          this may cause bogus errors to be displayed!

 Remarks:       Some of the errors are generic, but most are filesystem
                specific. The generic ones are also listed with the 'SLT'
                command in dfscmds.txt.
_______________________________________________________________________________

 DELFIND  [name] = Find deleted files, with name-info matching (partial) name

 Purpose:       Find deleted files, either all of them, or just the ones
                where available name-info contains the (partial) name given.
                The found files can be copied to another disk using the
                RECOVER or SAVEAS commands, just as with deleted files.

 Parameters:    name        optional   part of filename wanted, not a true
                                       wildcard, but may start and end in
                                       a '*' character

 Options:       -c          Start from current sector, not start of volume
                -v          Verbose search, list files while found (SLOW!)

 Output:        Find-result list (as "find -t:z") on screen and in memory

 Remarks:       All deleted files, or the ones where the fileinfo contains
                the given ASCII string, will be found and added to the list.

                The [name] selection aims at the FILENAME part only. To select
                on part of the full path for the file, use the wildcard select
                parameters on the DELSHOW and RECOVER commands afterwards.

                List can be manipulated as usual, best viewed with "delshow" or
                the equivalent "list -f"

                The 'name' parameter is useful only when name information is
                available with the INODE's. This is the case if a .LONGNAME EA
                (extended attribute) is present, if the sector lookup table
                (SLT) has been built, or if the name-info is explicitly added
                as DFSee-recovery info using the 'check -r -M' command or the
                corresponding menu: Mode=JFS -> Add/Update recovery filenames
_______________________________________________________________________________

 DFSJFLDR  [img] = Create compressed imagefile containing the JFS LDR sectors

 Purpose:       Create an imagefile with the JFS LDR sectors, for later fixing.
                This works on the 24 sector mini-filesystem / loader, located
                directly after the normal bootsector.

 Parameters:    img     optional   Name of imagefile with JFS LDR code
                                   (24 sectors) with a default of 'dfsjfldr'

 Output:        Progress and error messages
_______________________________________________________________________________

 DIRTY [d|c|m|#] = Display/set DIRTY, CLEAN, MOUNT status or numeric value #

 Purpose:       Modify the JFS volume's 'dirty' state

 Parameters:    state   optional   'clean' will set it clean (no CHKDSK)
                                   'mount' will set it to be cleanly mounted
                                   'dirty' will force CHKDSK on reboot
                                    (unless clean shutdown done afterwards)

 Output:        'superblock written' confirmation

 Remarks:       A volume is normally marked 'dirty' by the OS on the first
                write access to it, and set 'clean' on successful shutdown.
                This means a system crash will cause a CHKDSK on reboot
                It is most useful from boot diskettes (DOS or OS/2)

 Usage:         Below is an example of the actual usage text

                Usage: dirty  clean | dirty | status-value   [1|2]

                      0 = FS unmounted and clean
                      1 = FS mounted cleanly
                      2 = FS is dirty
                      4 = recovery failed (logredo())
                      8 = extendfs() in progress

                      4 & 8 can be combined with others

                  [1|2] : Update 1st or 2nd superblock only (default is both)

                JFS SB1 status is : 1 = Mounted cleanly
_______________________________________________________________________________

 FIXBOOT [drive] = Create JFS bootsector from superblock, template and P-table

 Purpose:       Fix corrupted bootsector for a JFS partition

 Parameters:    none

 Parameters:    drive       optional   Driveletter of OS/2 or eCS installed
                                       on this (logical) partition, use '-'
                                       to reset to 'data' partition
                                       When not specified, the letter will be
                                       determined from existing partition info

 Options:       -s        Use STANDARD bootsector code, not bootable

 Output:        Progress and confirmation info

 Remarks:       For any of the filesystems (FAT, HPFS, NTFS, JFS) check the
                corresponding DFSxxx.TXT documentation file for 'FIXBOOT'.

                This will create a valid bootsector based on OS/2 version 4.5
                bootsector code and size info from the partition table and/or
                the 1st superblock structure at relative sector 0x40.

                The partition table info (type and size) must still be valid,
                or a valid superblock must be present.
_______________________________________________________________________________

 FIXJFLDR  [img] = Replace the JFS bootloader on a bootable JFS partition

 Purpose:       Fix a damaged JFS loader so eCS will boot correctly again.
                This works on the 24 sector mini-filesystem that is located
                directly after the normal bootsector.

 Parameters:    img     optional   Name of imagefile with JFS LDR code
                                   (24 sectors) with a default of 'dfsjfldr'

 Output:        Progress and error messages
_______________________________________________________________________________

 FILEFIND [name] = Find normal files, with name-info matching (partial) name

 Purpose:       Find non-deleted files, either all of them, or just the ones
                where available name-info contains the (partial) name given.
                The found files can be copied to another disk using the
                RECOVER or SAVEAS commands, just as with deleted files.

 Parameters:    name        optional   part of filename wanted, not a true
                                       wildcard, but may start and end in
                                       a '*' character

 Options:       -c          Start from current sector, not start of volume
                -v          Verbose search, list files while found (SLOW!)

 Output:        Find-result list (as "find -t:f") on screen and in memory

 Remarks:       All non-deleted files, or the ones where the fileinfo contains
                the given ASCII string, will be found and added to the list.

                The [name] selection aims at the FILENAME part only. To select
                on part of the full path for the file, use the wildcard select
                parameters on the DELSHOW and RECOVER commands afterwards.

                List can be manipulated as usual, best viewed with "delshow" or
                the equivalent "list -f"

                The 'name' parameter is useful only when name information is
                available with the INODE's. This is the case if a .LONGNAME EA
                (extended attribute) is present, if the sector lookup table
                (SLT) has been built, or if the name-info is explicitly added
                as DFSee-recovery info using the 'check -r -M' command or the
                corresponding menu: Mode=JFS -> Add/Update recovery filenames
_______________________________________________________________________________

 FINO  [fDyzgui] = Search all or specified type of Inodes (f=file, D=directory)

 Purpose:       Find any type of Inode, anywhere in the filesystem

 Parameters:    types   optional   String of Inode type-letters:

                 f          File Inodes, all regular files
                 D          Directory Inodes
                 y          Deleted directory Inodes
                 z          Deleted file Inodes
                 g          Aggregate Inodes (system/meta files)
                 i          Invalid Inodes (ZERO timestamps)
                            Default is search file/directory inodes

 Options:       -v          Verbose search, list files while found (SLOW!)

 Output:        Path and filenames of files being found, unless -v- is used.

 Remarks:       Result, in the form of the found files is in the sector list
_______________________________________________________________________________

 FRAGFILES       = Search File Inode's for fragmented files  (internal nodes)

 Purpose:       Find Inodes for files that have many (more than 8) fragments

 Parameters:    none

 Output:        Info on files being found, path and filename if available

 Remarks:       Result, in the form of the found files is in the sector list
_______________________________________________________________________________

 IAG  [nr] [opt] = Show details about Inode Allocation Group data structure

 Purpose:       Display IAG structure details, including calculated header

 Parameters:    iagnr   optional   IAG number, 0..n, or '*' for ALL

 Options:       -a      Show info on aggregate IAG, not Fileset-1
                -v      Verbose display if IAG control page summary data

 Output:        Display of specified IAG, or a summary of available ones

 Remarks:       Aggregate IAG's map JFS filesystem structures, no user files.
                When no iagnr is specified, a summary will be displayed.
_______________________________________________________________________________

 INAG    [inode] = Calculate LSN for aggregate Inode, or translate 'this' LSN

 Purpose:       Locate aggregate Inode from inode-nr, or calculate nr from LSN

 Parameters:    inode   optional   Inode-number for the aggregate Inode

 Output:        Display of the found Inode, or just the calculated Inode-nr

 Remarks:       Aggregate Inodes map JFS filesystem structures, no user files
_______________________________________________________________________________

 INO     [inode] = Translate and display 'this' LSN as a Fileset1 INODE number

 Purpose:       Locate fileset-1 Inode from inode-nr, or calculate nr from LSN

 Parameters:    inode   optional   Inode-number for the fileset-1 Inode

 Output:        Display of the found Inode, or just the calculated Inode-nr

 Remarks:       Fileset-1 Inodes map all user files since the OS2/Linux JFS
                implementation only uses one fileset.
_______________________________________________________________________________

 QFI [name][opt] = Quick find Inodes matching specified options (for recovery)

 Purpose:       Quickly find Inodes for recovery or undelete

 Parameters:    name    optional   partial name to match in filename component

 Options:       -f:first           start from specified Inode nr (default = 4)
                -t:type            Inode type; f=file, z=deleted (default 'f')
                -v-                Do not list while searching   (much faster)

 Output:        Path and filenames of files being found, unless -v- is used.

 Remarks:       Result, in the form of the found files is in the sector list

                QFI, unlike FILEFIND/DELFIND require the basic JFS filesystem
                structures to be intact, allowing it to restrict the search
                to the actual INODE areas only
_______________________________________________________________________________

 SUPER          = Display the filesystem SUPERBLOCK sector

 Parameters:    none

 Purpose:       Display the contents of the JFS superblock

 Output:        Most important fields of the superblock
_______________________________________________________________________________

 SYNC       1|2  = Sync superblock, copy from 1st or from 2nd instance

 Purpose:       Synchronize the two copies of the JFS superblock

 Parameters:    from    mandatory  direction of the sync operation

 Output:        'superblock written' confirmation

 Remarks:       This should only be needed in very rare cases

 Usage:         Below is an example of the actual usage text

                Usage: sync   1 | 2

                   1 = sync 1st copy at 0x40 to 2nd at 0x78
                   2 = sync 2nd copy at 0x78 to 1st at 0x40
_______________________________________________________________________________

