← Documents Documentation/filesystems/ntfs3.rst GitHub 원문 ↗

Linux 6.18.37 · Filesystems

NTFS3

NTFS3 기능, extended attribute, mount option과 journaling 상태의 전문 번역입니다.

Source pathDocumentation/filesystems/ntfs3.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

ntfs3.rst:1-123

NTFS3는 NTFS 3.1까지 normal·sparse·compressed file의 read/write, native journal replay, NFS export와 predefined xattr를 지원합니다. Mount option은 Windows attribute·name 규칙과 Linux ownership·permission·POSIX ACL 의미를 연결합니다.

Dirty volume의 `force`는 비권장이고 `windows_names`는 Windows와 호환되지 않는 새 name을 차단합니다. JBD 기반 full journaling은 아직 구현되지 않은 향후 과제입니다.

NTFS3 운영 핵심
영역핵심
Filesystem type`ntfs3`
Read/writeNormal, sparse, compressed file
RecoveryNative journal replay
CompatibilityWindows attribute와 name option
주의Dirty-volume force mount 비권장
향후Full journaling over JBD

현재 지원 기능과 주의 option을 요약합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 =====
4 NTFS3
5 =====
6
7 Summary and Features
8 ====================
9
10 NTFS3 is fully functional NTFS Read-Write driver. The driver works with NTFS
11 versions up to 3.1. File system type to use on mount is *ntfs3*.
12
13 - This driver implements NTFS read/write support for normal, sparse and
14 compressed files.
15 - Supports native journal replaying.
16 - Supports NFS export of mounted NTFS volumes.
17 - Supports extended attributes. Predefined extended attributes:
18
19 - *system.ntfs_security* gets/sets security
20
21 Descriptor: SECURITY_DESCRIPTOR_RELATIVE
22
23 - *system.ntfs_attrib* gets/sets ntfs file/dir attributes.
24
25 Note: Applied to empty files, this allows to switch type between
26 sparse(0x200), compressed(0x800) and normal.
27
28 - *system.ntfs_attrib_be* gets/sets ntfs file/dir attributes.
29
30 Same value as system.ntfs_attrib but always represent as big-endian
31 (endianness of system.ntfs_attrib is the same as of the CPU).
32
33 Mount Options
34 =============
35
36 The list below describes mount options supported by NTFS3 driver in addition to
37 generic ones. You can use every mount option with **no** option. If it is in
38 this table marked with no it means default is without **no**.
39
40 .. flat-table::
41 :widths: 1 5
42 :fill-cells:
43
44 * - iocharset=name
45 - This option informs the driver how to interpret path strings and
46 translate them to Unicode and back. If this option is not set, the
47 default codepage will be used (CONFIG_NLS_DEFAULT).
48
49 Example: iocharset=utf8
50
51 * - uid=
52 - :rspan:`1`
53 * - gid=
54
55 * - umask=
56 - Controls the default permissions for files/directories created after
57 the NTFS volume is mounted.
58
59 * - dmask=
60 - :rspan:`1` Instead of specifying umask which applies both to files and
61 directories, fmask applies only to files and dmask only to directories.
62 * - fmask=
63
64 * - nohidden
65 - Files with the Windows-specific HIDDEN (FILE_ATTRIBUTE_HIDDEN) attribute
66 will not be shown under Linux.
67
68 * - sys_immutable
69 - Files with the Windows-specific SYSTEM (FILE_ATTRIBUTE_SYSTEM) attribute
70 will be marked as system immutable files.
71
72 * - hide_dot_files
73 - Updates the Windows-specific HIDDEN (FILE_ATTRIBUTE_HIDDEN) attribute
74 when creating and moving or renaming files. Files whose names start
75 with a dot will have the HIDDEN attribute set and files whose names
76 do not start with a dot will have it unset.
77
78 * - windows_names
79 - Prevents the creation of files and directories with a name not allowed
80 by Windows, either because it contains some not allowed character (which
81 are the characters " * / : < > ? \\ | and those whose code is less than
82 0x20), because the name (with or without extension) is a reserved file
83 name (CON, AUX, NUL, PRN, LPT1-9, COM1-9) or because the last character
84 is a space or a dot. Existing such files can still be read and renamed.
85
86 * - discard
87 - Enable support of the TRIM command for improved performance on delete
88 operations, which is recommended for use with the solid-state drives
89 (SSD).
90
91 * - force
92 - Forces the driver to mount partitions even if volume is marked dirty.
93 Not recommended for use.
94
95 * - sparse
96 - Create new files as sparse.
97
98 * - showmeta
99 - Use this parameter to show all meta-files (System Files) on a mounted
100 NTFS partition. By default, all meta-files are hidden.
101
102 * - prealloc
103 - Preallocate space for files excessively when file size is increasing on
104 writes. Decreases fragmentation in case of parallel write operations to
105 different files.
106
107 * - acl
108 - Support POSIX ACLs (Access Control Lists). Effective if supported by
109 Kernel. Not to be confused with NTFS ACLs. The option specified as acl
110 enables support for POSIX ACLs.
111
112 Todo list
113 =========
114 - Full journaling support over JBD. Currently journal replaying is supported
115 which is not necessarily as effective as JBD would be.
116
117 References
118 ==========
119 - Commercial version of the NTFS driver for Linux.
120 https://www.paragon-software.com/home/ntfs-linux-professional/
121
122 - Direct e-mail address for feedback and requests on the NTFS3 implementation.
123 almaz.alexandrovich@paragon-software.com
124

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

NTFS3 read/write 기능과 extended attribute

1-32

NTFS3는 NTFS 3.1 version까지 지원하는 완전한 read/write driver입니다. Mount할 때 filesystem type으로 `ntfs3`를 사용합니다.

Normal, sparse, compressed file의 read/write, native journal replay, mount한 NTFS volume의 NFS export와 extended attribute를 지원합니다.

`system.ntfs_security`는 `SECURITY_DESCRIPTOR_RELATIVE` security descriptor를 get/set합니다. `system.ntfs_attrib`는 NTFS file/directory attribute를 CPU native endianness로 get/set합니다.

빈 file에 `system.ntfs_attrib`를 적용하면 sparse `0x200`, compressed `0x800`, normal type 사이를 전환할 수 있습니다. `system.ntfs_attrib_be`는 같은 값을 항상 big-endian으로 표현합니다.

NTFS3 predefined xattr
xattr값/형식기능
`system.ntfs_security``SECURITY_DESCRIPTOR_RELATIVE`Security descriptor get/set
`system.ntfs_attrib`CPU endiannessNTFS file/dir attribute get/set
`system.ntfs_attrib_be`Big-endian같은 attribute의 안정된 endian 표현

NTFS security와 file attribute를 노출하는 세 extended attribute입니다.

.. SPDX-License-Identifier: GPL-2.0

=====
NTFS3
=====

Summary and Features
====================

NTFS3 is fully functional NTFS Read-Write driver. The driver works with NTFS
versions up to 3.1. File system type to use on mount is *ntfs3*.

- This driver implements NTFS read/write support for normal, sparse and
  compressed files.
- Supports native journal replaying.
- Supports NFS export of mounted NTFS volumes.
- Supports extended attributes. Predefined extended attributes:

        - *system.ntfs_security* gets/sets security

                Descriptor: SECURITY_DESCRIPTOR_RELATIVE

        - *system.ntfs_attrib* gets/sets ntfs file/dir attributes.

          Note: Applied to empty files, this allows to switch type between
          sparse(0x200), compressed(0x800) and normal.

        - *system.ntfs_attrib_be* gets/sets ntfs file/dir attributes.

          Same value as system.ntfs_attrib but always represent as big-endian
          (endianness of system.ntfs_attrib is the same as of the CPU).

Encoding, owner와 permission option

33-63

아래 option은 generic mount option에 더해 NTFS3가 지원합니다. 모든 option에는 `no` prefix 형태를 사용할 수 있습니다. 원문 표에서 option 자체가 `no`로 표시되면 그 `no`가 없는 형태가 default라는 뜻입니다.

`iocharset=name`은 path string을 해석해 Unicode로 왕복 변환할 charset을 지정합니다. 생략하면 `CONFIG_NLS_DEFAULT` codepage를 쓰며 예시는 `iocharset=utf8`입니다.

`uid=`와 `gid=`는 mount에서 보이는 owner ID를 지정합니다. `umask=`는 mount 뒤 생성하는 file과 directory의 기본 permission을 함께 제어합니다.

`fmask=`는 file에만, `dmask=`는 directory에만 적용하므로 두 종류를 분리해 설정할 때 사용합니다.

NTFS3 기본 mount option
Option적용 대상동작
`iocharset=name`Path stringUnicode 왕복 변환 codepage
`uid=`모든 inode표시 owner UID
`gid=`모든 inode표시 owner GID
`umask=`File과 directory공통 permission mask
`fmask=`FileFile 전용 permission mask
`dmask=`DirectoryDirectory 전용 permission mask

Path encoding과 ownership·permission 기본값을 제어합니다.

Mount Options
=============

The list below describes mount options supported by NTFS3 driver in addition to
generic ones. You can use every mount option with **no** option. If it is in
this table marked with no it means default is without **no**.

.. flat-table::
   :widths: 1 5
   :fill-cells:

   * - iocharset=name
     - This option informs the driver how to interpret path strings and
       translate them to Unicode and back. If this option is not set, the
       default codepage will be used (CONFIG_NLS_DEFAULT).

       Example: iocharset=utf8

   * - uid=
     - :rspan:`1`
   * - gid=

   * - umask=
     - Controls the default permissions for files/directories created after
       the NTFS volume is mounted.

   * - dmask=
     - :rspan:`1` Instead of specifying umask which applies both to files and
       directories, fmask applies only to files and dmask only to directories.
   * - fmask=

Windows attribute, compatibility와 allocation option

64-111

`nohidden`은 Windows `HIDDEN`(`FILE_ATTRIBUTE_HIDDEN`) attribute가 있는 file을 Linux에서 표시하지 않습니다. `sys_immutable`은 Windows `SYSTEM`(`FILE_ATTRIBUTE_SYSTEM`) file을 system immutable로 표시합니다.

`hide_dot_files`는 create·move·rename 때 dot으로 시작하는 name에는 HIDDEN attribute를 설정하고 그렇지 않은 name에서는 지웁니다.

`windows_names`는 Windows가 허용하지 않는 name의 생성을 막습니다. 금지 character는 따옴표, `* / : < > ? \ |`, code 0x20 미만 character이며 `CON`, `AUX`, `NUL`, `PRN`, `LPT1-9`, `COM1-9` 같은 reserved name과 space·dot으로 끝나는 name도 금지합니다. 이미 존재하는 이런 file은 계속 읽고 rename할 수 있습니다.

`discard`는 delete 성능 향상을 위해 TRIM을 사용하며 SSD에 권장됩니다. `force`는 dirty 표시 volume도 강제로 mount하지만 사용을 권장하지 않습니다. `sparse`는 새 file을 sparse로 만듭니다.

`showmeta`는 기본으로 숨겨진 모든 NTFS meta-file(System File)을 표시합니다. `prealloc`은 write로 file size가 커질 때 공간을 넉넉히 미리 할당해 서로 다른 file에 대한 parallel write의 fragmentation을 줄입니다.

`acl`은 kernel이 지원할 때 POSIX ACL을 활성화합니다. NTFS ACL과 혼동하면 안 됩니다.

NTFS3 동작 mount option
Option동작
`nohidden`Windows HIDDEN file을 Linux에서 숨김
`sys_immutable`Windows SYSTEM file을 immutable로 표시
`hide_dot_files`Dot-name과 HIDDEN attribute 동기화
`windows_names`금지 character·reserved name·끝 space/dot 생성 차단
`discard`Delete 시 TRIM
`force`Dirty volume 강제 mount, 비권장
`sparse`새 file을 sparse로 생성
`showmeta`NTFS meta-file 표시
`prealloc`확장 write에 선할당해 fragmentation 감소
`acl`POSIX ACL 활성화, NTFS ACL과 별개

Windows attribute, name compatibility, storage와 ACL 동작입니다.

   * - nohidden
     - Files with the Windows-specific HIDDEN (FILE_ATTRIBUTE_HIDDEN) attribute
       will not be shown under Linux.

   * - sys_immutable
     - Files with the Windows-specific SYSTEM (FILE_ATTRIBUTE_SYSTEM) attribute
       will be marked as system immutable files.

   * - hide_dot_files
     - Updates the Windows-specific HIDDEN (FILE_ATTRIBUTE_HIDDEN) attribute
       when creating and moving or renaming files. Files whose names start
       with a dot will have the HIDDEN attribute set and files whose names
       do not start with a dot will have it unset.

   * - windows_names
     - Prevents the creation of files and directories with a name not allowed
       by Windows, either because it contains some not allowed character (which
       are the characters " * / : < > ? \\ | and those whose code is less than
       0x20), because the name (with or without extension) is a reserved file
       name (CON, AUX, NUL, PRN, LPT1-9, COM1-9) or because the last character
       is a space or a dot. Existing such files can still be read and renamed.

   * - discard
     - Enable support of the TRIM command for improved performance on delete
       operations, which is recommended for use with the solid-state drives
       (SSD).

   * - force
     - Forces the driver to mount partitions even if volume is marked dirty.
       Not recommended for use.

   * - sparse
     - Create new files as sparse.

   * - showmeta
     - Use this parameter to show all meta-files (System Files) on a mounted
       NTFS partition. By default, all meta-files are hidden.

   * - prealloc
     - Preallocate space for files excessively when file size is increasing on
       writes. Decreases fragmentation in case of parallel write operations to
       different files.

   * - acl
     - Support POSIX ACLs (Access Control Lists). Effective if supported by
       Kernel. Not to be confused with NTFS ACLs. The option specified as acl
       enables support for POSIX ACLs.

JBD full journaling 과제와 참고 경로

112-123

향후 과제는 JBD를 통한 full journaling 지원입니다. 현재는 journal replay를 지원하지만 JBD 기반 full journaling만큼 효과적이라고 보장되지는 않습니다.

따라서 native journal replay를 이미 지원한다는 현재 기능과, JBD full journaling이라는 미완료 목표를 구분해야 합니다.

원문은 Paragon Software의 commercial NTFS driver page와 NTFS3 implementation feedback·request용 e-mail `almaz.alexandrovich@paragon-software.com`을 참고 정보로 제공합니다.

NTFS3 journaling 상태
영역상태
Native journal replay현재 지원
Full journaling over JBD향후 과제

현재 구현과 향후 목표를 구분합니다.

Todo list
=========
- Full journaling support over JBD. Currently journal replaying is supported
  which is not necessarily as effective as JBD would be.

References
==========
- Commercial version of the NTFS driver for Linux.
        https://www.paragon-software.com/home/ntfs-linux-professional/

- Direct e-mail address for feedback and requests on the NTFS3 implementation.
        almaz.alexandrovich@paragon-software.com