home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
-
-
-
- Chapter 4
- Files and Directories
-
-
-
- NetWare 386 also offers several new features relating to
- the organization of files and directories. This chapter
- includes the following sections:
-
- ■ Directory Tables
- ■ Multiple Name Spaces
- ■ Sparse Files
- ■ Salvage Files
-
-
-
- Directory Tables
-
- Each volume contains a file called the Directory Table,
- which is divided into one or more directory blocks.
- Regardless of the disk allocation block size for that
- volume, the size of each directory block is always 4KB.
- Each directory block can accommodate 32 128-byte entries.
- There are several kinds of entries: file entries for
- various workstation operating systems, directory entries
- for various workstation operating systems, file trustee
- entries, directory trustee entries, and free entries.
- Each entry stores information about files, directories,
- file trustees, directory trustees, or other entities.
-
- Volume SYS starts out with six directory blocks in its
- Directory Table. Other volumes start out with two
- directory blocks in their Directory Tables. When a volume
- needs to add another directory block to its Directory
- Table, the server allocates another block. The maximum
- number of directory blocks per volume is 65,536.Since each block can accommodate 32 entries, the maximum
- number of Directory Table entries per volume is
- 2,097,152. The server does not cache entire Directory
- Tables. It only caches directory blocks that are in use.
-
- Multiple Name Spaces
-
- Each file stored on a given volume has a DOS name, a name
- that any DOS workstation operating system can recognize.
- This DOS name is stored in a file entry in the volume's
- Directory Table. The file entry stores information such
- as file attributes, the length of the DOS file name (1
- byte), the DOS file name itself (1 to 12 bytes), the
- owner object ID, the creation date and time, and a link
- to a file trustee entry.
-
- However, different workstation operating systems (DOS,
- OS/2, UNIX, Macintosh) may have different conventions for
- naming files. These conventions include name length,
- legal characters, case-sensitivity or insensitivity, data
- and resource forks, etc. To allow various workstations
- to create files using their own familiar naming
- conventions, NetWare 386 supports Multiple Name Spaces.
-
- Multiple Name Spaces really means multiple directory
- entries. For example, a server that is configured to
- support DOS and Macintosh file names would generate two
- 128-byte file entries for every file. One file entry
- would contain the file attributes, owner object ID,
- creation date and time, DOS file name generated by a
- server algorithm, etc. The second file entry would
- contain the Macintosh file name and Macintosh Finder
- information. Servers that support Multiple Name Spaces
- use one file/directory entry for each name space
- supported.
-
- The preceding two paragraphs apply to directory names as
- well.
-
- NetWare 386 also supports multiple-byte characters for
- file, directory, and bindery names. This applies to
- workstation operating systems that require 2 bytes to
- represent one character. With NetWare 386, wildcard
- pattern-matching has changed to accommodate multiple-byte
- characters. Wildcard pattern-matching now uses two
- characters. The first character is 0FFh and the second
- character is a wildcard character like * or ?.Because NetWare 386 supports a maximum file size of 4GB,
- files can span physical disks. File size is limited by
- 4-byte byte-count fields and by 4-byte seek pointers. As
- discussed earlier, minimum file size is one disk
- allocation block, whether the disk allocation block is
- 4KB, 8KB, 16KB, 32KB, or 64KB.
-
- Sparse Files
-
- NetWare 386 also supports sparse files. Databases
- sometimes create sparse files. The following is an
- example. Suppose the disk allocation block size for
- volume VOL1 is 4KB. Also suppose that a database opens
- a new file, seeks out to the 1,048,576th byte, writes 5
- bytes of data, and closes the file. An inefficient server
- would save to disk this entire file: 256 zero-filled disk
- allocation blocks (the first 1MB) and then one more disk
- allocation block with 5 bytes of data and 4,091 zeroes.
- This method wastes 1MB of disk space. The NetWare server
- does not write the initial, zero-filled megabyte to disk.
- It writes only the last block to disk. If a program tries
- to read from the file's first megabyte, the server
- generates and returns zeroes.
-
- Salvage Files
-
- NetWare 386 treats deleted files differently than did
- past versions of NetWare. In the past, a user could only
- recover the file (or files) deleted in the last ERASE or
- DELETE command. Files deleted in earlier delete commands
- were lost forever. NetWare 386 saves deleted files (and
- all information about those files) in their default
- directory until the server runs out of disk allocation
- blocks on the volume or until the user deliberately
- purges the deleted files. If the user deletes the file's
- default directory too, the file is saved in a DELETED.SAV
- directory located in the volume's root directory.
-
- The user can view a list of deleted files in a directory,
- and recover files using the SALVAGE utility. Recovered
- files contain information about who deleted the files and
- when they were deleted. This means that a lot of deleted
- files will remain in a recoverable state for a long time.
- When the server does run out of disk allocation blocks,
- it purges deleted files on a first deleted-first purged
- basis.Files and directories can also be purged immediately, as
- they are deleted. There are two possible ways to do this:
- Using the SET command to disable the salvageable file
- feature, or setting the Purge file and directory
- attribute.
-
- To use the SET command, simply type SET and the
- parameter, Immediate Purge of Deleted Files. Set the
- Immediate Purge to On, and all files will be purged
- immediately when they are deleted. This increases
- performance, but at the cost of losing the salvageable
- file feature.
-
- When a file is flagged with the Purge attribute, the file
- is purged when it is deleted. When a directory is flagged
- with the Purge attribute, any file in that directory is
- purged when the file is deleted. Such files and
- directories cannot be recovered with the SALVAGE utility.
- (For more information on the Purge attribute, see Chapter
- 5, File and Directory Security.)
-
-