1. Logical Volume 생성 및 확인
krcsdi4:~ # lvcreate -L 1g -n XFS-DATA vg01
Logical volume "XFS-DATA" created
krcsdi4:~ # ll /dev/mapper/vg01-XFS-DATA
total 0 brw-r----- 1 root disk 253, 2 Oct 27 18:05 vg01-XFS-DATA
2. xfs filesystem 생성
krcsdi4:~ # mkfs.xfs /dev/mapper/vg01-XFS-DATA
meta-data=/dev/mapper/vg01-XFS-DATA isize=256 agcount=4, agsize=65536 blks
= sectsz=512 attr=2
data = bsize=4096 blocks=262144, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal log bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
3. Mount Point 생성
krcsdi4:~ # mkdir /XFS
4. Mount 실시
krcsdi4:~ # mount /dev/mapper/vg01-XFS-DATA /XFS
5. Mount 확인
krcsdi4:~ # df /XFS
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg01-XFS-DATA 1038336 4256 1034080 1% /XFS
6. Logical Volume 확장(1GB --> 2GB)
krcsdi4:~ # lvextend -L +1g /dev/mapper/vg01-XFS-DATA
Extending logical volume XFS-DATA to 2.00 GB
Logical volume XFS-DATA successfully resized
7. XFS File System 확장
krcsdi4:~ # xfs_growfs /XFS
meta-data=/dev/mapper/vg01-XFS-DATA isize=256 agcount=4, agsize=65536 blks
= sectsz=512 attr=2
data = bsize=4096 blocks=262144, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 262144 to 524288
8. XFS 확장 확인
krcsdi4:~ # df /XFS
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg01-XFS-DATA 2086912 4384 2082528 1% /XFS
krcsdi4:~ #
Table E.1. Reference Table for ext4 and XFS Commands
Task
|
ext4
|
XFS
|
Creating a file system
|
mkfs.ext4
|
mkfs.xfs
|
Mounting a file system
|
mount
|
mount
|
Resizing a file system
|
resize2fs
|
|
Repairing a file system
|
e2fsck
|
xfs_repair
|
Changing the label on a file system
|
e2label
|
xfs_admin -L
|
Reporting on disk space and file usage
|
quota
|
quota
|
Debugging a file system
|
debugfs
|
xfs_db
|
Saving critical file system metadata to a file
|
e2image
|
xfs_metadump
|
[a] The size of XFS file systems cannot be reduced; the command is used only to increase the size.
|
'Linux > CentOS & RHEL' 카테고리의 다른 글
[OS] CentOS / Redhat 설치 서버 CPU정보 확인(Hyperthreading 등) (0) | 2020.07.18 |
---|---|
[OS] CentOS / Redhat 설치 서버 Memory 장착 확인(사이즈/슬롯) (0) | 2020.07.18 |
[LVM] CentOS Disk LVM - ext4 (0) | 2020.07.12 |
[압축] zstd를 통한 tar 파일 압축 (0) | 2020.07.09 |
[yum] yum 인스톨 시 패키지만 다운로드 할 경우 (0) | 2020.07.09 |