Solaris File System Management and solaris System Management
Different operating systems use different types of file systems
1. File (Management) System: A data structure used to manage and control files and directories.
File Systems in Windows: ntfs, fat32, and fat64
File Systems in Solaris: ufs, zfs
File System in Linux: ext3 ext4
Aix: jfs jis2 hp: hfs jfs
2. Solaris File System Type:
1. Disk file system UFS (Unix file system) ZFS (zettabyte file system)
2. network file system: NFS network file system
3. swap file system the swap file system is a memory-replaced file system.
4. The/proc process File System resides in the memory.
3 and 4 are called virtual file systems. Most of them are based on memory and hard disks. 3 is based on the hard disk.
View the details through df-h:
3. The file system is a hierarchical structure.Used to organize and store other directories and files.
4. file classification: Common files, device files, MPs queue devices, link files, and directory files.
5. Storage Structure of the file system:It is also segmented, with user data and metadata (file system structure information ).
File System Structure: 0 # block: boot block. 1 # super block. 2 ---- n blocks.
Each file corresponds to an I node.
Ls-l is from the I node. An I node is a data structure that controls and manages files and stores file description information. There are uid gid file size, access time, physical block number, and so on.
A node corresponds to a file.
6. Access to the file system:
Step by step
7. Several commands:
LnHard links are backups and soft links are shortcuts.
Deleting is faster than copying. Deleting a node only deletes the node. Copy data. You cannot create a link to a directory, but only for files. Because the hard link points to the data storage location.
Partitioning is to define the range x --- y in the disk. The hard link and data must be in the same partition.
Df command: get information about the File System
Du (disk xxx): number of disk blocks occupied by a directory or file
Introduction to several file systems:
I. UFS file system:
Partitioning, formatting, creating a mount point, and attaching a partition to a mount point
Partition:
Format: (meaning of formatting)
Partition:
When there is no partition, We can p to enter the partition (partition meaning)
Can you type? To see what can be entered. Cylinders.
Note the sequence number of the cylinder. backup is backup and not selected. After entering the information, click "q", exit, and select "label" to write data to the disk.
Format Differentiation:
Newfs/dev/rdsk/c1t0d0s3 is the UFS file system by default. Formatted as a bare Device
Mount the file system:Mount command
Connect Block devices and directories. It can be mounted in an empty directory or a Created directory.
If it is a file system, there is a lost + found file by default. And there is no file1 in this file, which is hidden. We can umount.
Of course, these mounts are temporary. We need to write them to/etc/vfstab to make them permanently available. Vfs virtual file system.
Fstype root is started first. It is not operated by fs. Whether mount at boot is automatically mounted upon startup. Fsck pass 1 indicates a serial check, and 2 indicates a parallel check.
When the mounting is successful, we only need to mount/software. Because it will load the file you just changed,/etc/vfstab will look for the path from here. Instead of having.
Stop processes from accessing the File System
The following describes how to shut down processes in a regular manner. kill can easily cause system crashes. Fuser VS Kill
Fuser: check who is using this file. Fuser-c-k/software is to kill the process id that someone uses.
File System Maintenance
Expansion of file system space
Clear System Log Files
Reduce the use of small files with a limited number of nodes. Increase the number of file system I nodes. Compress infrequently used files.
The UFS file system cannot be expanded online and can only increase the size of a partition. (In fact, it is achieved by replacing a larger hard disk) AIS support. ZFS is also supported.
Ii. ZFS File System
Under AIX \ linux: physical volumes can be directly increased, and volume groups can also be expanded. The relationship between a bag of flour and a cage of Steamed Stuffed bun.
For ZFS file systems, it is more convenient to manage them by using a storage pool. It also has a mechanism for Automatic Resource Recovery.
ZFS is a 128-bit file system that is managed by a storage pool. (Resource pool)
Manage and create snapshots in a hierarchical manner. The file system has low overhead and is equivalent to managing a directory.
ZFS is occupied when a file is created, but not when a file system is created. That is to say, no space is allocated. In addition, spool can recycle resources. Similar to the Resource Recycling mechanism in java.
To create a file system, follow these steps:
Zfs backup and recovery
Use the Zfs send/receive command to implement
Steps:
Zfs does not need to be mounted. It is automatically mounted without management.
Zpool add + ZFS pool + disk, so that you can add disks.
Zpool status to view the status.
It is troublesome to delete, because zpool remove testpool c1t3d0 does not work.
Check the zpool scrub testpool and check the pool.
Iii. Swap Partition
In windows, it is called virtual memory. In order to provide more space for limited memory, the memory will not be an activated program into the disk, so this part of the disk is called the swap partition. When this program becomes active, it enters the memory from the disk. Something similar to a cache. It is generally 1.5-2 times of the memory. The maximum number of possible steps is required on multiple disks. If it is placed on a disk, the load on a disk is relatively large. Therefore, it is usually placed on multiple disks to save the load balancing.
Common commands:
Swap-l view swap partition information
Vmstat report virtual memory statisics
Reclaim-d. Modify/etc/vstab to delete the newly added record.