Escolar Documentos
Profissional Documentos
Cultura Documentos
A directory is a unique type of file that contains only the information needed to access files or
other directories. As a result, a directory occupies less space than other types of files.
File systems consist of groups of directories and the files within the directories. File systems
are commonly represented as an inverted tree. The root directory, denoted by the slash (/)
symbol, defines a file system and appears at the top of a file system tree diagram.
Some of the most important system management tasks have to do with file systems,
specifically:
1. Allocating space for file systems on logical volumes
2. Creating file systems
3. Making file system space available to system users
4. Monitoring file system space usage
5. Backing up file systems to guard against data loss if the system fails
6. Maintaining file systems in a consistent state
Note:The maximum number of logical partitions per logical volume is 32,512.For
more information on file system logical volume characteristics,see the chlv
command.
1. JFS and JFS2 file systems use database journaling techniques to maintain
structural consistency. This prevents damage to the file system when the
system is halted abnormally.
2. The operating system mounts the file system during initialization.
3. Each JFS or JFS2 located on a separate logical volume.
4. JFS is the basic file system type that supports the entire set of file system
commands.
5. JFS2 is the basic file system type that supports the entire set of file system
commands.
6. This multiple file system configuration is useful for system management
functions such as backup, restore, and repair, because it isolates a part of
the file tree so that you can work on it.
Note :A difference between JFS and JFS2 is that JFS2 is designed to support
large files and large file systems.
2. Inodes :
The inode contains control information about the file, such as type, size, owner, and the date
and time when the file was created, modified, or last accessed. It also contains pointers to
data blocks that store the actual data of the file. Every file has a corresponding inode.
For JFS file systems, the total number of i-nodes in a file system limits the total number of
files and the total size of the file system. The JFS provides the nbpi (number of bytes per inode) parameter that affects the number of i-nodes in a file system. For every nbpi bytes of
your file system, there will be an inode created. The total number of inodes is fixed.
Note:The nbpi values needs to be correlated with allocation group size.
The JFS restricts all file systems to 16M (224 ) i-nodes.
JFS2 file systems manages the necessary space for inodes dynamically so there is not any
nbpi parameter.
3.Data blocks:
Data blocks store the actual data of the file or pointers to other data blocks. The default value
for disk block size is 4 KB.
4.Allocation group:
An allocation group consists of inodes and its corresponding data blocks. An allocation
groups spans multiple adjacent disk blocks and improves the speed of I/O operations. Both
JFS and JFS2 file systems use allocation groups. For a JFS file system, the allocation group
size can be specified when the file system is created.
Allocation Group
Size in Megabytes Allowable NBPI Values
8 512, 1024, 2048, 4096, 8192, 16384
16 1024, 2048, 4096, 8192, 16384, 32768
32 2048, 4096, 8192, 16384, 32768, 65536
5 Fragments
Fragments of logical blocks can be used to support files smaller than the standard size of the
logical block (4 KB). This rule applies only to the last block of a file smaller than 32 KB.
For JFS file systems only, you have the option to use compression to allow all logical blocks
of a file to be stored as a sequence of contiguous fragments. Compression for a file system
will increase the amount of CPU and I/O activity when using that file system.
These features can be useful to support a large number of small files. Fragment size must be
specified for a file system at installation time. Different file systems can have different
fragment sizes.
The JFS supports four fragment sizes of
512
,
1024
,
2048
, and
4096
byte units of contiguous disk space. The JFS maintains fragment addresses in i-nodes and
indirect blocks as 28-bit numbers. Each fragment must be addressable by a number from 0 to
(
228).
NBPI * 224
or
FragmentSize * 228
Difference Between JFS & JFS2 :
Function
JFS
JFS2
1 TB
4 PB
64 GB
4 PB
Number of i-nodes
Fixed, set at
filesystem
creation
Dynamic
Inode size
128 bytes
512 bytes
Fragment size
512
512
Block size
4096
4096
Directory organization
Linear
B-tree
Compression
Yes
No
sys.sys
root.syste
m
SGID=on
SGID=off
Quotas
Yes
Yes
crfsCreate a file system. This command can be used to create a file system on an
existinglogical volume, or it can be used as an all in one command to create both a logical
volume and file system at once.
chfs Change file system characteristics. This can be used to increase the size of a file
system.
rmfs Remove a filesystem, its associated logical volume, and its entry in /etc/filesystems.
crfs:Its purpose is to add a file system. The crfs command creates a file system on a logical
volume within a previously created volume group. A new logical volume is created for the
file system unless the name of an existing logical volume is specified using the -d. An entry
for the file system is put into the /etc/filesystems file.
You can use the File Systems application in Web-based System Manager (wsm) to change file
system characteristics. You could also use the System Management Interface Tool
(SMIT)smit crfs fast path to run this command.
Notes: The file system is created with the setgid (set group ID) bit enabled. This
determines the default group permissions. All directories created under the new
file system will have the same default group permissions.
Eg:1. To make a JFS on the rootvg volume group with nondefault fragment size
and nondefault nbpi. type
Its purpose is to changes attributes of a file system. The chfs command changes the attributes
of a file system. The new mount point, automatic mounts, permissions, and file system size
can be set or changed. The FileSystem parameter specifies the name of the file system,
expressed as a mount point.
Some file system attributes are set at the time the file system is created and cannot be
changed. For the Journaled File System (JFS), such attributes include the fragment size, block
size, number of bytes per i-node, compression, and the minimum file system size. For the
Enhanced Journaled File System (JFS2), the block size cannot be changed.
The chfs command also accepts attributes that have no meaning to the file system and file
system does not act on the attributes.. The attributes are saved in the /etc/filesystems file.
The /etc/filesystems limitation is 512 bytes only if exceed the stanza is no longer recognised.
You could also use the System Management Interface Tool (SMIT) smit chfs fast path to run
this command.
A new commit type has been added to the mount command. The syntax is:
cmtype=[gc|ac]
where
gc=group commit (the commit log record is synchronously written to disk before the system
call returns,If a system failure occurred, recent changes will not be lost the crash recovery.)
ac=asynchronous commit (the commit log record is asynchronously written to the disk when
the system call returns,improve the system performance,f a system failure occurred, recent
changes will not be lost the crash recovery)
Eg:# chfs -a cmtype=[gc|ac] -a size=+1 /j2.0
Only the root user or a member of the system group can run this command.
1. To change the file system size of the /test Journaled File System, type
You could also use the System Management Interface Tool (SMIT) smit lsfs fast path to run
this command.You can use the File Systems application in Web-based System Manager
(wsm) to change file system characteristics.
1. To show all file systems in the /etc/filesystems file, type:
#lsfs
2. To show all file systems of vfs(virtual file system) type jfs, type:
# lsfs -v jfs
3. To show the file system size, the fragment size, the compression algorithm
(if any), and the number of bytes per i-node as recorded in the superblock
of the root file system, type:
# lsfs -q /
># istate <filemane>(show the data of file system)
Example:1.How to check Inode Number.
# ls li
2.How To copy superblock content when it is corrupted.
# dd count=1 bs=4k skip=31 seck=1 if=/dev/lv00 of=/dev/lv00.
File System Management A file system is a complete directory structure, including a root directory and any
subdirectories and files beneath it.
File systems are confined to a single logical volume. Some of the most important system
management tasks are concerning file systems, specifically:
Backing up file systems to guard against data loss in the event of system
failures
Mounting and unmounting file systems:Mounting is a concept that makes file systems, files, directories, devices, and special files
available for use at a particular location. It is the only way a file system is made accessible.
The mounting point(directory) must be created before the file system is mounted.
Use the mount command as follows:
# mkdir <directory name>
# mount <directory_name> (name of directory on which you want to mount)
Or
# mount {-a|all}
# mount (Display the mounted file systems)
O/P
node mounted mounted over vfs date options
/dev/hd4 / jfs2 Nov 27 12:36 rw,log=/dev/hd8
/dev/hd2 /usr jfs2 Nov 27 12:36 rw,log=/dev/hd8
/dev/hd9var /var jfs2 Nov 27 12:36 rw,log=/dev/hd8
/dev/hd3 /tmp jfs2 Nov 27 12:36 rw,log=/dev/hd8
/dev/hd1 /home jfs2 Nov 27 12:36 rw,log=/dev/hd8