IT 공부내용 정리/Linux

터미널 명령어 - mkfs / mke2fs 파일 시스템을 생성해줘야 할 때

따뜻한 차가움 2025. 3. 21. 14:10

사용 버전 : Linux 우분투(레드햇 계열) 24.04.01 LTS 버전
사용한 시스템 지역/언어 : 대한민국/한글

man mkfs 원문

더보기

MKFS(8)                      System Administration                     MKFS(8)

NAME
       mkfs - build a Linux filesystem

SYNOPSIS
       mkfs [options] [-t type] [fs-options] device [size]

DESCRIPTION
       This mkfs frontend is deprecated in favour of filesystem specific
       mkfs.<type> utils.

       mkfs is used to build a Linux filesystem on a device, usually a hard
       disk partition. The device argument is either the device name (e.g.,
       /dev/hda1, /dev/sdb2), or a regular file that shall contain the
       filesystem. The size argument is the number of blocks to be used for
       the filesystem.

       The exit status returned by mkfs is 0 on success and 1 on failure.

       In actuality, mkfs is simply a front-end for the various filesystem
       builders (mkfs.fstype) available under Linux. The filesystem-specific
       builder is searched for via your PATH environment setting only. Please
       see the filesystem-specific builder manual pages for further details.

OPTIONS
       -t, --type type
           Specify the type of filesystem to be built. If not specified, the
           default filesystem type (currently ext2) is used.

       fs-options
           Filesystem-specific options to be passed to the real filesystem
           builder.

       -V, --verbose
           Produce verbose output, including all filesystem-specific commands
           that are executed. Specifying this option more than once inhibits
           execution of any filesystem-specific commands. This is really only
           useful for testing.

       -h, --help
           Display help text and exit.

       -V, --version
           Print version and exit. (Option -V will display version information
           only when it is the only parameter, otherwise it will work as
           --verbose.)

BUGS
       All generic options must precede and not be combined with
       filesystem-specific options. Some filesystem-specific programs do not
       automatically detect the device size and require the size parameter to
       be specified.

AUTHORS
       David Engel <david@ods.com>, Fred N. van Kempen
       <waltje@uwalt.nl.mugnet.org>, Ron Sommeling <sommel@sci.kun.nl>.

       The manual page was shamelessly adapted from Remy Card’s version for
       the ext2 filesystem.

SEE ALSO
       fs(5), badblocks(8), fsck(8), mkdosfs(8), mke2fs(8), mkfs.bfs(8),
       mkfs.ext2(8), mkfs.ext3(8), mkfs.ext4(8), mkfs.minix(8), mkfs.msdos(8),
       mkfs.vfat(8), mkfs.xfs(8)

REPORTING BUGS
       For bug reports, use the issue tracker at
       https://github.com/util-linux/util-linux/issues.

AVAILABILITY
       The mkfs command is part of the util-linux package which can be
       downloaded from Linux Kernel Archive
       <https://www.kernel.org/pub/linux/utils/util-linux/>.

util-linux 2.39.3                 2023-10-23                           MKFS(8)


man mkfs 번역기 번역본

더보기

MKFS (8) 시스템 관리 MKFS (8)

이름
       MKFS- Linux 파일 시스템을 구축하십시오

개요
       MKFS [옵션] [-t 유형] [FS-OPTIONS] 장치 [크기]

설명
       이 MKFS 프론트 엔드는 파일 시스템에 유리하게 더 이상 사용되지 않습니다.
       mkfs. <type> utils.

MKFS는 장치에 Linux 파일 시스템을 구축하는 데 사용됩니다.
       디스크 파티션. 장치 인수는 장치 이름입니다 (예 :
       /dev/hda1,/dev/sdb2) 또는
       파일 시스템. 크기 인수는 사용될 블록 수입니다.
       파일 시스템.

MKFS에 의해 반환 된 종료 상태는 성공시 0, 실패는 1입니다.

실제로 MKFS는 단순히 다양한 파일 시스템의 프론트 엔드입니다.
       Linux에서 사용할 수있는 Builders (mkfs.fstype). 파일 시스템 별
       빌더는 경로 환경 설정을 통해서만 검색됩니다. 제발
       자세한 내용은 파일 시스템 별 빌더 매뉴얼 페이지를 참조하십시오.

옵션
       -t, -타입 유형
           구축 할 파일 시스템의 유형을 지정하십시오. 지정되지 않은 경우
           기본 파일 시스템 유형 (현재 ext2)이 사용됩니다.

FS-OPTIONS
           파일 시스템 별 옵션을 실제 파일 시스템으로 전달합니다
           빌더.

-v, -버 보스
           모든 파일 시스템 별 명령을 포함하여 장점 출력을 생성합니다
           실행됩니다. 이 옵션을 두 번 이상 지정하면 억제됩니다
           파일 시스템 별 명령의 실행. 이것은 정말로 전용입니다
           테스트에 유용합니다.

-h, -help
           도움말 텍스트와 종료를 표시합니다.

-v, -버전
           인쇄 버전 및 종료. (옵션 -v는 버전 정보를 표시합니다
           유일한 매개 변수 일 때만
           --말 수가 많은.)

버그
       모든 일반 옵션은 우선하며 결합되어야합니다.
       파일 시스템 별 옵션. 일부 파일 시스템 별 프로그램은 그렇지 않습니다
       장치 크기를 자동으로 감지하고 크기 매개 변수가 필요합니다.
       지정됩니다.

저자
       David Engel <david@ods.com>, Fred N. Van Kempen
       <waltje@uwalt.nl.mugnet.org>, Ron Sommeling <sommel@sci.kun.nl>.

수동 페이지는 Remy Card의 버전에서 부끄럽게 조정되었습니다.
       Ext2 파일 시스템.

참조하십시오
       FS (5), BADBLOCKS (8), FSCK (8), MKDOSFS (8), MKE2FS (8), MKFS.BFS (8),
       mkfs.ext2 (8), mkfs.ext3 (8), mkfs.ext4 (8), mkfs.minix (8), mkfs.msdos (8),
       mkfs.vfat (8), mkfs.xfs (8)

보고 버그
       버그 보고서는 문제 추적기를 사용하십시오
       https://github.com/util-linux/util-linux/issues.

유효성
       MKFS 명령은 Util-Linux 패키지의 일부입니다.
       Linux 커널 아카이브에서 다운로드했습니다
       <https://www.kernel.org/pub/linux/utils/util-linux/>.

Util-Linux 2.39.3 2023-10-23 MKFS (8)

 

man mke2fs 원문

더보기

MKE2FS(8)                   System Manager's Manual                  MKE2FS(8)

NAME
       mke2fs - create an ext2/ext3/ext4 file system

SYNOPSIS
       mke2fs  [ -c | -l filename ] [ -b block-size ] [ -C cluster-size ] [ -d
       root-directory ] [ -D ] [ -g blocks-per-group ] [ -G number-of-groups ]
       [ -i bytes-per-inode ] [ -I inode-size ] [ -j ] [ -J journal-options  ]
       [  -N  number-of-inodes ] [ -n ] [ -m reserved-blocks-percentage ] [ -o
       creator-os ] [ -O [^]feature[,...]  ] [ -q ] [ -r fs-revision-level ] [
       -E extended-options ] [ -v ] [ -F ] [ -L  volume-label  ]  [  -M  last-
       mounted-directory ] [ -S ] [ -t fs-type ] [ -T usage-type ] [ -U UUID ]
       [ -V ] [ -e errors-behavior ] [ -z undo_file ] device [ fs-size ]

       mke2fs -O journal_dev [ -b block-size ] [ -L volume-label ] [ -n ] [ -q
       ] [ -v ] external-journal [ fs-size ]

DESCRIPTION
       mke2fs is used to create an ext2, ext3, or ext4 file system, usually in
       a disk partition (or file) named by device.

       The file system size is specified by fs-size.  If fs-size does not have
       a  suffix,  it  is interpreted as power-of-two kilobytes, unless the -b
       blocksize option is specified, in which case fs-size is interpreted  as
       the  number  of  blocksize blocks.   If the fs-size is suffixed by 'k',
       'm', 'g', 't' (either upper-case or lower-case), then it is interpreted
       in power-of-two kilobytes, megabytes, gigabytes,  terabytes,  etc.   If
       fs-size is omitted, mke2fs will create the file system based on the de‐
       vice size.

       If mke2fs is run as mkfs.XXX (i.e., mkfs.ext2, mkfs.ext3, or mkfs.ext4)
       the  option  -t  XXX is implied; so mkfs.ext3 will create a file system
       for use with ext3, mkfs.ext4 will create a file  system  for  use  with
       ext4, and so on.

       The  defaults  of  the parameters for the newly created file system, if
       not overridden by the options  listed  below,  are  controlled  by  the
       /etc/mke2fs.conf  configuration  file.   See  the mke2fs.conf(5) manual
       page for more details.

OPTIONS
       -b block-size
              Specify the size of blocks in bytes.   Valid  block-size  values
              are  powers  of two from 1024 up to 65536 (however note that the
              kernel is able  to  mount  only  file  systems  with  block-size
              smaller or equal to the system page size - 4k on x86 systems, up
              to  64k  on ppc64 or aarch64 depending on kernel configuration).
              If omitted, block-size is heuristically determined by  the  file
              system  size  and the expected usage of the file system (see the
              -T option).  In most common cases, the default block size is 4k.
              If block-size is preceded by a negative sign ('-'), then  mke2fs
              will  use  heuristics  to  determine the appropriate block size,
              with the constraint that the block size will be at least  block-
              size  bytes.   This is useful for certain hardware devices which
              require that the blocksize be a multiple of 2k.

       -c     Check the device for bad blocks before creating the file system.
              If this option is specified twice, then a slower read-write test
              is used instead of a fast read-only test.

       -C  cluster-size
              Specify the size of cluster in bytes for file systems using  the
              bigalloc  feature.   Valid  cluster-size values are from 2048 to
              256M bytes per cluster.  This can only be specified if  the  bi‐
              galloc  feature is enabled.  (See the ext4 (5) man page for more
              details about bigalloc.)   The default cluster size if  bigalloc
              is enabled is 16 times the block size.

       -d root-directory
              Copy the contents of the given directory into the root directory
              of the file system.

       -D     Use  direct  I/O  when  writing to the disk.  This avoids mke2fs
              dirtying a lot of buffer cache memory, which  may  impact  other
              applications  running  on a busy server.  This option will cause
              mke2fs to run much more slowly, however, so there is a  tradeoff
              to using direct I/O.

       -e error-behavior
              Change the behavior of the kernel code when errors are detected.
              In  all cases, a file system error will cause e2fsck(8) to check
              the file system on the next boot.  error-behavior can be one  of
              the following:

                   continue    Continue normal execution.

                   remount-ro  Remount file system read-only.

                   panic       Cause a kernel panic.

       -E extended-options
              Set  extended options for the file system.  Extended options are
              comma separated, and may take an argument using the equals ('=')
              sign.  The -E option used  to  be  -R  in  earlier  versions  of
              mke2fs.   The -R option is still accepted for backwards compati‐
              bility, but is deprecated.  The following extended  options  are
              supported:

                   encoding=encoding-name
                          Enable  the  casefold feature in the super block and
                          set encoding-name as the encoding to  be  used.   If
                          encoding-name is not specified, the encoding defined
                          in mke2fs.conf(5) is used.

                   encoding_flags=encoding-flags
                          Define  parameters  for file name character encoding
                          operations.  If a flag is not changed using this pa‐
                          rameter, its default value is used.   encoding-flags
                          should be a comma-separated lists of flags to be en‐
                          abled.   To  disable a flag, add it to the list with
                          the prefix "no".

                          The only flag that can be set right  now  is  strict
                          which  means that invalid strings should be rejected
                          by the file system.  In the  default  configuration,
                          the strict flag is disabled.

                   mmp_update_interval=interval
                          Adjust  the  initial MMP update interval to interval
                          seconds.  Specifying an interval of 0 means  to  use
                          the  default  interval.  The specified interval must
                          be less than 300 seconds.   Requires  that  the  mmp
                          feature be enabled.

                   stride=stride-size
                          Configure  the  file  system  for  a RAID array with
                          stride-size file system blocks. This is  the  number
                          of  blocks  read or written to disk before moving to
                          the next disk, which is sometimes referred to as the
                          chunk size.  This mostly affects placement  of  file
                          system metadata like bitmaps at mke2fs time to avoid
                          placing  them  on a single disk, which can hurt per‐
                          formance.  It may also be used by the block  alloca‐
                          tor.

                   stripe_width=stripe-width
                          Configure  the  file  system  for  a RAID array with
                          stripe-width file system blocks per stripe. This  is
                          typically  stride-size * N, where N is the number of
                          data-bearing disks in the  RAID  (e.g.  for  RAID  5
                          there is one parity disk, so N will be the number of
                          disks  in the array minus 1).  This allows the block
                          allocator to prevent read-modify-write of the parity
                          in a RAID stripe if possible when the data is  writ‐
                          ten.

                   offset=offset
                          Create  the file system at an offset from the begin‐
                          ning of the device or file.  This can be useful when
                          creating disk images for virtual machines.

                   resize=max-online-resize
                          Reserve enough space so that  the  block  group  de‐
                          scriptor  table  can  grow  to support a file system
                          that has max-online-resize blocks.

                   lazy_itable_init[= <0 to disable, 1 to enable>]
                          If enabled and the uninit_bg feature is enabled, the
                          inode table will not be fully initialized by mke2fs.
                          This speeds up file  system  initialization  notice‐
                          ably,  but it requires the kernel to finish initial‐
                          izing the file system in  the  background  when  the
                          file  system  is first mounted.  If the option value
                          is omitted, it defaults to 1 to  enable  lazy  inode
                          table zeroing.

                   lazy_journal_init[= <0 to disable, 1 to enable>]
                          If  enabled, the journal inode will not be fully ze‐
                          roed out by mke2fs.  This speeds up file system ini‐
                          tialization noticeably, but carries some small  risk
                          if  the  system  crashes before the journal has been
                          overwritten entirely one time.  If the option  value
                          is  omitted, it defaults to 1 to enable lazy journal
                          inode zeroing.

                   assume_storage_prezeroed[= <0 to disable, 1 to enable>]
                          If enabled, mke2fs assumes that the  storage  device
                          has  been  prezeroed,  skips zeroing the journal and
                          inode tables, and annotates the block group flags to
                          signal that the inode table has been zeroed.

                   no_copy_xattrs
                          Normally mke2fs will copy the extended attributes of
                          the files in the directory hierarchy  specified  via
                          the  (optional)  -d  option.   This will disable the
                          copy and leaves the files in the newly created  file
                          system without any extended attributes.

                   num_backup_sb=<0|1|2>
                          If  the sparse_super2 file system feature is enabled
                          this option controls whether there will be 0, 1,  or
                          2 backup superblocks created in the file system.

                   packed_meta_blocks[= <0 to disable, 1 to enable>]
                          Place  the allocation bitmaps and the inode table at
                          the beginning of the  disk.   This  option  requires
                          that  the  flex_bg file system feature to be enabled
                          in order for it to have effect, and will also create
                          the journal at the beginning  of  the  file  system.
                          This option is useful for flash devices that use SLC
                          flash  at  the beginning of the disk.  It also maxi‐
                          mizes the range of contiguous data blocks, which can
                          be useful for certain specialized use cases, such as
                          supported Shingled Drives.

                   root_owner[=uid:gid]
                          Specify the numeric user and group ID  of  the  root
                          directory.  If no UID:GID is specified, use the user
                          and  group ID of the user running mke2fs.  In mke2fs
                          1.42 and earlier the UID and GID of the root  direc‐
                          tory  were  set by default to the UID and GID of the
                          user running the mke2fs  command.   The  root_owner=
                          option  allows  explicitly  specifying these values,
                          and avoid side-effects for users that do not  expect
                          the  contents  of the file system to change based on
                          the user running mke2fs.

                   test_fs
                          Set a flag in the file system superblock  indicating
                          that  it  may  be  mounted using experimental kernel
                          code, such as the ext4dev file system.

                   orphan_file_size=size
                          Set size of the file for tracking unlinked but still
                          open inodes and inodes with  truncate  in  progress.
                          Larger file allows for better scalability, reserving
                          a few blocks per cpu is ideal.

                   discard
                          Attempt  to  discard blocks at mkfs time (discarding
                          blocks initially is useful on  solid  state  devices
                          and sparse / thin-provisioned storage). When the de‐
                          vice  advertises  that discard also zeroes data (any
                          subsequent read after the discard and  before  write
                          returns  zero),  then  mark all not-yet-zeroed inode
                          tables as zeroed. This significantly speeds up  file
                          system initialization. This is set as default.

                   nodiscard
                          Do not attempt to discard blocks at mkfs time.

                   quotatype
                          Specify  the which  quota types (usrquota, grpquota,
                          prjquota) which should be  enabled  in  the  created
                          file  system.   The argument of this extended option
                          should be a colon separated list.  This  option  has
                          effect  only  if the quota feature is set.   The de‐
                          fault quota types to be initialized if  this  option
                          is  not specified is both user and group quotas.  If
                          the project feature is enabled that  project  quotas
                          will be initialized as well.

       -F     Force  mke2fs to create a file system, even if the specified de‐
              vice is not a partition on a block special device, or  if  other
              parameters  do not make sense.  In order to force mke2fs to cre‐
              ate a file system even if the file system appears to be  in  use
              or  is mounted (a truly dangerous thing to do), this option must
              be specified twice.

       -g blocks-per-group
              Specify the number of blocks in a block group.  There is  gener‐
              ally  no  reason for the user to ever set this parameter, as the
              default is optimal for the file system.  (For administrators who
              are creating file systems on RAID arrays, it  is  preferable  to
              use  the  stride  RAID parameter as part of the -E option rather
              than manipulating the number of blocks per group.)  This  option
              is generally used by developers who are developing test cases.

              If  the  bigalloc feature is enabled, the -g option will specify
              the number of clusters in a block group.

       -G number-of-groups
              Specify the number of block groups that will be packed  together
              to  create  a larger virtual block group (or "flex_bg group") in
              an ext4 file system.  This improves meta-data locality and  per‐
              formance  on  meta-data  heavy  workloads.  The number of groups
              must be a power of 2 and may only be specified  if  the  flex_bg
              file system feature is enabled.

       -i bytes-per-inode
              Specify  the  bytes/inode  ratio.   mke2fs  creates an inode for
              every bytes-per-inode bytes of space on the  disk.   The  larger
              the  bytes-per-inode  ratio,  the  fewer inodes will be created.
              This value generally shouldn't be smaller than the blocksize  of
              the  file  system,  since in that case more inodes would be made
              than can ever be used.  Be warned that it  is  not  possible  to
              change  this  ratio  on a file system after it is created, so be
              careful deciding the correct value  for  this  parameter.   Note
              that  resizing  a  file  system  changes the number of inodes to
              maintain this ratio.

       -I inode-size
              Specify the size of each inode in bytes.  The  inode-size  value
              must be a power of 2 larger or equal to 128.  The larger the in‐
              ode-size  the  more space the inode table will consume, and this
              reduces the usable space in the file system and can  also  nega‐
              tively  impact  performance.   It is not possible to change this
              value after the file system is created.

              File systems with an inode size of  128  bytes  do  not  support
              timestamps  beyond January 19, 2038.  Inodes which are 256 bytes
              or larger will support extended timestamps,  project  id's,  and
              the ability to store some extended attributes in the inode table
              for improved performance.

              The default inode size is controlled by the mke2fs.conf(5) file.
              In  the mke2fs.conf file shipped with e2fsprogs, the default in‐
              ode size is 256 bytes for most file systems,  except  for  small
              file systems where the inode size will be 128 bytes.

       -j     Create  the  file system with an ext3 journal.  If the -J option
              is not specified, the default journal parameters will be used to
              create an appropriately sized journal (given  the  size  of  the
              file  system) stored within the file system.  Note that you must
              be using a kernel which has ext3 support in  order  to  actually
              make use of the journal.

       -J journal-options
              Create  the ext3 journal using options specified on the command-
              line.  Journal options are comma separated, and may take an  ar‐
              gument  using the equals ('=')  sign.  The following journal op‐
              tions are supported:

                   size=journal-size
                          Create an internal journal (i.e., stored inside  the
                          file  system)  of  size journal-size megabytes.  The
                          size of the journal must be at least 1024 file  sys‐
                          tem blocks (i.e., 1MB if using 1k blocks, 4MB if us‐
                          ing  4k  blocks,  etc.)   and  may  be  no more than
                          10,240,000 file system blocks or half the total file
                          system size (whichever is smaller)

                   fast_commit_size=fast-commit-size
                          Create an additional fast  commit  journal  area  of
                          size  fast-commit-size  kilobytes.   This  option is
                          only valid if fast_commit feature is enabled on  the
                          file  system. If this option is not specified and if
                          fast_commit feature is turned on, fast  commit  area
                          size  defaults  to  journal-size / 64 megabytes. The
                          total size of the journal with  fast_commit  feature
                          set  is  journal-size  +  ( fast-commit-size * 1024)
                          megabytes. The total journal size  may  be  no  more
                          than 10,240,000 file system blocks or half the total
                          file system size (whichever is smaller).

                   location=journal-location
                          Specify  the  location of the journal.  The argument
                          journal-location can either be specified as a  block
                          number,  or  if the number has a units suffix (e.g.,
                          'M', 'G', etc.) interpret it as the offset from  the
                          beginning of the file system.

                   device=external-journal
                          Attach  the  file system to the journal block device
                          located on external-journal.  The  external  journal
                          must already have been created using the command

                          mke2fs -O journal_dev external-journal

                          Note  that  external-journal  must have been created
                          with the same block size as the new file system.  In
                          addition, while there is support for attaching  mul‐
                          tiple file systems to a single external journal, the
                          Linux  kernel and e2fsck(8) do not currently support
                          shared external journals yet.

                          Instead of specifying a device name directly, exter‐
                          nal-journal can also  be  specified  by  either  LA‐
                          BEL=label  or UUID=UUID to locate the external jour‐
                          nal by either the volume label or UUID stored in the
                          ext2 superblock at the start of  the  journal.   Use
                          dumpe2fs(8) to display a journal device's volume la‐
                          bel and UUID.  See also the -L option of tune2fs(8).

              Only  one  of the size or device options can be given for a file
              system.

       -l filename
              Read the bad blocks list from filename.   Note  that  the  block
              numbers  in  the bad block list must be generated using the same
              block size as used by mke2fs.  As a result,  the  -c  option  to
              mke2fs is a much simpler and less error-prone method of checking
              a disk for bad blocks before formatting it, as mke2fs will auto‐
              matically pass the correct parameters to the badblocks program.

       -L new-volume-label
              Set  the  volume  label for the file system to new-volume-label.
              The maximum length of the volume label is 16 bytes.

       -m reserved-blocks-percentage
              Specify the percentage of the file system  blocks  reserved  for
              the  super-user.   This  avoids  fragmentation, and allows root-
              owned daemons, such as syslogd(8), to continue to function  cor‐
              rectly after non-privileged processes are prevented from writing
              to the file system.  The default percentage is 5%.

       -M last-mounted-directory
              Set  the last mounted directory for the file system.  This might
              be useful for the sake of utilities that key  off  of  the  last
              mounted  directory  to determine where the file system should be
              mounted.

       -n     Causes mke2fs to not actually create a file system, but  display
              what  it  would do if it were to create a file system.  This can
              be used to determine the location of the backup superblocks  for
              a  particular file system, so long as the mke2fs parameters that
              were passed when the file system was originally created are used
              again.  (With the -n option added, of course!)

       -N number-of-inodes
              Overrides the default calculation of the number of  inodes  that
              should  be  reserved  for the file system (which is based on the
              number of blocks and the bytes-per-inode  ratio).   This  allows
              the user to specify the number of desired inodes directly.

       -o creator-os
              Overrides  the  default  value of the "creator operating system"
              field of the file system.  The creator field is set  by  default
              to the name of the OS the mke2fs executable was compiled for.

       -O [^]feature[,...]
              Create  a  file  system with the given features (file system op‐
              tions), overriding the default file system  options.   The  fea‐
              tures that are enabled by default are specified by the base_fea‐
              tures   relation,  either  in  the  [defaults]  section  in  the
              /etc/mke2fs.conf configuration file, or in the  [fs_types]  sub‐
              sections for the usage types as specified by the -T option, fur‐
              ther  modified  by the features relation found in the [fs_types]
              subsections for the  file  system  and  usage  types.   See  the
              mke2fs.conf(5)  manual  page  for more details.  The file system
              type-specific configuration setting found in the [fs_types] sec‐
              tion will override the global default found in [defaults].

              The file system feature set will be further edited using  either
              the  feature  set specified by this option, or if this option is
              not given, by the default_features relation for the file  system
              type being created, or in the [defaults] section of the configu‐
              ration file.

              The  file system feature set is comprised of a list of features,
              separated by commas, that are to be enabled.  To disable a  fea‐
              ture,  simply prefix the feature name with a caret ('^') charac‐
              ter.  Features with dependencies will not  be  removed  success‐
              fully.   The  pseudo-file  system  feature "none" will clear all
              file system features.

       For more information about the features which can be set, please see
              the manual page ext4(5).

       -q     Quiet execution.  Useful if mke2fs is run in a script.

       -r revision
              Set the file system revision for the new file system.  Note that
              1.2 kernels only support revision 0 file systems.   The  default
              is to create revision 1 file systems.

       -S     Write superblock and group descriptors only.  This is an extreme
              measure  to  be taken only in the very unlikely case that all of
              the superblock and backup superblocks are corrupted, and a last-
              ditch recovery method  is  desired  by  experienced  users.   It
              causes  mke2fs to reinitialize the superblock and group descrip‐
              tors, while not touching the inode table and the block and inode
              bitmaps.  The e2fsck program should  be  run  immediately  after
              this  option  is  used,  and there is no guarantee that any data
              will be salvageable.  Due to the wide variety  of  possible  op‐
              tions  to  mke2fs that affect the on-disk layout, it is critical
              to specify exactly the same format options, such  as  blocksize,
              fs-type,  feature  flags, and other tunables when using this op‐
              tion, or the file system will be  further  corrupted.   In  some
              cases,  such as file systems that have been resized, or have had
              features enabled after format time, it is  impossible  to  over‐
              write  all  of the superblocks correctly, and at least some file
              system corruption will occur.  It is best to run this on a  full
              copy  of  the  file system so other options can be tried if this
              doesn't work.

       -t fs-type
              Specify the file system type (i.e., ext2, ext3, ext4, etc.) that
              is to be created.  If this option is not specified, mke2fs  will
              pick  a default either via how the command was run (for example,
              using a name of the form mkfs.ext2, mkfs.ext3, etc.)  or  via  a
              default  as  defined by the /etc/mke2fs.conf file.   This option
              controls which file system options are used by default, based on
              the fstypes configuration stanza in /etc/mke2fs.conf.

              If the -O option is used to explicitly add or remove file system
              options that should be set in the newly created file system, the
              resulting file system may not be supported by the requested  fs-
              type.  (e.g., "mke2fs -t ext3 -O extent /dev/sdXX" will create a
              file  system that is not supported by the ext3 implementation as
              found in the Linux kernel; and "mke2fs -t ext3  -O  ^has_journal
              /dev/hdXX"  will create a file system that does not have a jour‐
              nal and hence will not be supported by the ext3 file system code
              in the Linux kernel.)

       -T usage-type[,...]
              Specify how the file system is going to be used, so that  mke2fs
              can choose optimal file system parameters for that use.  The us‐
              age  types  that  are supported are defined in the configuration
              file /etc/mke2fs.conf.  The user may specify one or  more  usage
              types using a comma separated list.

              If  this  option  is is not specified, mke2fs will pick a single
              default usage type based on the size of the file  system  to  be
              created.   If  the  file  system  size is less than 3 megabytes,
              mke2fs will use the file system type floppy.  If the file system
              size is greater than or equal to 3 but less than 512  megabytes,
              mke2fs(8) will use the file system type small.  If the file sys‐
              tem  size  is greater than or equal to 4 terabytes but less than
              16 terabytes, mke2fs(8) will use the file system type  big.   If
              the  file  system size is greater than or equal to 16 terabytes,
              mke2fs(8) will  use  the  file  system  type  huge.   Otherwise,
              mke2fs(8) will use the default file system type default.

       -U UUID
              Set  the universally unique identifier (UUID) of the file system
              to UUID.  The format of the UUID is a series of hex digits sepa‐
              rated          by          hyphens,          like          this:
              "c1b9d5a2-f162-11cf-9ece-0020afc76f16".   The UUID parameter may
              also be one of the following:

                   clear  clear the file system UUID

                   random generate a new randomly-generated UUID

                   time   generate a new time-based UUID

       -v     Verbose execution.

       -V     Print the version number of mke2fs and exit.

       -z undo_file
              Before overwriting a file system block, write the  old  contents
              of  the  block to an undo file.  This undo file can be used with
              e2undo(8) to restore the old contents of the file system  should
              something  go  wrong.   If  the  empty  string  is passed as the
              undo_file argument, the undo file will  be  written  to  a  file
              named  mke2fs-device.e2undo  in  the directory specified via the
              E2FSPROGS_UNDO_DIR environment variable or the  undo_dir  direc‐
              tive in the configuration file.

              WARNING: The undo file cannot be used to recover from a power or
              system crash.

ENVIRONMENT
       MKE2FS_SYNC
              If set to non-zero integer value, its value is used to determine
              how often sync(2) is called during inode table initialization.

       MKE2FS_CONFIG
              Determines   the   location   of  the  configuration  file  (see
              mke2fs.conf(5)).

       MKE2FS_FIRST_META_BG
              If set to non-zero integer value, its value is used to determine
              first meta block group. This is mostly for debugging purposes.

       MKE2FS_DEVICE_SECTSIZE
              If set to non-zero integer value, its value is used to determine
              logical sector size of the device.

       MKE2FS_DEVICE_PHYS_SECTSIZE
              If set to non-zero integer value, its value is used to determine
              physical sector size of the device.

       MKE2FS_SKIP_CHECK_MSG
              If set, do not show the message of file system  automatic  check
              caused by mount count or check interval.

AUTHOR
       This   version   of   mke2fs   has   been   written  by  Theodore  Ts'o
       <tytso@mit.edu>.

AVAILABILITY
       mke2fs  is  part  of  the  e2fsprogs  package  and  is  available  from
       http://e2fsprogs.sourceforge.net.

SEE ALSO
       mke2fs.conf(5),   badblocks(8),   dumpe2fs(8),  e2fsck(8),  tune2fs(8),
       ext4(5)

E2fsprogs version 1.47.0         February 2023                       MKE2FS(8)

 

man mke2fs 번역기 번역본

더보기

MKE2FS (8) 시스템 관리자의 매뉴얼 MKE2FS (8)

이름
       MKE2FS- ext2/ext3/ext4 파일 시스템을 만듭니다

개요
       mke2fs [-c | -L filename] [-B 블록 크기] [-C 클러스터 크기] [-D
       루트 다이렉터리] [-d] [-G 그룹당] [-g 그룹] [-g 그룹 수]
       [-Iode per -inode] [-i inode -size] [-j] [-j journal -options]
       [-n -inodes] [-n] [-m 예약 -블록 -중심] [-o
       Creator -os] [-o [^] 기능 [, ...]] [-q] [-r fs -revision 수준] [
       -e 확장 -옵션] [-v] [-f] [-l 볼륨 -라벨] [-m last-
       장착 디렉토리] [-s] [-t fs -type] [-t usage -type] [-u uuid]
       [-v] [-e errors -behavior] [-z undo_file] 장치 [fs -size]

mke2fs -o journal_dev [-b block -size] [-l 볼륨 -라벨] [-n] [-Q
       ] [-v] 외부 저널 [FS-Size]

설명
       MKE2FS는 일반적으로
       장치별로 명명 된 디스크 파티션 (또는 파일).

파일 시스템 크기는 FS-Size로 지정됩니다.  FS 크기가 없다면
       접미사, -B가 아닌 한, 그것은 두 킬로바이트의 힘으로 해석됩니다.
       블록 크기 옵션이 지정되며,이 경우 FS-Size는 다음으로 해석됩니다.
       블록 크기 블록의 수.   FS 크기가 'k'로 접미사되면
       'm', 'g', 't'(상단 또는 소문자), 해석됩니다.
       두 킬로바이트, 메가 바이트, 기가 바이트, 테라 바이트 등의 경우
       FS-Size는 생략되며 MKE2FS는 DE-를 기반으로 파일 시스템을 생성합니다.
       바이스 크기.

mke2fs가 mkfs.xxx로 실행되는 경우 (예 : mkfs.ext2, mkfs.ext3 또는 mkfs.ext4)
       옵션 -t xxx가 암시됩니다. 따라서 mkfs.ext3는 파일 시스템을 생성합니다
       ext3과 함께 사용하려면 mkfs.ext4는 다음과 함께 사용할 파일 시스템을 만듭니다.
       ext4 등.

새로 생성 된 파일 시스템의 매개 변수의 기본값
       아래에 나열된 옵션에 의해 재정의되지 않으며
       /etc/mke2fs.conf 구성 파일.   mke2fs.conf (5) 매뉴얼을 참조하십시오
       자세한 내용은 페이지입니다.

옵션
       -B 블록 크기
              바이트의 블록 크기를 지정하십시오.   유효한 블록 크기 값
              1024에서 65536까지의 2 가지 힘 (그러나
              커널은 블록 크기로 파일 시스템 만 장착 할 수 있습니다.
              시스템 페이지 크기보다 작거나 동일합니다 -X86 시스템의 4K, UP
              커널 구성에 따라 PPC64 또는 AARCH64에서 64K까지.
              생략하면 블록 크기는 파일에 의해 휴리스틱으로 결정됩니다
              시스템 크기 및 파일 시스템의 예상 사용 (참조
              -T 옵션).  대부분의 경우 기본 블록 크기는 4K입니다.
              블록 크기가 음수 부호 ( '-')가 앞에있는 경우 MKE2FS
              휴리스틱을 사용하여 적절한 블록 크기를 결정하고
              블록 크기가 최소한 블록이 될 것이라는 제약으로
              크기 바이트.   이것은 특정 하드웨어 장치에 유용합니다
              t가 필요합니다 블록 크기는 2k의 배수입니다.

-C 파일 시스템을 작성하기 전에 장치에 잘못된 블록이 있는지 확인하십시오.
              이 옵션이 두 번 지정되면 읽기 쓰기 테스트가 느려집니다.
              빠른 읽기 전용 테스트 대신 사용됩니다.

-C 클러스터 크기
              사용을 사용하여 파일 시스템의 바이트로 클러스터 크기를 지정합니다.
              Bigalloc 기능.   유효한 클러스터 크기 값은 2048 년부터입니다
              클러스터 당 256m 바이트.  이것은 bi- 인 경우에만 지정할 수 있습니다.
              Galloc 기능이 활성화되었습니다.  자세한 내용은 Ext4 (5) Man Page를 참조하십시오
              bigalloc에 ​​대한 자세한 내용.) 기본 클러스터 크기 인 경우 bigalloc
              활성화 된 것은 블록 크기의 16 배입니다.

-D 루트-디렉토리
              주어진 디렉토리의 내용을 루트 디렉토리에 복사합니다.
              파일 시스템의.

-D 디스크에 쓸 때 직접 I/O를 사용하십시오.  이것은 mke2fs를 피합니다
              더럽 으면 많은 버퍼 캐시 메모리가 다른 사람들에게 영향을 줄 수 있습니다.
              바쁜 서버에서 실행되는 응용 프로그램.  이 옵션으로 인해 발생합니다
              그러나 훨씬 더 천천히 실행하려면 mke2fs이므로 트레이드 오프가 있습니다.
              직접 I/O 사용.

-E 오류가 발생합니다
              오류가 감지되면 커널 코드의 동작을 변경하십시오.
              모든 경우에 파일 시스템 오류로 인해 E2FSCK (8)가 확인됩니다.
              다음 부팅의 파일 시스템.  오류-행동은 중 하나 일 수 있습니다
              다음 :

계속 정상 실행을 계속하십시오.

Remount-Ro Remount 파일 시스템 읽기 전용.

공황은 커널 공황을 유발합니다.

-E 확장 옵션
              파일 시스템에 대한 확장 옵션을 설정합니다.  확장 옵션이 있습니다
              쉼표가 분리되어 있었고, 평등을 사용하여 논쟁을 할 수 있습니다 ( '=').
              징후.  -E 옵션은 이전 버전에서 -r였습니다.
              mke2fs.   -r 옵션은 여전히 ​​거꾸로 Compati-에 허용됩니다.
              능력이지만 더 이상 사용되지 않습니다.  다음 확장 옵션이 있습니다
              지원 :

인코딩 = 인코딩 이름
                          Super Block에서 Casefol 기능을 활성화하십시오
                          인코딩 이름을 사용할 인코딩으로 설정하십시오.   만약에
                          인코딩 이름은 지정되지 않으며 인코딩이 정의됩니다
                          mke2fs.conf (5)에서 사용됩니다.

encoding_flags = 인코딩-플래그
                          파일 이름 문자 인코딩의 매개 변수를 정의합니다
                          운영.  이 PA를 사용하여 플래그가 변경되지 않은 경우
                          Rameter, 기본값이 사용됩니다.   인코딩 플래그
                          쉼표로 구분 된 깃발 목록이어야합니다.
                          abled.   플래그를 비활성화하려면 LIST에 추가하십시오.
                          접두사 "아니오".

지금 설정할 수있는 유일한 깃발은 엄격합니다.
                          즉, 유효하지 않은 문자열이 거부되어야합니다
                          파일 시스템에 의해.  기본 구성에서
                          엄격한 깃발이 비활성화되었습니다.

mmp_update_interval = 간격
                          초기 MMP 업데이트 간격을 간격으로 조정하십시오
                          초.  사용하는 0 수단의 간격을 지정합니다
                          기본 간격.  지정된 간격이 있어야합니다
                          300 초 미만입니다.   MMP를 요구합니다
                          기능이 활성화되어야합니다.

보폭 = 보폭 크기
                          RAID 배열의 파일 시스템을 구성하십시오
                          보폭 크기 파일 시스템 블록. 이것이 숫자입니다
                          이동하기 전에 읽거나 디스크에 작성된 블록의
                          다음 디스크는 때때로
                          청크 크기.  이것은 주로 파일 배치에 영향을 미칩니다
                          MKE2FS의 비트 맵과 같은 시스템 메타 데이터는 피할 시간입니다
                          단일 디스크에 배치하면
                          성능.  블록 Alloca에서도 사용될 수 있습니다.
                          토르.

Stripe_width = Stripe-width
                          RAID 배열의 파일 시스템을 구성하십시오
                          스트라이프 당 Stripe-width 파일 시스템 블록. 이것은
                          일반적으로 스트라이드 크기 * n, 여기서 n은
                          RAID의 데이터 가용 디스크 (예 : RAID 5
                          패리티 디스크 하나가 있으므로 n은
                          배열에서 디스크 마이너스 1).  이것은 블록을 허용합니다
                          패리티의 읽기 모형 쓰기를 방지하기위한 할당 자
                          데이터가 쓸 때 가능한 경우 습격 스트라이프에서
                          열.

오프셋 = 오프셋
                          처음부터 오프셋에서 파일 시스템을 만듭니다.
                          장치 또는 파일의 ning.  이것은 다음에 유용 할 수 있습니다
                          가상 머신 용 디스크 이미지 생성.

크기 조정 = MAX-ONLINE-RESIZE
                          블록 그룹이 de-
                          스크립트 테이블은 파일 시스템을 지원하기 위해 성장할 수 있습니다
                          최대 온라인-레즈 크기 블록이 있습니다.

lazy_abitable_init [= <0, 비활성화하려면 1, 1]]]
                          활성화되고 Uninit_bg 기능이 활성화 된 경우
                          Inode 테이블은 MKE2FS에 의해 완전히 초기화되지 않습니다.
                          이렇게하면 파일 시스템 초기화 통지 속도가 빨라집니다.
                          어리이지만 커널이 이니셜을 완료해야합니다.
                          백그라운드에서 파일 시스템을 izing 할 때
                          파일 시스템이 먼저 장착되었습니다.  옵션 값인 경우
                          생략하면 게으른 inode를 활성화하기 위해 기본값 1으로 1로 표시됩니다.
                          테이블 제로 연결.

lazy_journal_init [= <0, 비활성화하려면 1, 1]
                          활성화되면 저널 inode가 완전히 Ze-가 아닙니다.
                          mke2fs에 의해 썩었다.  이렇게하면 파일 시스템 속도가 빠릅니다.
                          tialization은 눈에 띄지 만 약간의 위험을 초래합니다
                          저널이 시작되기 전에 시스템이 충돌하는 경우
                          전적으로 한 번 덮어 냈습니다.  옵션 값인 경우
                          생략되면 Lazy Journal을 활성화하기 위해 기본값이 1로 표시됩니다.
                          inode Zeroing.

asme_storage_prezeroed [= <0, 비활성화하려면 1, 1]
                          활성화 된 경우 MKE2FS는 저장 장치를 가정합니다
                          프리 제로가 있었고, 저널을 제로화하고 스크립트
                          inode 테이블 및 블록 그룹 플래그에 주석을 달다
                          inode 테이블이 제로화되었음을 신호하십시오.

no_copy_xattrs
                          일반적으로 mke2fs는 확장 된 속성을 복사합니다
                          디렉토리 계층의 파일을 통해 지정된 파일
                          (선택 사항) -d 옵션.   이것은 비활성화됩니다
                          새로 생성 된 파일에 파일을 복사하여 둡니다.
                          확장 된 속성이없는 시스템.

num_backup_sb = <0 | 1 | 2>
                          sparse_super2 파일 시스템 기능이 활성화 된 경우
                          이 옵션은 0, 1, 또는
                          파일 시스템에서 생성 된 2 개의 백업 슈퍼 블록.

packed_meta_blocks [= <0, 비활성화하려면 1, 1, enable>]
                          할당 비트 맵과 inode 테이블을 배치하십시오
                          디스크의 시작.   이 옵션에는 필요합니다
                          Flex_BG 파일 시스템 기능을 활성화해야합니다
                          효과가 있고 또한
                          파일 시스템의 시작 부분에있는 저널.
                          이 옵션은 SLC를 사용하는 플래시 장치에 유용합니다.
                          디스크 시작시 플래시.  그것은 또한 maxi-
                          인접한 데이터 블록의 범위를 완화시킬 수 있습니다
                          특정 특수 사용 사례에 유용합니다
                          지지 된 대상 드라이브.

root_owner [= uid : gid]
                          루트의 숫자 사용자 및 그룹 ID를 지정합니다.
                          예배 규칙서.  UID가 없으면 GID가 지정되어 있으면 사용자를 사용하십시오
                          MKE2FS를 실행하는 사용자의 그룹 ID.  MKE2FS에서
                          1.42 그 이전에는 루트의 UID와 GID-
                          Tory는 기본적으로 UID 및 GID로 설정되었습니다.
                          MKE2FS 명령을 실행하는 사용자.   root_owner =
                          옵션은 이러한 값을 명시 적으로 지정할 수 있습니다.
                          예상치 못한 사용자의 부작용을 피하십시오
                          파일 시스템의 내용을 기반으로 변경할 내용
                          MKE2FS를 실행하는 사용자.

test_fs
                          파일 시스템에서 플래그를 설정하는 슈퍼 블록을 표시합니다
                          실험 커널을 사용하여 장착 할 수 있습니다
                          ext4dev 파일 시스템과 같은 코드.

orphan_file_size = size
                          추적되지 않은 추적을 위해 파일의 크기를 설정하지만 여전히
                          중단 된 inode와 inodes를 열어줍니다.
                          더 큰 파일은 더 나은 확장 성, 예약을 허용합니다
                          CPU 당 몇 블록이 이상적입니다.

버리다
                          MKFS 시간에 블록을 폐기하려고 시도하십시오 (폐기
                          처음에 블록은 고형 상태 장치에 유용합니다
                          그리고 희소 / 얇은 프로비저닝 스토리지). de-
                          부사장은 또한 데이터를 제정하는 것을 광고합니다 (모든
                          폐기 후 및 쓰기 전에 후속 읽기
                          0을 반환 한 다음, 제로가 아닌 모든 inode를 모두 표시합니다
                          테이블은 0입니다. 이것은 파일 속도를 크게 높입니다
                          시스템 초기화. 이것은 기본값으로 설정됩니다.

Nodiscard
                          MKFS 시간에 블록을 버리지 마십시오.

quotatype
                          어떤 할당량 유형 (usrquota, grpquota,
                          생성물에서 활성화 해야하는 prjquota)
                          파일 시스템.   이 확장 된 옵션의 인수
                          콜론 분리 목록이어야합니다.  이 옵션은 있습니다
                          할당량 기능이 설정된 경우에만 효과.   de-
                          이 옵션 인 경우 오류 할당량 유형이 초기화됩니다
                          사용자 및 그룹 할당량이 모두 지정되지 않습니다.  만약에
                          프로젝트 기능은 해당 프로젝트 할당량을 활성화합니다
                          초기화됩니다.

-f 지정된 de-더라도 MKE2FS가 파일 시스템을 생성하도록 강제
              Vice는 블록 특수 장치의 파티션이 아니거나 다른 경우
              매개 변수는 의미가 없습니다.  mke2fs를 강제로 만들기 위해
              파일 시스템이 사용중인 것처럼 보이도 파일 시스템을 먹었습니다.
              또는 장착 (진정으로 위험한 일),이 옵션은
              두 번 지정하십시오.

-G 그룹당 G. G.
              블록 그룹의 블록 수를 지정하십시오.  GENER-
              Ally 사용자 가이 매개 변수를 설정할 이유가 없습니다.
              기본값은 파일 시스템에 최적입니다.  (관리자에게
              RAID 어레이에 파일 시스템을 작성하고 있습니다.
              -E 옵션의 일부로 Stride Raid 매개 변수를 사용하십시오.
              그룹당 블록 수를 조작하는 것보다.)이 옵션
              일반적으로 테스트 사례를 개발하는 개발자가 사용합니다.

bigalloc 기능이 활성화되면 -g 옵션이 지정합니다.
              블록 그룹의 클러스터 수.

-G 그룹 수
              함께 포장 될 블록 그룹의 수 지정
              더 큰 가상 블록 그룹 (또는 "Flex_BG Group")을 만들려면
              ext4 파일 시스템.  이것은 메타 데이터 지역을 향상시키고 즉
              메타-데이터 무거운 워크로드에 대한 형성.  그룹의 수
              2의 전력이어야하며 Flex_BG 인 경우에만 지정 될 수 있습니다.
              파일 시스템 기능이 활성화되었습니다.

-IDES-Inode
              바이트/inode 비율을 지정합니다.   mke2fs는 inode for inode를 만듭니다
              디스크의 모든 바이트-인오드 바이트 바이트.   더 큰
              바이트-인오드 비율, inode가 적을 수 있습니다.
              이 값은 일반적으로 블록 크기보다 작아서는 안됩니다.
              파일 시스템은이 경우 더 많은 Inodes가 만들어 지므로
              사용될 수있는 것보다.  불가능하다고 경고하십시오
              파일 시스템이 생성 된 후에이 비율을 변경하십시오.
              이 매개 변수의 올바른 값을 신중하게 결정합니다.   메모
              파일 시스템을 크기로 조정하면 Inodes 수가 변경됩니다.
              이 비율을 유지하십시오.

-나는 inode-size입니다
              각 inode의 크기를 바이트로 지정하십시오.  inode 크기 값
              2의 더 크거나 128의 힘이어야합니다.
              oode 사이즈 inode 테이블이 소비 할 공간이 더 많을수록
              파일 시스템에서 사용 가능한 공간을 줄이고 부정 할 수도 있습니다.
              성능에 영향을 미칩니다.   이것을 바꿀 수는 없습니다
              값 파일 시스템이 작성된 후.

inode 크기가 128 바이트 인 파일 시스템은 지원하지 않습니다.
              2038 년 1 월 19 일 이후 타임 스탬프. 256 바이트 인 inodes
              또는 더 큰 타임 스탬프, 프로젝트 ID 및
              inode 테이블에 확장 된 속성을 저장하는 기능
              성능 향상.

기본 inode 크기는 mke2fs.conf (5) 파일에 의해 제어됩니다.
              e2fsprogs와 함께 배송 된 mke2fs.conf 파일에서 기본 정보는
              ODE 크기는 대부분의 파일 시스템에 대해 256 바이트입니다.
              inode 크기가 128 바이트 인 파일 시스템.

-j ext3 저널로 파일 시스템을 만듭니다.  -j 옵션 인 경우
              지정되지 않으면 기본 저널 매개 변수가 사용됩니다.
              적절한 크기의 저널을 만듭니다 (크기가 주어지면
              파일 시스템)은 파일 시스템 내에 저장됩니다.  당신은해야합니다
              실제로 ext3 지원이있는 커널을 사용하고 있습니다.
              저널을 사용하십시오.

-J Journal-options
              명령에 지정된 옵션을 사용하여 ext3 저널을 만듭니다.
              선.  저널 옵션은 쉼표가 분리되어 있으며 AR-
              equals ( '=') 표시를 사용하는 도우트.  다음 저널 op-
              Tions가 지원됩니다.

크기 = 저널 사이즈
                          내부 저널을 만듭니다 (즉, 내부에 저장됩니다
                          파일 시스템) 크기의 저널 크기 메가 바이트.  그만큼
                          저널의 크기는 최소 1024 파일 시스템이어야합니다.
                          TEM 블록 (즉, 1K 블록을 사용하는 경우 1MB, US- 인 경우 4MB
                          4K 블록 등)
                          10,240,000 파일 시스템 블록 또는 총 파일의 절반
                          시스템 크기 (어느 쪽이 더 작은 지)

FAST_COMMIT_SIZE = FAST-COMMIT-SIZE
                          추가 빠른 커밋 저널 영역을 만듭니다
                          빠른 커밋 크기 킬로바이트 크기.   이 옵션은입니다
                          FAST_COMMIT 기능이 활성화 된 경우에만 유효합니다
                          파일 시스템. 이 옵션이 지정되지 않은 경우
                          FAST_COMMIT 기능이 켜져 있고 FAST 커밋 영역이 켜집니다
                          크기 기본값으로 저널 크기 / 64 메가 바이트. 그만큼
                          FAST_COMMIT 기능이있는 저널의 총 크기
                          세트는 Journal-Size + (Fast-Commit-Size * 1024)입니다.
                          메가 바이트. 총 저널 크기는 더 이상 없을 수 있습니다
                          10,240,000 파일 시스템 블록 또는 전체의 절반 이상
                          파일 시스템 크기 (어느 쪽이든).

위치 = 저널-위치
                          저널의 위치를 ​​지정하십시오.  논쟁
                          저널-위치는 블록으로 지정할 수 있습니다
                          숫자 또는 숫자에 단위 접미사가있는 경우 (예 :
                          'm', 'g'등)) 그것을
                          파일 시스템의 시작.

장치 = 외부 저널
                          파일 시스템을 저널 블록 장치에 첨부하십시오
                          외부 저널에 위치합니다.  외부 저널
                          명령을 사용하여 이미 생성되어야합니다

mke2fs -o journal_dev 외부 저널

외부 저널이 만들어 졌을 것입니다
                          새 파일 시스템과 동일한 블록 크기로.  ~ 안에
                          추가, mul- 첨부에 대한 지원이 있지만
                          단일 외부 저널에 대한 Tiple 파일 시스템
                          Linux 커널과 E2FSCK (8)는 현재 지원하지 않습니다
                          아직 외부 저널을 공유했습니다.

장치 이름을 직접 지정하는 대신 exter-
                          nal-journal은 또한 LA에 의해 지정할 수 있습니다.
                          벨 = 레이블 또는 uuid = uuid 외부 여행을 찾으려면 -
                          볼륨 레이블 또는 UUID에 의해
                          ext2 저널의 시작 부분에서 슈퍼 블록.   사용
                          DUMPE2FS (8) 저널 장치의 볼륨 LA를 표시하려면
                          벨과 uuid.  Tune2FS (8)의 -L 옵션도 참조하십시오.

파일에 대해 크기 또는 장치 옵션 중 하나만 제공 할 수 있습니다.
              체계.

-L 파일 이름
              Filename에서 Bad Blocks 목록을 읽으십시오.   블록에 유의하십시오
              불량 블록 목록의 숫자는 동일하게 사용하여 생성해야합니다.
              MKE2FS에서 사용하는 블록 크기.  결과적으로 -c 옵션
              MKE2FS는 훨씬 간단하고 오류가 발생하기 쉬운 점검 방법입니다.
              MKE2FS가 자동으로 포맷하기 전에 불량 블록에 대한 디스크
              올바른 매개 변수를 BadBlocks 프로그램에 Matically 전달하십시오.

-L NEW-VOLUME-LABEL
              파일 시스템의 볼륨 레이블을 New-Volume-Label로 설정하십시오.
              볼륨 레이블의 최대 길이는 16 바이트입니다.

-M 예약-블록-중심
              예약 된 파일 시스템 블록의 백분율을 지정합니다.
              슈퍼 사용자.   이것은 단편화를 피하고 루트를 허용합니다.
              Syslogd (8)와 같은 소유의 데몬은 계속해서 기능을 수행합니다.
              비정상적인 프로세스 후에 직접 서면으로 작성되지 않습니다
              파일 시스템에.  기본 비율은 5%입니다.

-M 최후의 다이얼 디렉토리
              파일 시스템의 마지막 장착 디렉토리를 설정하십시오.  이것은 할 수 있습니다
              마지막으로 열쇠를 벗는 유틸리티를 위해 유용합니다.
              파일 시스템의 위치를 ​​결정하기위한 장착 디렉토리
              장착.

-N MKE2FS가 실제로 파일 시스템을 생성하지 않지만 표시합니다.
              파일 시스템을 만들면 무엇을 할 것인지.  이것은 할 수 있습니다
              백업 슈퍼 블록의 위치를 ​​결정하는 데 사용됩니다.
              MKE2FS 매개 변수만큼 특정 파일 시스템
              파일 시스템이 원래 생성되었을 때 전달되었습니다.
              다시.  (물론 -N 옵션이 추가되었습니다!)

-N 인 오드 번호
              inodes 수의 기본 계산을 무시합니다.
              파일 시스템에 예약해야합니다 (이는
              블록 수와 inode 당 바이트 비율).   이것은 허용합니다
              사용자는 원하는 inodes의 수를 직접 지정합니다.

-O Creator-OS
              "제작자 운영 체제"의 기본값을 대체합니다.
              파일 시스템의 필드.  Creator 필드는 기본적으로 설정됩니다
              OS의 이름으로 MKE2FS 실행 파일이 컴파일되었습니다.

-o [^] 기능 [, ...]
              주어진 기능 (파일 시스템 op-
              tions), 기본 파일 시스템 옵션을 재정의합니다.   fea-
              기본적으로 활성화 된 tures는 base_fea-에 의해 지정됩니다.
              tures 관계, [기본값] 섹션의
              /etc/mke2fs.conf 구성 파일 또는 [fs_types] sub-
              -t 옵션, fur-에 의해 지정된 사용 유형의 섹션
              [fs_types]에서 발견 된 기능 관계에 의해 수정됩니다.
              파일 시스템 및 사용 유형의 하위 섹션.   참조
              자세한 내용은 mke2fs.conf (5) 매뉴얼 페이지입니다.  파일 시스템
              [fs_types] sec-에서 찾은 유형 별 구성 설정
              tion은 [기본값]에있는 글로벌 기본값을 무시합니다.

파일 시스템 기능 세트는
              이 옵션으로 지정된 기능 세트 또는이 옵션이
              파일 시스템의 DEFAULT_FEATURES 관계에 따라 제공되지 않습니다.
              생성중인 유형 또는 configu-의 [기본값] 섹션에서
              배급 파일.

파일 시스템 기능 세트는 기능 목록으로 구성되어 있으며
              쉼표로 구분되며 활성화되어야합니다.  fea를 비활성화하려면
              ture, 간단히 피처 이름을 관리 ( '^') 문자로 접두사하십시오.
              테르.  의존성이있는 기능은 성공하지 못합니다.
              충분히.   의사 파일 시스템 기능 "없음"은 모두를 지울 것입니다
              파일 시스템 기능.

설정할 수있는 기능에 대한 자세한 내용은
              매뉴얼 페이지 Ext4 (5).

-Q 조용한 실행.  MKE2FS가 스크립트로 실행되는 경우 유용합니다.

-R 개정
              새 파일 시스템의 파일 시스템 개정을 설정하십시오.  주목하십시오
              1.2 커널은 개정 0 파일 시스템 만 지원합니다.   기본값
              개정 1 파일 시스템을 작성하는 것입니다.

-s 슈퍼 블록 및 그룹 디스크립터 만 쓰기 만하면됩니다.  이것은 극단입니다
              거의 모든 경우에만 취해야 할 것입니다.
              슈퍼 블록 및 백업 슈퍼 블록이 손상되었으며 마지막으로
              숙련 된 사용자가 도랑 복구 방법을 요구합니다.   그것
              MKE2FS가 슈퍼 블록 및 그룹 설명을 다시화하게합니다.
              inode 테이블과 블록 및 inode에 닿지 않고 Tors
              비트 맵.  E2FSCK 프로그램은 즉시 실행해야합니다
              이 옵션이 사용되며 모든 데이터가
              구할 수 있습니다.  다양한 가능한 OP-로 인해
              온 디스크 레이아웃에 영향을 미치는 MKE2FS에 대한 tions는 중요합니다.
              Blocksize와 같은 동일한 형식 옵션을 정확히 지정하려면
              이 OP-를 사용할 때 FS 유형, 특징 플래그 및 기타 튜블 가능성
              또는 파일 시스템은 모피입니다 그녀는 타락했다.   일부
              크기 조정되었거나있는 파일 시스템과 같은 사례
              형식 시간 후에 활성화 된 기능은 과도하게 불가능합니다.
              모든 슈퍼 블록을 올바르게 작성하고 적어도 일부 파일을 작성하십시오.
              시스템 부패가 발생합니다.  이것을 완전히 실행하는 것이 가장 좋습니다
              파일 시스템의 사본이므로 다른 옵션을 시도 할 수 있습니다.
              작동하지 않습니다.

-T FS 유형
              파일 시스템 유형 (예 : ext2, ext3, ext4 등)을 지정합니다.
              만들어집니다.  이 옵션이 지정되지 않은 경우 MKE2FS가됩니다
              명령이 실행되는 방식을 통해 기본값을 선택하십시오 (예 :
              mkfs.ext2, mkfs.ext3 등의 이름을 사용하여
              /etc/mke2fs.conf 파일에 의해 정의 된 기본값.   이 옵션
              기본적으로 어떤 파일 시스템 옵션을 기본적으로 사용하는지 제어합니다.
              /etc/mke2fs.conf의 FSTYPES 구성 stanza.

-o 옵션이 파일 시스템을 명시 적으로 추가하거나 제거하는 데 사용되는 경우
              새로 생성 된 파일 시스템에서 설정 해야하는 옵션
              결과 파일 시스템은 요청 된 FS-에 의해 지원되지 않을 수 있습니다.
              유형.  (예 : "mke2fs -t ext3 -o extent /dev /sdxx"는
              ext3 구현에 의해 지원되지 않는 파일 시스템은 다음과 같이
              Linux 커널에서 발견; and "mke2fs -t ext3  -O  ^has_journal
              /dev/hdxx "는 jour-가없는 파일 시스템을 만듭니다.
              NAL이므로 ext3 파일 시스템 코드에 의해 지원되지 않습니다.
              리눅스 커널에서.)

-t 사용 유형 [, ...]
              MKE2FS가되도록 파일 시스템을 사용하는 방법을 지정합니다.
              해당 용도로 최적의 파일 시스템 매개 변수를 선택할 수 있습니다.  미국 -
              지원되는 연령 유형은 구성에 정의됩니다.
              file /etc/mke2fs.conf.  사용자는 하나 이상의 사용량을 지정할 수 있습니다
              쉼표로 분리 된 목록을 사용하는 유형.

이 옵션이 지정되지 않은 경우 MKE2FS는 단일을 선택합니다.
              파일 시스템의 크기에 따라 기본 사용 유형
              생성.   파일 시스템 크기가 3 메가 바이트 미만인 경우
              MKE2FS는 파일 시스템 유형 floppy를 사용합니다.  파일 시스템 인 경우
              크기는 3보다 크지 만 512 메가 바이트 미만입니다.
              MKE2FS (8)는 파일 시스템 유형을 사용합니다.  파일이 sys-
              TEM 크기는 4 테라 바이트보다 크거나 같지만
              16 Terabytes, MKE2FS (8)는 파일 시스템 유형을 사용합니다.   만약에
              파일 시스템 크기는 16 테라 바이트보다 크거나 동일합니다.
              MKE2FS (8)는 파일 시스템 유형을 크게 사용합니다.   그렇지 않으면,
              MKE2FS (8)는 기본 파일 시스템 유형 기본값을 사용합니다.

-U UUID
              파일 시스템의 UUID (Universally 고유 식별자) 설정
              uuid에게.  UUID의 형식은 일련의 16 진수 숫자 Sepa입니다.
              다음과 같이 하이픈에 의해 평가됩니다.
              "C1B9D5A2-F162-11CF-9ECE-0020AFC76F16".   UUID 매개 변수는 할 수 있습니다
              또한 다음 중 하나가됩니다.

파일 시스템 UUID를 지우십시오

무작위로 무작위로 생성 된 UUID를 생성합니다

시간은 새로운 시간 기반 UUID를 생성합니다

-V 장점 실행.

-V MKE2FS의 버전 번호를 인쇄하고 종료하십시오.

-z undo_file
              파일 시스템 블록을 덮어 쓰기 전에 이전 내용을 작성하십시오.
              블록의 실행 취소 파일.  이 실행 취소 파일은 함께 사용할 수 있습니다
              e2undo (8) 파일 시스템의 기존 내용을 복원하려면
              뭔가 잘못되었습니다.   빈 문자열이
              undo_file 인수, undo 파일은 파일에 기록됩니다.
              MKE2FS-DEVICE.E2UNDO를 통해 지정된 디렉토리에서 명명되었습니다
              e2fsprogs_undo_dir 환경 변수 또는 undo_dir direc-
              구성 파일에서 tive.

경고 : UNDO 파일은 전원에서 복구하는 데 사용될 수 없습니다.
              시스템 충돌.

환경
       mke2fs_sync
              0이 아닌 정수 값으로 설정된 경우 그 값은 결정에 사용됩니다.
              inode 테이블 초기화 중에 동기화가 얼마나 자주 호출되는지.

MKE2FS_CONFIG
              구성 파일의 위치를 ​​결정합니다 (참조
              mke2fs.conf (5)).

MKE2FS_FIRST_META_BG
              0이 아닌 정수 값으로 설정된 경우 그 값은 결정에 사용됩니다.
              첫 번째 메타 블록 그룹. 이것은 주로 디버깅 목적입니다.

mke2fs_device_sectsize
              0이 아닌 정수 값으로 설정된 경우 그 값은 결정에 사용됩니다.
              장치의 논리 섹터 크기.

MKE2FS_DEVICE_PHYS_SECTSIZE
              0이 아닌 정수 값으로 설정된 경우 그 값은 결정에 사용됩니다.
              장치의 물리적 섹터 크기.

mke2fs_skip_check_msg
              설정된 경우 파일 시스템 자동 점검의 메시지를 표시하지 마십시오.
              마운트 카운트 또는 점검 간격으로 인해 발생합니다.

작가
       이 버전의 MKE2FS는 Theodore Ts'o가 작성했습니다.
       <tytso@mit.edu>.

유효성
       MKE2FS는 E2FSPROGS 패키지의 일부이며
       http://e2fsprogs.sourceforge.net.

참조하십시오
       mke2fs.conf (5), badblocks (8), dumpe2fs (8), e2fsck (8), tune2fs (8),
       ext4 (5)

E2FSPROGS 버전 1.47.0 2023 년 2 월 MKE2FS (8)

 

형태와 기능

mkfs [파티션] : [파티션]에 기본 파일시스템을 적용한다.(ext2)

mkfs [-t 파일시스템] [파티션] : [파티션]에 지정한 [파일시스템]을 적용한다.

mke2fs [파티션] : [파티션]에 기본 파일시스템을 적용한다.(ext2)

mke2fs [-t 파일시스템] [파티션] : [파티션]에 지정한 [파일시스템]을 적용한다.

 

이전 포스팅에서 fdisk를 통해 파티션을 관리하는 방법에 대해서 알아보았다.

하지만 fdisk는 파티션만을 만들어 줄 뿐 내부의 공간을 채워주지는 않는다. 즉 빈집이다.

 

윈도우에서는 파티션을 만들면 포멧을 자동으로 진행해주는데 리눅스는 그렇지 않았다.

 

따라서 내부에 파일을 어떻게 저장하고 관리할 것인지는 별도의 명령어가 필요한데 그것이 mkfs이다.

말 그대로 make file system 인 것이다.

 

 

mke2fs는 mkfs에 비해 더 많은 기능을 제공한다. 아직까진 기본적인 파일시스템을 생성하는 기능만 필요해서 별도의 사용은 해본적 없으나 윈도우에서 제공하는 디스크 조각모음 같은 기능을 사용할 수 있다.