      DFSee version 13.0 24-11-2015  (c) 1994-2015: 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
 IRS       [irs] = Display/set 'Inode Recovery Signature' after (quick) FORMAT
 SUPER     [ 2 ] = Display the filesystem primary or [secondary] SUPERBLOCK
 SYNC       1|2  = Sync superblock, copy from 1st or from 2nd instance
 UUID -u id 1|2  = Display or set a UUID string, dialog if no id specified

 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
_______________________________________________________________________________

 CA  [lsn][opt] = Check Allocation for (current) INODE lsn

 Purpose:       Check allocation integrity for current INODE

 Parameters:    lsn         optional   LSN of the INODE
                opt         optional   Options:  v   = Verbose, show progress

 Output:                   Start of one file-extent (fragmented file)
                           One block (*), small green dot, allocation is OK
                           One block (*), big red dot is allocation error

                       (*): Switches to one dot per 1024 blocks after 32 blocks

                Also a summary is given with the number of (failed) sectors

 Remarks:       Fnode may be for a regular file (sectors must be ALLOCATED)
                or for a deleted file (sectors must be FREE)
_______________________________________________________________________________

 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:       -a        = search ANY files, deleted and normal  (with -d- only)
                -D          search directories only, not files+directories
                -c        = start from current sector, not start of volume
                -d-       = search outside known INODE areas too   (SLOW!)
                -f:first  = start at given Inode nr, default = 4   (unless -d-)
                -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

                By default, only known INODES are searched, which is at least
                a hundred times faster as searching the whole filesystem.

                Note: SLT will be built automatically when not present yet.
_______________________________________________________________________________

 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:       -a        = search ANY files, deleted and normal  (with -d- only)
                -D          search directories only, not files+directories
                -c        = start from current sector, not start of volume
                -d        = search within  known INODE areas only (default)
                -d-       = search outside known INODE areas too   (SLOW!)
                -f:first  = start at given Inode nr, default = 4   (undless -d-)
                -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

                By default, only known INODES are searched, which is at least
                a hundred times faster as searching the whole filesystem.

                Note: SLT will be built automatically when not present yet.
_______________________________________________________________________________

 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.
_______________________________________________________________________________

 IRS       [irs] = Display/set 'Inode Recovery Signature' after (quick) FORMAT

 Purpose:       Show and optional SET the 'Inode Recovery Signature'

 Parameters:    irs     optional   Inode recovery signature as an 8-digit hex
                                   value, or 0 as a 'wildcard' that will match
                                   any possible Inode.

 Options:       -!      Force interactive dialog to display/set the IRS value

 Output:        Display of the IRS value, and the current Inode-stamp used
                for any files/directories since the last format.

 Remarks:       The IRS value will be used as a match for the Inode-stamp
                that is the unique 'signature' for Inodes, having a value
                equal to the creation timestamp of the filesystem.
                This value changes on each (quick) format, so it is hard
                to find Inodes that have been created BEFORE the last format.

                A specific IRS value (when known, or found through analysis)
                or a wildcard value of 0 can be used to search for Inodes
                that do NOT have the current inode-stamp value.

                The resulting search result list can be used to recover these
                files to a recovery directory on another volume, but the
                filenames will be CONSTRUCTED from the indoe and sector number
                since the original filenames are not part of the Inode info.
_______________________________________________________________________________

 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
_______________________________________________________________________________

