달력

112024  이전 다음

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
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
xfs_growfs [a]
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.
 
Posted by 짜꾸미의골골몽
|