본문 바로가기

리눅스-기초명령어/스토리지

mkfs

mkfs

파티션 분할작업후 포맷을 할때 사용하는 명령어.

 

옵션

옵션 설명
-t fs_type 파일 시스템의 유형을 지정 mkfs.fs_type으로 가능
-c 배드 블록 체크후 파일 시스템 구축

 

[root@localhost ~]# mkfs.xfs /dev/nvme0n2p1 # xfs로 포맷
meta-data=/dev/nvme0n2p1         isize=512    agcount=4, agsize=655296 blks
        =                       sectsz=512   attr=2, projid32bit=1
        =                       crc=1        finobt=1, sparse=1, rmapbt=0
        =                       reflink=1    bigtime=1 inobtcount=1
data     =                       bsize=4096   blocks=2621184, imaxpct=25
        =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
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


[root@localhost ~]# blkid
/dev/nvme0n2p1: UUID="f985da4b-60a2-443a-afee-3184e2b54bbc" TYPE="xfs" PARTLABEL="Linux filesystem" PARTUUID="d58682a7-c1ad-4359-bb40-36150f7ceb35"

 

파티션 포맷

[root@localhost ~]# mkfs -t ext4 /dev/sda4
mke2fs 1.46.5 (30-Dec-2021)
Creating filesystem with 4096 1k blocks and 1024 inodes

Allocating group tables: done                           
Writing inode tables: done                           
Creating journal (1024 blocks): done
Writing superblocks and filesystem accounting information: done

 

'리눅스-기초명령어 > 스토리지' 카테고리의 다른 글

df  (0) 2023.09.01
mount  (2) 2023.09.01
parted  (0) 2023.09.01
gdisk  (0) 2023.09.01
blkid, lsblk  (0) 2023.09.01