Está en la página 1de 95

Inside the IFS

6/1/06 By: Tom Huntington


Understanding The IFS
 The Basics
 File Systems
 Commands
 Journaling
 Save/Restore
 Security
The Basics
 Added to OS/400 V3R1 in 1994
 Integrates iSeries with UNIX, Windows, and others
 Directory structure much like your PC
 Provides access to data stored in integrated or remote
xSeries servers, Novell servers, or other remote iSeries
servers
 Contains pre-defined file systems:
 All contained within a single root directory
 Each with their own limitations and rules
 Library structure is just one of these structures
The Basics
 Many applications use the IFS:
 Integrated xSeries (Intel processor)
 Various imaging packages
 NetServer (Explorer access to the IFS)
 CD images for unattended installation
 PASE environment for UNIX Applications
 Client Access executables
 TCP/IP configuration files
 Tomcat HTTP server
The Basics
Libraries and Objects
vs.
Directories and Stream Files
Libraries And Objects
 Traditional OS/400 file system
 Every object has an object type associated with it
 Programs can only be programs
 Files can only be files
 Every object type has a specific purpose
 Files typically contain fixed length records
 Allows only one level (or two with file members) of
hierarchy
Directories And Stream Files
 Directories start at a root level “/”
 Directories support stream files
 Stream Files (STMF) are like PC files
 They do not contain fixed length records
 Contain a continuous “stream” of data
 Think of audio, image, video, XML, and HTML files
 IFS files are also called LINKS in OS/400 and i5/OS
 High performance data access for attached clients
IFS-Related Commands
 IBM has provided familiar DOS commands
 MD – Make (create) Directory
 CD – Change (current) Directory
 RD – Remove (delete) Directory
 COPY – Copy object or subdirectory
 DEL – Remove (delete) link or object
 IBM provides APIs for accessing IFS data programmatically
 IBM Integrated File System V5R3 User Guide
 iSeries Network:
 Accessing Data Files from the IFS in RPG January 2004
 Many other IFS programming articles available at iSeries Network and elsewhere
Understanding The IFS
 The Basics
 File Systems
 Commands
 Journaling
 Save/Restore
 Security
File Systems
 Eleven file systems are included in the IFS
 Each file system is located under the root “/”
 Each file system has rules and restrictions
 User directories can be at the same level as the
supplied file systems’ directories
 Viewed with the WRKLNK command
 “Work with Object Links”
 Think of a link as an object or path to an object
WRKLNK – Work With Object Links
WRKLNK – Root Directory
WRKLNK – Work With Object Links
WRKLNK – Work With Object Links
File Systems
/ “root”
QSYS.LIB
QDLS
QOpenSys
QOPT
QNetWare
QNTC
QFileSrv.400
User-Defined
/ “root” Directory
 Uses many PC DOS-like commands
 MD, RD, CD, DEL, COPY
 Uppercase and lowercase object names are
maintained, but no distinction is made
 /CHUCK and /chuck refer to the same directory
 Each part of a path name can be up to 255 characters
 Full path name can be extremely long (up to 16 MB)
 Other file systems branch off of the root
WRKLNK – Root
File Systems
/ “root”
QSYS.LIB
QDLS
QOpenSys
QOPT
QNetWare
QNTC
QFileSrv.400
User-Defined
QSYS.LIB
 Structure supports traditional library structure
 Object names are converted to uppercase
 Typically the environment in which RPG and
COBOL programmers write code
 QSYS.LIB objects can be accessed with traditional
OS/400 interface or with IFS CL commands
QSYS.LIB - WRKLNK
QSYS.LIB - WRKLNK
File Systems
/ “root”
QSYS.LIB
QDLS
QOpenSys
QOPT
QNetWare
QNTC
QFileSrv.400
User-Defined
QDLS – Document Library System
 Structure supports the IBM OfficeVision Document Library
Objects (DLO) known as folders and documents
 Available before V3R1 and before the IFS
 Object names are converted to uppercase
 Both DLO and IFS commands can be used
 Multiple directory levels (folder-in-folder) supported
 Naming is limited to 8 characters plus a 3-character extension
File Systems
/ “root”
QSYS.LIB
QDLS
QOpenSys
QOPT
QNetWare
QNTC
QFileSrv.400
User-Defined
QOpenSys – The UNIX Structure
 Supports UNIX open standards POSIX and XPG
 Supports uppercase and lowercase naming
 No limit to the depth of the directory hierarchy
 File and directory names can be very large
 The directory name is not case-sensitive
 /QOpenSys = /qopensys = /QOPENSYS
 Content of this directory is case sensitive
QOpenSys - WRKLNK
QOpenSys - WRKLNK
QOpenSys - WRKLNK
File Systems
/ “root”
QSYS.LIB
QDLS
QOpenSys
QOPT
QNetWare
QNTC
QFileSrv.400
User-Defined
QOPT – Optical File System
 HFS is an older technology, whereas the IFS access to
QOPT is based on the ILE
 HFS access to QOPT provides commands that IFS access
does not provide, such as commands to work with optical
files
 Naming convention:
/QOPT/volumeID/directory/subdir/file
 The CDROM drive volume is displayed here
QOPT - WRKLNK
QOPT - WRKLNK
QOPT - WRKLNK
File Systems
/ “root”
QSYS.LIB
QDLS
QOpenSys
QOPT
QNetWare
QNTC
QFileSrv.400
User-Defined
QNetWare – Novell Netware
 Allows access to data on a local or remote Integrated xSeries Server
running Novell Netware 4.10 or 4.11
 Allows access to remote Netware servers running Netware 3.12,
4.10, 4.11, or 5.0
 Only available if OS/400 Enhanced Integration for Novell NetWare
is installed on the system
 Volumes can be mounted using a NetWare path such as:
/QnetWare/HELP.TRE/USA.C/MINN.O/TRAIN.OU/VOL1.CN

where: TRE=an NDS tree, C=country, O=organization,


OU=organizational unit, CN=common name
File Systems
/ “root”
QSYS.LIB
QDLS
QOpenSys
QOPT
QNetWare
QNTC
QFileSrv.400
User-Defined
QNTC – Windows NT/2000
 Provides access to objects stored on Integrated xSeries
adaptors running Windows NT 4.0 or higher
 Allows access to remote Windows servers,
allowing iSeries and Windows applications to
access the same data
 Use IFS commands or APIs to manipulate the data
 Windows directories cannot be created from the iSeries
 SAV/RST commands cannot be used
QNTC – Windows NT/2000
 The QSERVER subsystem must be active
 The TCP/IP server job *NETSVR must be started
 The iSeries Netserver job is called QZLSSERVER in
QSERVER subsystem
 Authenticates using the requesting job’s user profile
 User profile and password must match the Windows’ user
ID and password
 To create a link to a remote server:
MD ‘/QNTC/servername’
QNTC – Windows NT/2000
QNTC – Windows NT/2000
QNTC – Windows NT/2000
QNTC – Windows NT/2000
QNTC – Windows NT/2000
File Systems
/ “root”
QSYS.LIB
QDLS
QOpenSys
QOPT
QNetWare
QNTC
QFileSrv.400
User-Defined
QFileSrv.400
 Provides iSeries-to-iSeries directory visibility
 Like QNTC, it uses the OS/400 file server
 Requires the QSERVER subsystem to be active
 Authenticates using the requesting job’s user profile and
password
 The iSeries-to-iSeries connection is maintained for about
two hours
 Subdirectories (system names) in QFileSrv.400 are
removed during IPL and must be re-created
QFileSrv.400 – System ITEACH
QFileSrv.400 – System ITEACH
QFileSrv.400 – System ITEACH
QFileSrv.400 – System ITEACH
File Systems
/ “root”
QSYS.LIB
QDLS
QOpenSys
QOPT
QNetWare
QNTC
QFileSrv.400
User-Defined
UDFS - User-Defined File Systems
 File system created and maintained by you
 You decide whether file names are case-sensitive
 Commands:
 CRTUDFS – Create a UDFS
 DSPUDFS – Display a UDFS
 MOUNT (ADDMFS) – Mount a UDFS
 UNMOUNT (RMVMFS) – Unmount a UDFS
 To access UDFS objects, it must be mounted “over” another
directory
 Created in /dev/QASPnn/name.udfs as a BLKSF
Eleven File Systems
 We have covered nine of the eleven file systems.
There are two others are:
 Independent ASP QSYS.LIB file systems
 NFS (Network File System)
 There are also Integrated xSeries Server storage
spaces, located as a User-Defined file system in the
/dev directory
IXS – Integrated xSeries Servers
 Intel card inserted in the iSeries
 Uses DASD on iSeries
 Windows or Netware manage this storage
 Storage space is created using:
 CRTNWSSTG – Create NWS Storage
 WRKNWSSTG – Work With NWS Storage
 ADDNWSSTGL – Link DASD to IXS Description
 These named storage spaces are stored in directory
/QFPNWSSTG.
Understanding The IFS
 The Basics
 File Systems
 Commands
 Journaling
 Save/Restore
 Security
Commands
 Directory commands
 Create or remove current directory
 Link Commands
 Much like the LS command in UNIX, or
the DIR command in DOS
 Create multiple paths to the same file
 Copy commands
 Copy library-to-directory, directory-to-library
 Check in, check out
 Save and Restore commands
 Authority commands
Directory Commands
 MD (CRTDIR); RD (RMVDIR)
 Create/remove new directory
Directory Commands
 CD (CHGCURDIR); DSPCURDIR; RTVCURDIR
 Change current directory
 Starts with home directory in user profile
 Current directory starts from user profile
 RTVCURDIR is used in programs only
Link Commands
 A link is a path to a file in the IFS
 Files can have multiple links
 Links can cross file systems
 A “hard” link points to an object that exists
 Removing all hard links deletes the file
 A “symbolic” link points to the location of an object,
even if the object does not currently exist
Link Commands
 WRKLNK – Work With Object Links
 ADDLNK, RMVLNK (DEL), DSPLNK, RNM (REN)
 Somewhat like WRKOBJ in OS/400, LS in UNIX, and
DIR in DOS
Copy Commands
 COPY (CPY); MOVE (MOV) - Copy or Move object
 Can copy an entire sub-directory
 Use wildcards to copy multiple objects
 CPYTOSTMF; CPYFRMSTMF – Copy To/From a
stream file to a library object
 CPYTOIMPF; CPYFRMIMPF – Copy To/From a
spreadsheet import format
Copy Commands
 CPYTOSTMF; CPYFRMSTMF
 Copy data to/from a library database file member to/from a stream
file
 Can copy save files to stream files
 Use to create a PC-type text (.TXT) file
 Convert data from EBCDIC to ASCII, or any valid code page
 Limitations:
 Database file cannot have multiple fields
 Date fields are not copied
CPYTOSTMF
CPYFRMSTMF
Copy Commands
 CPYTOIMPF; CPYFRMIMPF
 Copy a database file to a PC-type file with delimiters
 Fixed or variable field lengths in the PC file
 Create a comma-separated, variable-type, PC file (.CSV)
Understanding The IFS
 The Basics
 File Systems
 Commands
 Journaling
 Save/Restore
 Security
Journaling
 IFS journaling commands
 STRJRN – Start Journaling an IFS object
 ENDJRN – End Journaling an IFS object
 Journaling IFS objects requires a journal and a journal
receiver in the QSYS.LIB structure (libraries)
 CRTJRNRCV
 CRTJRN
 Use wildcards to start journaling for multiple
objects in a directory
 Can use iSeries Navigator to start journaling
an IFS object
Understanding The IFS
 The Basics
 File Systems
 Commands
 Journaling
 Save/Restore
 Security
Saving And Restoring The IFS
 More and more data is being stored in the IFS
 Knowledge of these structures simplifies backups
 Commands:
 SAV - Save Directory Objects
 RST - Restore Directory Objects
 IFS directory structures can be very complex
 Data backed up from the IXS (integrated xSeries
Server) is difficult to restore in pieces
SAV To Back Up All Directories

QSYS.LIB naming convention


SAV To Back Up All Directories
/QSYS.LIB is everything
in Library file system

/QDLS is everything in
Document file system (QDOC)
SAV To Back Up All Directories
SAV To Back Up All Directories

Change Update history to *YES


Restore QOpenSys File System
 Restore all data in /QOpenSys from last full save to
tape:
 RST DEV('/qsys.lib/tap01.devd') OBJ(('/QOpenSys/*'))
SUBTREE(*ALL) OPTION(*ALL) ALWOBJDIF(*ALL)
 Restore all data in /QOpenSys from changes during
the week from the save file:
 RST DEV('/qsys.lib/qgpl.lib/tmpsav.file')
OBJ(('/QOpenSys/*')) SUBTREE(*ALL) OPTION(*ALL)
ALWOBJDIF(*ALL)
Understanding The IFS
 The Basics
 File Systems
 Commands
 Journaling
 Save/Restore
 Security
IFS (Directory) Authority
 Use directory authority the same way that you use
library authority
 Group objects in a directory to secure the directory
rather than individual objects
 Uses OS/400, UNIX, and PC-type security
 Requires *SECADM special authority and rights to
the user profile being changed on the IFS object
 IFS authority is sometimes referred to as privileges
IFS (Directory) Security Commands
 DSPAUT – Display Authority
 WRKAUT – Work With Authority
 CHGAUT – Change Authority
 CHGOWN – Change Directory Owner
WRKAUT – Work With Authority
CHGAUT - Change Authority
Lock *PUBLIC Out Completely!
In summary we have learned…
 Stores several types of data
 It can be manipulated
 It can be backed up
 It can be journaled
 It can be secured
Robot/SAVE v11 Features

Compliance release
 Sox compliance reports
 What was restored to my system?
 Save encryptions
 Key management (passwords)
 Levels of encryptions
 Data protection
 AES and DES
Robot/SAVE v11 Features
Encryption Components for Robot/SAVE
 Libraries
 RBSKEYLIB
 RBSPGMLIB, RBSDTALIB
 RBSRSTLIB
 Save configuration
 Setup to encrypt at library level
 Setup to encrypt at object level
Robot/SAVE Version 11.0
New Option on System Setup
Establishes Level of Encryption
and Key Phrase
Always Encrypt for Library Level
Object Level Default Value
Save Encrypted at Backup Set
Library
Encryption at Object Level for
Specific Object
Robot/SAVE 11
 Tape Encryption
 Tape Management
 Automated Backups
Thank you for joining me
today!
Contact Information:

Web site: www.helpsystems.com


Telephone: 1-800-328-1000 or
1-952-933-0609
Speaker: tom.huntington@helpsystems.com

También podría gustarte