lsfs 명령어 (AIX 5.3·6.1)

핵심 정리

  • /etc/filesystems에 정의된 파일 시스템의 특성(장치, 마운트 지점, 유형, 크기, 옵션, 자동 마운트, 계정)을 보여 줍니다.
  • lsfs(모두), lsfs /data(하나), lsfs -v jfs2(유형별), lsfs -u 그룹(마운트 그룹별).
  • -q를 주면 JFS·JFS2의 추가 특성(실제 크기, 블록 크기, inline log, EA 형식, 스냅숏, 쿼터 등)을 함께 보여 줍니다. 크기를 늘리기 전 확인할 때 씁니다.
  • -c는 콜론 형식이라 스크립트에서 쓰기 좋습니다.
  • 마운트 여부와 사용량은 보여 주지 않으므로 mount, df와 함께 봅니다.
항목 내용
버전 AIX 5.3, AIX 6.1 (두 버전의 내용이 같음)
원문 IBM Commands Reference — 5.3 Volume 3, 6.1 Volume 3
파일 /usr/sbin/lsfs, /etc/filesystems
관련 명령어 crfs, chfs, rmfs, mount, df

목적

파일 시스템의 특성을 보여 줍니다.

영어 원문

Displays the characteristics of file systems.

구문

text
lsfs [ -q ] [ -c | -l ] [ -a | -v VfsType | -u MountGroup | [ FileSystem ... ] ]

설명

lsfs 명령은 마운트 지점, 자동 마운트, 권한, 크기 같은 파일 시스템의 특성을 보여 줍니다. FileSystem 매개변수로 특정 파일 시스템을 보고하며, 다음 단위로 볼 수 있습니다.

  • 모든 파일 시스템
  • 특정 마운트 그룹의 모든 파일 시스템
  • 특정 VFS 유형의 모든 파일 시스템
  • 하나 이상의 개별 파일 시스템

-q를 주면 JFS·JFS2의 추가 특성도 보여 줍니다.

Web-based System Manager의 File Systems 응용 프로그램(wsm fs)이나 SMIT 빠른 경로 smit lsfs로도 실행할 수 있습니다.

영어 원문

The lsfs command displays characteristics of file systems, such as mount points, automatic mounts, permissions, and file system size. The FileSystem parameter reports on a specific file system. The following subsets can be queried for a listing of characteristics:

  • All file systems

  • All file systems of a certain mount group

  • All file systems of a certain virtual file system type

  • One or more individual file systems

The lsfs command displays additional Journaled File System (JFS) or Enhanced Journaled File System (JFS2) characteristics if the -q flag is specified.

You can use a Web-based System Manager File Systems application (wsm fs fast path) to run this command. You could also use the System Management Interface Tool (SMIT) smit lsfs fast path to run this command.

플래그

플래그 설명
-a 모든 파일 시스템을 나열합니다(기본).
-c 콜론 형식으로 출력합니다.
-l 목록 형식으로 출력합니다.
-q JFS·JFS2의 파일 시스템 유형별 추가 특성을 보여 줍니다. 다른 VFS 유형에는 보고하지 않으며, 다른 특성에 더해 보여 줍니다.
-u MountGroup 지정한 마운트 그룹의 파일 시스템을 모두 보고합니다.
-v VfsType 지정한 유형의 파일 시스템을 모두 보고합니다.
영어 원문
  • -a — Lists all file systems (default).
  • -c — Specifies that the output should be in colon format.
  • -l — Specifies that the output should be in list format.
  • -q — Displays additional Journaled File System (JFS) or Enhanced Journaled File System (JFS2) characteristics specific to the file system type. This information is not reported for other virtual file system types. It is displayed in addition to other file system characteristics reported by the lsfs command.
  • -u MountGroup — Reports on all file systems of a specified mount group.
  • -v VfsType — Reports on all file systems of a specified type.

예제

명령 하는 일
lsfs /etc/filesystems의 모든 파일 시스템
lsfs -v jfs VFS 유형이 jfs인 파일 시스템
lsfs -q / 루트 파일 시스템의 슈퍼블록에 기록된 크기, 조각 크기, 압축 알고리즘(있으면), inode당 바이트 수

출력 예(일부):

text
$ lsfs -q /data
Name            Nodename   Mount Pt       VFS   Size     Options  Auto Accounting
/dev/datalv     --         /data          jfs2  4194304  rw       yes  no
  (lv size: 4194304, fs size: 4194304, block size: 4096, sparse files: yes, inline log: no,
   inline log size: 0, EAformat: v2, Quota: no, DMAPI: no, VIX: yes, EFS: no, ISNAPSHOT: no, MAXEXT: 0, MountGuard: no)

자주 쓰는 형태:

bash
lsfs -v jfs2                    # JFS2 파일 시스템 목록
lsfs -q /data                   # 크기(512바이트 블록)와 특성
lsfs -c | awk -F: '{print $1,$2,$3}'   # 스크립트용
영어 원문
  1. To show all file systems in the /etc/filesystems file, enter: lsfs

  2. To show all file systems of vfs type jfs, enter:

lsfs -v jfs

  1. 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, enter:

lsfs -q /

파일

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

Related information:

  • chfs command
  • crfs command
  • File systems
  • Mounting command

리눅스(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는 이것을 한 명령으로 합니다. lsfs에 해당하는 것은 cat /etc/fstab, findmnt, lsblk -f이며, 파일 시스템 내부 특성은 xfs_info나 tune2fs -l로 봅니다.