chfs 명령어 (AIX 5.3·6.1)

핵심 정리

  • 파일 시스템의 특성을 바꿉니다. 가장 많이 쓰는 것은 크기 변경입니다: chfs -a size=+2G /data(늘림), chfs -a size=20G /data(그 크기로), JFS2는 chfs -a size=-1G /data(줄임).
  • 크기를 늘리면 논리 볼륨도 함께 늘어납니다. 볼륨 그룹에 빈 물리 파티션이 있어야 하며, LV의 최대 LP 수(maxlps)가 모자라면 chlv -x로 먼저 늘립니다.
  • 마운트 지점(-m), 자동 마운트(-A), 권한(-p), 마운트 그룹(-u)을 바꾸고 -d로 /etc/filesystems의 속성을 지웁니다.
  • JFS2의 ea=v2 변환, freeze/refreeze(백업용 일시 정지), (6.1) efs=yes(암호화로 변환)도 이 명령으로 합니다.
  • 블록 크기, JFS의 조각 크기·nbpi·압축처럼 만들 때 정해진 속성은 바꿀 수 없습니다.
항목 내용
버전 AIX 5.3, AIX 6.1 (6.1에서 JFS2 속성 efs, managed, maxext, mountguard가 더해짐)
원문 IBM Commands Reference — 5.3 Volume 1, 6.1 Volume 1
파일 /usr/sbin/chfs, /etc/filesystems
관련 명령어 crfs, lsfs, rmfs, df, extendlv, mount

목적

파일 시스템의 속성을 바꿉니다.

영어 원문

Changes attributes of a file system.

구문

text
chfs [ -n NodeName ] [ -m NewMountPoint ] [ -u MountGroup ] [ -A { yes | no } ] [ -p { ro | rw } ] [ -t { yes | no } ] [ -a Attribute=Value ] [ -d Attribute ] FileSystem

설명

chfs 명령은 파일 시스템의 속성을 바꿉니다. 새 마운트 지점, 자동 마운트, 권한, 크기를 정하거나 바꿀 수 있습니다. FileSystem 매개변수는 파일 시스템 이름으로, 마운트 지점으로 적습니다.

일부 속성은 파일 시스템을 만들 때 정해지며 바꿀 수 없습니다. JFS는 조각 크기, 블록 크기, inode당 바이트 수, 압축, 최소 크기가, JFS2는 블록 크기가 그렇습니다.

chfs는 파일 시스템에 의미가 없는 속성도 받아 /etc/filesystems에 저장하지만, 파일 시스템은 그 속성대로 동작하지 않습니다. 이런 속성은 줄여야 합니다. /etc/filesystems의 스탠자 하나는 512바이트를 넘을 수 없으며, 넘으면 그 스탠자를 인식하지 못합니다.

chfs는 알지 못하는 Attribute=Value 쌍을 무시하지만 /etc/filesystems의 해당 스탠자에는 넣습니다. 예를 들어 chfs -a abcd=1G /는 루트 스탠자에 abcd 속성을 1G 값으로 넣습니다.

영어 원문

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. The attributes are saved in the /etc/filesystems file, but the file system does not act on the attributes. Additional attributes must be limited. The total size of a stanza in the /etc/filesystems file cannot exceed 512 bytes. If the size exceeds the limit, the stanza is no longer recognized.

The chfs command ignores any Attribute=Value pair that the command does not understand but adds them to an appropriate stanza in the /etc/filesystems file.

Example: chfs -a abcd=1G /

This will set the new abcd attribute to the value of 1G in the root stanza in /etc/filesystems file.

플래그

플래그 설명
-a Attribute=Value VFS 유형별 속성과 값. 여럿이면 -a를 여러 번 줍니다. JFS와 JFS2 속성은 아래 표에 있습니다.
-A { yes, no } 자동 마운트. yes면 시스템을 다시 시작할 때 마운트하고, no면 하지 않습니다.
-d Attribute 지정한 파일 시스템의 속성을 /etc/filesystems에서 지웁니다.
-m NewMountPoint 새 마운트 지점.
-n NodeName 노드 이름. /etc/filesystems의 노드 속성을 새 이름으로 바꿉니다. NFS 같은 원격 VFS 유형에만 해당합니다.
-p { ro, rw } 권한. ro는 읽기 전용, rw는 읽기·쓰기.
-t { yes, no } 계정(accounting) 속성. yes면 계정 하위 시스템이 처리하고, no면 하지 않습니다(기본).
-u MountGroup 마운트 그룹. 관련 마운트를 묶어 한 번에 마운트할 때 씁니다. 예를 들어 테스트용 파일 시스템을 모두 test 그룹에 넣으면 mount -t test로 한꺼번에 마운트합니다.

JFS 속성

속성 설명
copy=Copy# splitcopy와 함께 쓰며 떼어 낼 미러 사본(1, 2, 3)을 정합니다. 기본은 둘째 사본.
log=LVName 쓸 기존 로그 논리 볼륨의 전체 경로. 파일 시스템과 같은 볼륨 그룹에 있어야 합니다.
size=NewSize 크기. 512바이트 블록 수, M, G 접미사로 주며, +로 시작하면 그만큼 늘립니다. 물리 파티션 크기로 올림합니다. 볼륨 그룹의 최대 논리 볼륨 크기가 한계이며, 최대 크기는 조각 크기와 nbpi로 정해집니다(crfs의 표 참고: nbpi 512는 8GB, 4096은 64GB, 65536 이상은 1024GB).
splitcopy=NewMountPointName 미러된 파일 시스템의 사본 하나를 떼어 새 마운트 지점에 읽기 전용으로 마운트합니다. JFS 메타데이터가 일관된 사본이라 백업에 쓸 수 있지만 사용자 데이터 무결성은 보장하지 않으므로, 이 작업 동안 파일 시스템 활동을 줄이는 것이 좋습니다. 온라인 분리 미러 사본은 하나만 둘 수 있습니다.

JFS2 속성

속성 설명
ea=v2 확장 속성 형식을 v1에서 v2로 바꿉니다. 되돌릴 수 없으며, 확장 속성이나 ACL을 쓸 때 파일마다 필요할 때 바뀝니다. v2는 확장 가능한 확장 속성과 NFS4 ACL을 지원하고, v1은 이전 AIX와 호환됩니다.
efs=yes (6.1) 기존 파일 시스템을 암호화 파일 시스템(EFS)으로 바꿉니다. ea도 자동으로 v2로 바뀝니다. 부팅 중에는 보안 기반이 없으므로 /, /usr, /var, /opt는 바꿀 수 없습니다.
freeze={ timeout, 0, off } 파일 시스템을 얼리거나 녹입니다. 얼리면 거의 일관된 디스크 이미지를 만들고 더티 메타데이터와 사용자 데이터를 모두 디스크에 씁니다. 언 동안은 읽기 전용이며, 바꾸려는 작업은 풀릴 때까지 기다립니다. 양수면 최대 그 초만큼 얼리고, 0이나 off면 녹입니다. 기본 파일 시스템(/, /usr, /var, /tmp)을 얼리면 예상하지 못한 동작이 생길 수 있습니다.
log=LVName, logname=LVName 쓸 기존 로그 논리 볼륨의 전체 경로. 같은 볼륨 그룹에 있어야 합니다. INLINE은 로그가 파일 시스템 논리 볼륨 안에 있다는 뜻이며, INLINE log로 만든 파일 시스템에만 씁니다. /etc/filesystems를 고쳐 파일 시스템 LV 이름이 바뀌어도 로그를 인식하게 합니다.
logsize=LogSize inline log 크기(MB). 양수이며 1 이상이면 정수여야 하고, 0 이상 1 미만이면 기본 크기를 씁니다. +로 시작하면 늘리고 -로 시작하면 줄입니다. INLINE이 아니면 무시합니다. 파일 시스템 크기의 10%와 2047MB를 넘을 수 없습니다.
managed={ yes, no } (6.1) JFS2에 DMAPI(Data Management API)를 켭니다.
maxext=Value (6.1) 파일 익스텐트의 최대 크기(파일 시스템 블록 수). 0이면 JFS2 기본 최대값. 0보다 작거나 16777215를 넘으면 잘못된 값이며, 기존 익스텐트에는 영향이 없습니다.
mountguard={ yes, no } (6.1) PowerHA 같은 클러스터 환경에서 지원하지 않는 동시 마운트를 막습니다. 잠시 무시하려면 mount의 noguard 옵션을 씁니다.
options=mountOptions 넘길 마운트 옵션. 쓸 수 있는 옵션은 mount를 봅니다.
refreeze=timeout 언 파일 시스템의 제한 시간을 그 값으로 다시 정합니다. 아직 얼어 있어야 합니다(freeze나 fscntl로).
size=NewSize 크기. 512바이트 블록 수, M, G로 주며 +면 늘리고 -면 줄입니다. 부호 없이 지금보다 크거나 작은 값을 줘도 늘리거나 줄입니다. 물리 파티션 크기로 올림하며, 스트라이프 LV면 스트라이프 폭 × 물리 파티션 크기의 배수로 맞춥니다. 최대 크기는 블록 크기로 정해집니다(512바이트 4TB, 1024 8TB, 2048 16TB, 4096 32TB). size와 logsize를 한 번에 줄 수 있습니다.
vix={ yes, no } 연속된 16KB 공간이 없을 때 16KB보다 작은 inode 익스텐트를 할당할지 정합니다. 켜면 이전 AIX에서 쓸 수 없고 되돌릴 수 없습니다. no는 이미 가변 길이 익스텐트가 있으면 효과가 없습니다.

외부 로그(OUTLINE)를 바꿀 때: logname으로 jfs2log 유형으로 포맷한 다른 논리 볼륨으로 옮길 수 있습니다. 마운트 중에 바꾸면 /etc/filesystems만 바뀌고, 실제 로그는 다음 마운트(umount 뒤나 장애 복구 뒤)부터 바뀝니다. INLINE과 OUTLINE 사이는 바꿀 수 없어 파일 시스템을 지우고 다시 만들어야 합니다. AIX 5.1 이하에서 만든 inline log 파일 시스템은 /etc/filesystems의 log가 파일 시스템 LV와 같고, 5.2부터는 INLINE이라고 적힙니다. 5.1 이하에서 만들어 올린 파일 시스템은 chfs로 이 이름을 고칠 수 있습니다.

JFS2 크기를 바꿀 때의 참고:

  1. JFS2에는 크기에 영향을 주는 nbpi나 조각 크기가 없습니다.
  2. 물리 파티션 하나보다 적게는 줄일 수 없습니다.
  3. 스냅숏이 있는 파일 시스템은 줄일 수 없습니다.
  4. 줄이는 동안 쓰기는 막힙니다.
  5. 늘리거나 줄이는 동안 파일 시스템에 접근할 수 없습니다. inline log가 있는 큰 파일 시스템은 log를 다시 포맷하느라 몇 분 걸릴 수 있습니다.
  6. 새 크기만 주면 inline log 크기도 비례해 늘거나 줄며, 그 변화는 파일 시스템 변화량의 40%를 넘지 않습니다.
  7. 크기 없이 새 logsize만 주면 그 로그를 담도록 파일 시스템 크기가 바뀔 수 있습니다.
  8. df가 보여 주는 여유 공간을 모두 줄일 수 있는 것은 아닙니다. 조각난 파일 시스템은 잘라 낼 영역의 객체를 옮길 공간이 없으면 줄이지 못하며(조각 모음은 하지 않음), 이때 chfs는 반환 코드 28(ENOSPC)로 실패합니다.
  9. (6.1) maxext는 나중 릴리스에서 정했어도 이전 릴리스에서는 무시합니다.
영어 원문
  • -a Attribute=Value — Specifies the Attribute=Value pairs dependent on virtual file system type. To specify more than one Attribute=Value pair, provide multiple -a Attribute=Value parameters. The following attribute or value pairs are specific to the Journaled File System (JFS): -a copy=Copy# Specifies which mirror copy to split off when used in conjunction with the splitcopy attribute. The default copy is the second copy. Valid values are 1, 2, or 3. -a log=LVName Specifies the full path name of the filesystem logging logical volume name of the existing log to be used. The log device for this filesystem must reside on the same volume group as the filesystem. -a size=NewSize Specifies the size of the Journaled File System. The size can be specified in units of 512-byte blocks, megabytes or gigabytes. If Value has the M suffix, it is interpreted to be in megabytes. If Value has a G suffix, it is interpreted to be in gigabytes. If Value begins with a +, it is interpreted as a request to increase the file system size by the specified amount. If the specified size is not evenly divisible by the physical partition size, it is rounded up to the closest number that is evenly divisible. The volume group in which the file system resides defines a maximum logical volume size and also limits the file system size. The maximum size of a JFS file system is a function of its fragment size and the nbpi value. These values yield the following size restrictions: NBPI Minimum AG Size Fragment Size Maximum Size (GB) 512 8 512, 1024, 2048, 4096 8 1024 8 512, 1024, 2048, 4096 16 2048 8 512, 1024, 2048, 4096 32 4096 8 512, 1024, 2048, 4096 64 8192 8 512, 1024, 2048, 4096 128 16384 8 1024, 2048, 4096 256 32768 16 2048, 4096 512 65536 32 4096 1024 131072 64 4096 1024 -a splitcopy=NewMountPointName Splits off a mirrored copy of the file system and mounts it read-only at the new mount point. This provides a copy of the file system with consistent JFS meta-data that can be used for backup purposes. User data integrity is not guaranteed, so it is recommended that file system activity be minimal while this action is taking place. Only one copy may be designated as an online split mirror copy. The following attribute or value pairs are specific to the Enhanced Journaled File System (JFS2):
  • -a Attribute=Value — -a ea=v2 Converts the JFS2 file system extended attribute (ea) format. A JFS2 file system using the v1 format can be converted to one using v2 format. After it is converted the file system cannot be converted back to v1. The conversion is done in an on-demand manner such that any extended attribute or ACL writes cause the conversion for that file object to occur. The v2 format provides support for scalable named extended attributes as well as support for NFS4 ACLs. The v1 format is compatible with prior releases of AIXoperating system. -a efs=yes Converts a file system to an Encrypted File System (EFS). The chfs command changes an existing file system into an EFS file system. When the file system is EFS enabled, the ea attribute is automatically converted to store scalable extended attributes (v2).Restriction: The chfs commands prevents conversion of the following file systems (mount points) to EFS because the security infrastructures (kernel extensions, libraries and so on) are not available during boot: • / • /usr • /var • /opt -a freeze = { timeout | 0 | off } Specifies that the file system must be frozen or thawed, depending on the value of timeout. The act of freezing a file system produces a nearly consistent on-disk image of the file system, and writes all dirty file system metadata and user data to the disk. In its frozen state, the file system is read-only, and anything that attempts to modify the file system or its contents must wait for the freeze to end. The value of timeout must be either 0, off, or a positive number. If a positive number is specified, the file system is frozen for a maximum of timeout seconds. If timeout is 0 or off, the file system will be thawed, and modifications can proceed. Attention: Freezing base file systems (/, /usr, /var, /tmp) can result in unexpected behavior. -a [ log | logname ]=LVName Specifies the full path name of the filesystem logging logical volume name of the existing log to be used. The log device for this filesystem must reside on the same volume group as the filesystem. Keyword INLINE can be used to specify that the log is in the logical volume with the JFS2 file system. The file system must have been created with an INLINE log to use this option. This option updates the /etc/filesystems file so that if the name of the logical volume containing the file system changes the log will be recognized. Note: For a file system using OUTLINE log, this option can be used to change the outline log from one logical volume to another logical volume as long as the logical volume is properly formatted and the type of the logical volume is jfs2log. If a file systems is mounted at the time chfs is called to change the outline log, the /etc/filesystems file will show the change, but the actual log will not be changed until the next mount for the file system (which follows a umount operation or a system crash and recovery). For a file system using INLINE log, this option does not support switching logs between INLINE and OUTLINE log. Currently, to switch from inlinelog to outlinelog (or vise versa), the file system has to be removed and recreated. In release AIX 5L™and AIX 5.1, if the file system is using inlinelog, the log entry is the same as the file system in /etc/filesystems file: /j2.1: dev = /dev/fslv00 vfs = jfs2 log = /dev/fslv00 mount = false account = false But, from AIX 5.2 and later releases, if the file system is using inlinelog, the log entry is the keyword INLINE in /etc/filesystems file: /j2.23: dev = /dev/fslv04 vfs = jfs2 log = INLINE mount = false options = rw account = false If the file system was created at AIX 5L or AIX 5.1, and later upgraded to AIX 5.2 or later releases, then chfs can be used to alter the inlinelog name in /etc/filesystems file. -a logsize=LogSize Specifies the size for an INLINE log in MBytes. The input size must be a positive value. If the inline log size is greater than or equal to 1, the input size must be an integer. If the input is floating point value of less than 1 and greater than or equal to 0, the input size is ignored and the default inline log size is taken. If value begins with a + (plus sign), it is interpreted as a request to increase the INLINE log size by the specified amount. If value begins with a - (minus sign), it is interpreted as a request to reduce the INLINE log size by the specified amount. The input is ignored if an INLINE log not being used. The INLINE log size cannot be greater than 10% of the size of the file system and it cannot be greater than 2047 MB. -a managed={yes | no} Enables Data Management Application Programming Interface (DMAPI) on a JFS2 file system. -a maxext=Value Specifies the maximum size of a file extent in file system blocks. A zero value implies that the JFS2 default maximum should be used. Values less than 0 or exceeding maximum supported extent size of 16777215 are invalid. Note that existing file extents are not affected by this change. -a mountguard={yes | no} Guards the file system against the unsupported concurrent mounts in a PowerHA® or other clustering environment. If the mountguard is enabled, the file system cannot be mounted if it appears to be mounted on another node or system. To temporarily override the mountguard setting, see the noguard option of the mount command. -a options = mountOptions Specifies which mount option is passed into the chfs command. For a list of the valid options, refer to the mount command. -a refreeze={timeout} Specifies that the timeout for a frozen file system be reset. The timeout is reset to the value specified. The file system must still be frozen (using the -a freeze option or the fscntl interface). -a size=NewSize Specifies the size of the Enhanced Journaled File System in 512-byte blocks, megabytes or gigabytes. If Value has the M suffix, it is interpreted to be in megabytes. If Value has a G suffix, it is interpreted to be in gigabytes. If Value begins with a +, it is interpreted as a request to increase the file system size by the specified amount. If Value begins with a -, it is interpreted as a request to reduce the file system size by the specified amount. If the specified size does not begin with a + or -, but it is greater or smaller than the file system current size, it is also a request to increase or reduce the file system size. If the file system has an inlinelog, the inlinelog size remains unchanged if the new size of this file system is the same as the current file system size. If the specified size is not evenly divisible by the physical partition size, it is rounded up to the closest number that is evenly divisible. If the file system is on a striped logical volume, the size of the new file system is rounded to the nearest multiple of the striping width multiplied by the physical partition size. The striping width is the number of hard disks that form the striped logical volume. This attribute is required when creating a JFS2 file system unless the -d flag has been specified. The volume group in which the file system resides defines a maximum logical volume size and limits the file system size. The maximum size is determined by the file system block size: fs block size (byte) MAX fssize (TB) =========================================== 512 4 1024 8 2048 16 4096 32 When a request to reduce the file system size is successful, the logical volume should be equal to or smaller than the original LV size depending on the requested filesystem size. Both size and logsize attributes can be specified in one chfs request to resize the filesystem and its inlinelog sizes. -a vix={yes|no} Specifies whether the file system can allocate inode extents smaller than the default of 16 KB if there are no contiguous 16 KB extents free in the file system. After a file system is enabled for small free extents, it cannot be accessed on earlier versions of AIX and the marking cannot be removed. yes File system can allocate variable length inode extents. no File system must use default size of 16 KB for inode extents. This has no effect if the file system already contains variable length inode extents. Note: 1. JFS2 does not have nbpi or fragment size values to affect the resulting size of the file system. 2. You cannot shrink a file system if the requested size is less that a physical partition size. At least one physical partition size is asked to be reduced. 3. Shrinking a file system that has snapshots is not allowed. 4. During a shrink of the file system, writes to the file system are blocked. 5. During the period that the shrink or extend is running, the file system is not accessible. Large file systems with inline logs might not be usable for as long as several minutes. The inline log must be completely reformatted. 6. When the new file system size is specified, but its inlinelog size is NOT specified, the new logsize will be adjusted (extended/shrunk) proportionally, based on the specified extended/shrunk file system size. The log size increase or reduction should not be more than 40% of the file system size increase or reduction. 7. When a new file system size is not specified and there is an inlinelog, if a new logsize is specified, the file system size might be changed to include the new log size. 8. The freed space reported by the df command is not necessary the space that can be truncated by a shrinkFS request due to filesystem fragmentation. A fragmented filesystem may not be shrunk if it does not have enough free space for an object to be moved out of the region to be truncated, and shrinkFS does not perform filesystem defragmentation. In this case, the chfs command should fail with the returned code 28 (ENOSPC) 9. The maxext attribute is ignored in older releases even if the filesystem was created with it on a later release.
  • -A — Specifies the attributes for auto-mount. yes File system is automatically mounted at system restart. no File system is not mounted at system restart.
  • -d Attribute — Deletes the specified attribute from the /etc/filesystems file for the specified file system.
  • -m NewMountPoint — Specifies a new mount point for the specified file system.
  • -n NodeName — Specifies a node name for the specified file system. The node name attribute in the /etc/filesystems file is updated with the new name. The node name attribute is specific to certain remote virtual file system types, such as the NFS (Network File System) virtual file system type.
  • -p — Sets the permissions for the file system. ro Specifies read-only permissions. rw Specifies read-write permissions.
  • -t — Sets the accounting attribute for the specified file system. yes File system accounting is to be processed by the accounting subsystem. no File system accounting is not to be processed by the accounting subsystem; this is the default.
  • -u MountGroup — Specifies the mount group. Mount groups are used to group related mounts, so that they can be mounted as one instead of mounting each individually. For example, when performing certain tests, if several scratch file systems always need to be mounted together, they can each be placed in the test mount group. They can then all be mounted with a single command, such as the mount -t test command.

보안

접근 제어: root나 system 그룹 구성원만 실행할 수 있습니다.

(6.1) RBAC와 Trusted AIX 사용자: 이 명령은 특권 작업을 할 수 있으며 특권 사용자만 할 수 있습니다. 권한과 특권은 lssecattr 명령이나 getcmdattr 하위 명령으로 봅니다.

영어 원문

Access Control

Only the root user or a member of the system group can run this command.

Attention RBAC users and Trusted AIX users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.

예제

명령 하는 일
chfs -a size=24576 /test JFS /test를 512바이트 블록 24576개(12MB)로 바꿈(지금 그보다 크지 않을 때)
chfs -a size=+8192 /test 512바이트 블록 8192개(4MB)만큼 늘림
chfs -a ea=v2 /test JFS2를 NFS4 ACL을 지원하는 형식으로 바꿈
chfs -m /test2 /test 마운트 지점을 /test에서 /test2로 바꿈
chfs -d account /home /etc/filesystems의 /home: 스탠자에서 계정 속성을 지움
chfs -a splitcopy=/backup -a copy=2 /testfs 미러 사본을 떼어 /backup에 읽기 전용으로 마운트(온라인 백업용)
chfs -a size=64M /test 64MB로 바꿈(지금 그보다 크지 않을 때)
chfs -a size=-16M /test JFS2를 16MB 줄임
chfs -a freeze=60 /adl 최대 60초 동안 얼림
chfs -a freeze=off /zml 녹임

자주 쓰는 형태:

bash
chfs -a size=+5G /data       # 5GB 늘림
lsvg datavg                  # FREE PPs 확인
df -g /data
chfs -A yes /data            # 부팅 때 자동 마운트
영어 원문
  1. To change the file system size of the /test Journaled File System, enter:
chfs -a size=24576 /test

This command changes the size of the /test Journaled File System to 24576 512-byte blocks, or 12MB (provided it was previously no larger than this).

  1. To increase the size of the /test Journaled File System, enter:
chfs -a size=+8192 /test

This command increases the size of the /test Journaled File System by 8192 512-byte blocks, or 4 MB.

  1. To convert a JFS2 file system to a version which can support NFS4 ACLs, type:
chfs -a ea=v2 /test
  1. To change the mount point of a file system, enter:
chfs -m /test2 /test

This command changes the mount point of a file system from /test to /test2.

  1. To delete the accounting attribute from a file system, enter:
chfs -d account /home

This command removes the accounting attribute from the /home file system. The accounting attribute is deleted from the /home: stanza of the /etc/filesystems file.

  1. To split off a copy of a mirrored file system and mount it read-only for use as an online backup, enter:
chfs -a splitcopy=/backup -a copy=2 /testfs

This mount a read-only copy of /testfs at /backup.

  1. To change the file system size of the /test Journaled File System, enter:
chfs -a size=64M /test

This command changes the size of the /test Journaled File System to 64MB (provided it was previously no larger than this).

  1. To reduce the size of the /test JFS2 file system, enter:
chfs -a size=-16M /test

This command reduces the size of the /test JFS2 file system by 16MB.

  1. To freeze a file system, enter:
chfs -a freeze=60 /adl

This command freezes the /adl file system for a maximum of 60 seconds.

  1. To thaw a file system, enter:
chfs -a freeze=off /zml

This command thaws the /zml file system.

파일

파일 설명
/etc/filesystems 알려진 파일 시스템과 그 특성
영어 원문
  • /etc/filesystems — Lists the known file systems and defines their characteristics.

Related information:

  • mkfs command
  • mklv command
  • File systems
  • System Management Interface Tool (SMIT)

리눅스(GNU)와 다른 점

리눅스에서는 파일 시스템 정보가 /etc/fstab에 있고(AIX는 스탠자 형식의 /etc/filesystems), LVM과 파일 시스템 명령이 나뉘어 있습니다. 만들기는 lvcreate 뒤 mkfs.xfs·mkfs.ext4, 늘리기는 lvextend -r(또는 lvextend 뒤 xfs_growfs·resize2fs), 지우기는 umount 뒤 /etc/fstab 항목과 lvremove로 따로 합니다. AIX의 crfs·chfs·rmfs는 이것을 한 명령으로 합니다. 리눅스에서 크기 변경은 lvextend -r -L +5G /dev/vg/lv(파일 시스템까지 함께)나 lvextend 뒤 xfs_growfs·resize2fs로 하며, XFS는 줄일 수 없습니다. freeze는 fsfreeze -f/-u입니다.