파일시스템
2011.03.17 16:10

파일시스템의 정의

조회 수 1723 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제

파일 시스템

파일 시스템(file system, 파일체계)은 컴퓨터에서 파일이나 자료를 쉽게 발견 및 접근할 수 있도록 보관 또는 조직하는 체제를 가리키는 말이다.

파일 시스템은 통상 하드 디스크CD-ROM 같은 실제 자료 보관 장치를 사용하여 파일의 물리적 소재를 관리하는 것을 가리키나 네트워크 프로토콜(NFS, SMB, 9P 등)을 수행하는 클라이언트를 통하여 파일 서버 상의 자료로의 접근을 제공하는 방식과 가상의 형태로서 접근 수단만이 존재하는 방식(procfs 등)도 파일 시스템의 범위에 포함될 수 있다. 디렉터리 서비스레지스트리와는 의미가 조금 다르다.

 

구성

하드 디스크 내장 / 파티션 모형

개요

파일 시스템은 일반적으로 크기가 일정한 블록들의 배열(섹터라고도 불리며 통상 512바이트, 1키비바이트, 2키비바이트같은 - 2를 제곱한 수만큼의 크기를 갖는다)에 접근할 수 있는 자료 보관 장치 위에 생성되어 이러한 배열들을 조직함으로 파일이나 디렉터리를 만들며 어느 부분이 파일이고 어느 부분이 공백인지를 구분하기 위하여 각 배열에 표시를 해 둔다. 또한 자료를 '클러스터' 또는 '블록'이라고 불리는 일정한 단위(이것은 각 디스크 배열들에 대한 식별할 수 있는 번호를 제공하는데 통상 1부터 64까지가 쓰인다)에 새겨 넣는데 이것이 바로 파일 하나가 필요로 하는 디스크의 최소 공간이다.

파일 이름

파일에 이름이 존재함은 컴퓨터 메모리 안에서 해당 파일의 소재 위치를 보장하기 위함이다. 파일 시스템 안에서 디렉터리는 통상 파일 이름과 해당 파일을 연결해 주는데 도스FAT유닉스 계열 운영 체제아이노드의 경우 파일 이름을 색인과 연결한다. 디렉터리 구조는 수평형일 수도 있고 수직형(하위 디렉터리 있음)일 수도 있다. 어떤 파일 시스템에서는 파일 이름이 이름, 확장자, 판 수 이런 식으로 특별한 문법을 따르기도 하며 또 어떤 파일 시스템에서는 파일 이름은 그저 문자열 정도로만 취급되고 각 파일마다 어딘가에 메타데이터가 보관된다.

계층

일반적으로 파일 시스템은 '저장 장치 - 입출력 제어 - 기본 파일시스템 - 파일조직 모듈 - 가상 파일시스템'과 같이 여러 개의 계층으로 구성되어 있다. 그렇게 함으로써 하드 디스크, 시디롬 드라이브, 플래시 메모리 등 다양한 형태의 저장 장치를 지원할 수 있고, 하나의 시스템에 여러 개의 파일 시스템을 사용하는 것이 가능해진다.

파일 시스템의 종류

파일 시스템은 크게 디스크, 네트워크, 그리고 특수 용도의 파일 시스템으로 나눌 수 있다.

디스크 파일 시스템

자료 기억 장치, 특히 컴퓨터에 연결된 디스크 드라이브에 파일을 저장하도록 설계된 시스템이다.

보기

데이터베이스 파일 시스템

데이터베이스 기반의 파일 시스템은 최근에 등장한 새로운 개념의 파일 시스템이다. 파일을 계층 구조로 관리하지 않고 파일의 형식, 주제, 만든이, 내용과 같은 여러 특성에 따라 시스템에서 자동으로 분류하여 관리하는 것이다. 따라서 쿼리 언어나 자연어 등으로 파일을 빠르게 찾을 수 있다.

보기

트랜잭션 기반 파일 시스템

트랜잭션 기반 파일 시스템은 파일에 일어난 이벤트나 트랜잭션을 기록하는 시스템이다. 사용자가 수행하는 작업은 여러 개의 파일의 내용을 바꿀 수 있다. 이 바뀐 내용들은 서로 연관되어 있는 경우가 많으므로 이 내용들이 논리적으로 서로 연결되어 있어야 하는 시스템에서는 이 변화들이 동시에 일어난다는 것이 보장되어야 한다. 은행 계좌에서 돈을 이체하는 경우를 예로 들어 보자. 당신이 온라인으로 돈을 이체할 때 은행 컴퓨터는 상대방의 은행 컴퓨터에 "전송" 명령을 보내고 동시에 당신의 계좌에서 같은 금액을 줄일 것이다. 그런데 이때 시스템에 우연히 사고가 일어나 전송 명령이 보내지지 않았다면 상대방의 계좌에 돈은 입금되지 않았는데 당신의 계좌에서는 돈이 사라지는 일이 일어날 수 있다. 트랜잭션 기반 시스템은 이렇게 논리적으로 동시에 수행되어야 하는 작업들을 하나의 "트랜잭션"으로 묶어 만약의 사고가 일어났을 때 양쪽에서 트랜잭션을 다시 수행하여 오류를 막는다. 또한 모든 트랜잭션은 기록으로 남아 어디서 무슨 일이 언제 수행되었는지가 기록된다. 이러한 파일 시스템은 시스템의 오류를 막기 위해 설계되었으며, 느리지만 안전하다고 볼 수 있다.

특수 용도의 파일 시스템

유닉스와 같은 파일 중심의 운영 체제는 여러 가지 특수 용도의 파일 시스템을 사용한다. 예를 들면, 어떤 종류의 유닉스는 '/proc'이라는 파일 시스템에서 프로세스나 운영 체제 여러 기능에 접근할 수 있다.

심우주 탐사선인 보이저 1호2호에는 디지털 테이프 기반의 파일 시스템이 탑재되어 있다. 카시니-하위헌스 호와 같은 현대 우주선들은 실시간 운영 체제를 위한 파일 시스템을 탑재한다. 화성 탐사선들도 실시간 운영 체제를 탑재하고 있는데, 이들의 파일 시스템은 플래시 메모리를 사용한다.

파일 시스템과 운영 체제

대부분의 운영 체제는 파일 시스템을 갖고 있으며, 파일은 현대의 모든 운영 체제의 기본 구성 요소이다. 마이크로컴퓨터의 초창기 운영 체제 도스(곧, 디스크 운영 체제)의 주 목적은 파일 관리였다. 이러한 초창기 운영 체제들은 디스크를 관리하는 시스템을 따로 설계했다. 이러한 운영 체제들은 내부에 단 하나의 파일 시스템만을 지원했다.

유닉스 계열의 파일 시스템

유닉스나 다른 유닉스 계열 운영 체제들은 여러 개의 주변 장치에 각각의 이름을 붙이지만, 그 주변 장치에 존재하는 파일들은 전부 하나의 계층 구조 아래 관리된다. 다시 말하면, 유닉스에서는 하나의 루트 디렉터리가 있고, 운영 체제에서 접근할 수 있는 모든 파일들은 전부 루트 디렉터리 아래의 어느 디렉터리에 들어 있다. 또한, 루트 디렉터리는 어떤 특정한 하드 디스크에 존재할 필요가 없고, 심지어 네트워크 위의 가상 파일 공간을 루트 디렉터리로 삼을 수도 있다.

다른 주변 장치에 있는 파일에 접근하려면, 이 주변 장치의 파일 시스템을 어떤 디렉터리로 놓을 것인지를 운영 체제에게 알려야 한다. 이것을 가리켜 "파일 시스템을 마운트한다"고 일컫는다. 예를 들어, 유닉스에서 시디롬을 읽으려면 시디롬의 파일 시스템을 루트 밑의 /mnt 디렉터리 밑에 나타나게 하는 명령을 내린다. 일반적으로 컴퓨터의 관리자만이 파일 시스템을 마운트할 수 있다.

리눅스의 파일 시스템

솔라리스의 파일 시스템


맥 OSX 10의 파일 시스템

맥 OSX10은 맥OS에서 쓰던 HFS를 개량한 HFS Plus를 사용한다. 많은 메타데이터를 가지며 대소문자를 구분하지 않는다. HFS와 달리 유닉스식 접근 권한 관리 기능이 있으며 나중에는 저널링과 함께 파일 시스템 단편화 관련 여러 알고리즘이 더해졌다.

파일 이름은 255자까지 지을 수 있고 파일 이름을 저장할 때 유니코드를 쓴다. 맥 오에스 텐에서 파일 형식파일 이름의 확장자로 알 수도 있고 메타데이터에 저장된 타입 코드로부터 알 수도 있다.

HFS Plus는 다음의 세 가지 링크를 사용한다.

  • 하드 링크
  • 심볼릭 링크
  • 에일리어스(alias): 파일이 옮겨지거나 이름이 바뀌어도 링크가 깨지지 않는다.

마이크로소프트 윈도의 파일 시스템

마이크로소프트 윈도는 초창기 운영 체제(CP/M-80을 바탕으로 만든 MS-DOS) 기반으로 제작되었지만, 다른 운영 체제(유닉스, OS/2 등)의 파일 시스템과 사용자 인터페이스에서 많은 아이디어를 빌려왔다. 윈도는 FATNTFS를 사용한다. 초창기 FAT 파일 시스템은 파일 이름의 길이에 제한이 있었고, 디스크와 파티션 수에도 마찬가지로 제한이 있었다.

윈도 NT에 탑재되어 함께 출시된 NTFS는 접근 제어 리스트 기반의 권한 설정과 하드 링크, 여러 개의 파일 스트림, 쿼터 추적, 압축, 다른 파일 시스템을 마운트하는 기능 등이 있다.

다른 운영 체제들과는 달리, 드라이브 글자를 사용하여 디스크나 파티션을 구분한다. 예를 들어, C:WINDOWS는 글자 C로 보여지는 파티션 안에 있는 WINDOWS라는 디렉터리임을 뜻한다. C 드라이브는 운영 체제가 설치된 첫 번째 하드 디스크 파티션을 나타내는 글자로 많이 쓰인다. 이것은 MS-DOS 시절, A와 B는 플로피 디스크 드라이브를 가리키고, C 드라이브가 하드 디스크를 가리켰기 때문이다. 이런 전통 때문에, 운영 체제가 설치된 파티션이 C 드라이브라고 가정하는 오래된 프로그램들이 버그를 일으키곤 한다. 네트워크 드라이브 또한 드라이브 글자로 매핑될 수 있다.

?

파일시스템
2011.03.17 13:40

Using EFS

조회 수 1555 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제

Using EFS

User can invoke EFS features through Windows Explorer or by using a command-line utility called cipher.exe. To use Windows Explorer to encrypt file, open File property window by right clicking on file name. Click Advanced... button - Advanced Attributes dialog will be opened allowing you to mark file as encrypted.

Before saving new settings Windows will prompt user to encrypt file only or the whole folder. It address very important issue - while the file itself could be perfectly protected, the application which opens the file may create a temporary copies of the file while working with the document. The example is Microsoft Word. When user opens encrypted document, EFS decrypts it transparently for Word. Then during the work, Word creates temporary hidden file where it automatically saves the document in the process of editing and deletes it on the exit. This hidden file presents a real breach in security because it contains user data in plain (not encrypted) form. Encrypting the whole folder instead of file only solves this problem.

?

파일시스템
2011.03.17 13:34

NTFS 파티션 부트섹터

조회 수 2070 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제

Partition Boot Sector

Figure 5-1 Formatted NTFS Volume

 

Table 5-1 describes the boot sector of a volume formatted with NTFS. When you format an NTFS volume, the format program allocates the first 16 sectors for the $Boot metadata file. First sector, in fact, is a boot sector with a "bootstrap" code and the following 15 sectors are the boot sector's IPL (initial program loader). To increase file system reliability the very last sector an NTFS partition contains a spare copy of the boot sector.

Table 5-1 NTFS Boot Sector

Byte Offset

Field Length

Field Name

0x00

3 bytes

Jump Instruction

0x03

LONGLONG

OEM ID

0x0B

25 bytes

BPB

0x24

48 bytes

Extended BPB

0x54

426 bytes

Bootstrap Code

0x01FE

WORD

End of Sector Marker

On NTFS volumes, the data fields that follow the BPB form an extended BPB. The data in these fields enables Ntldr (NT loader program) to find the master file table (MFT) during startup. On NTFS volumes, the MFT is not located in a predefined sector, as on FAT16 and FAT32 volumes. For this reason, the MFT can be moved if there is a bad sector in its normal location. However, if the data is corrupted, the MFT cannot be located, and Windows NT/2000 assumes that the volume has not been formatted.

The following example illustrates the boot sector of an NTFS volume formatted while running Windows 2000. The printout is formatted in three sections:

  • Bytes 0x00- 0x0A are the jump instruction and the OEM ID (shown in bold print).
  • Bytes 0x0B-0x53 are the BPB and the extended BPB.
  • The remaining code is the bootstrap code and the end of sector marker (shown in bold print).
Physical Sector:Cyl 0, Side 1, Sector 1 
      00000000:EB 52 90 4E 54 46 53 20 -20 20 20 00 02 08 00 00 .R.NTFS ........ 
      00000010:00 00 00 00 00 F8 00 00 -3F 00 FF 00 3F 00 00 00 ........?...?... 
      00000020:00 00 00 00 80 00 80 00 -4A F5 7F 00 00 00 00 00 ........J....... 
      00000030:04 00 00 00 00 00 00 00 -54 FF 07 00 00 00 00 00 ........T....... 
      00000040:F6 00 00 00 01 00 00 00 -14 A5 1B 74 C9 1B 74 1C ...........t..t. 
      00000050:00 00 00 00 FA 33 C0 8E -D0 BC 00 7C FB B8 C0 07 .....3.....|.... 
      00000060:8E D8 E8 16 00 B8 00 0D -8E C0 33 DB C6 06 0E 00 ..........3..... 
      00000070:10 E8 53 00 68 00 0D 68 -6A 02 CB 8A 16 24 00 B4 ..S.h..hj....$.. 
      00000080:08 CD 13 73 05 B9 FF FF -8A F1 66 0F B6 C6 40 66 ...s......f...@f 
      00000090:0F B6 D1 80 E2 3F F7 E2 -86 CD C0 ED 06 41 66 0F .....?.......Af. 
      000000A0:B7 C9 66 F7 E1 66 A3 20 -00 C3 B4 41 BB AA 55 8A ..f..f....A..U. 
      000000B0:16 24 00 CD 13 72 0F 81 -FB 55 AA 75 09 F6 C1 01 .$...r...U.u.... 
      000000C0:74 04 FE 06 14 00 C3 66 -60 1E 06 66 A1 10 00 66 t......f`..f...f 
      000000D0:03 06 1C 00 66 3B 06 20 -00 0F 82 3A 00 1E 66 6A ....f;....:..fj 
      000000E0:00 66 50 06 53 66 68 10 -00 01 00 80 3E 14 00 00 .fP.Sfh.....>... 
      000000F0:0F 85 0C 00 E8 B3 FF 80 -3E 14 00 00 0F 84 61 00 ........>.....a. 
      00000100:B4 42 8A 16 24 00 16 1F -8B F4 CD 13 66 58 5B 07 .B..$......fX [.. 
      00000110:66 58 66 58 1F EB 2D 66 -33 D2 66 0F B7 0E 18 00 fXfX.-f3.f...... 
      00000120:66 F7 F1 FE C2 8A CA 66 -8B D0 66 C1 EA 10 F7 36 f......f..f....6
      00000130:1A 00 86 D6 8A 16 24 00 -8A E8 C0 E4 06 0A CC B8 ......$......... 
      00000140:01 02 CD 13 0F 82 19 00 -8C C0 05 20 00 8E C0 66 ..............f 
      00000150:FF 06 10 00 FF 0E 0E 00 -0F 85 6F FF 07 1F 66 61 ..........o...fa 
      00000160:C3 A0 F8 01 E8 09 00 A0 -FB 01 E8 03 00 FB EB FE ................ 
      00000170:B4 01 8B F0 AC 3C 00 74 -09 B4 0E BB 07 00 CD 10 .....<.t........ 
      00000180:EB F2 C3 0D 0A 41 20 64 -69 73 6B 20 72 65 61 64 .....A disk read 
      00000190:20 65 72 72 6F 72 20 6F -63 63 75 72 72 65 64 00 error occurred. 
      000001A0:0D 0A 4E 54 4C 44 52 20 -69 73 20 6D 69 73 73 69 ..NTLDR is missi 
      000001B0:6E 67 00 0D 0A 4E 54 4C -44 52 20 69 73 20 63 6F ng...NTLDR is co 
      000001C0:6D 70 72 65 73 73 65 64 -00 0D 0A 50 72 65 73 73 mpressed...Press 
      000001D0:20 43 74 72 6C 2B 41 6C -74 2B 44 65 6C 20 74 6F Ctrl+Alt+Del to 
      000001E0:20 72 65 73 74 61 72 74 -0D 0A 00 00 00 00 00 00 restart........
      000001F0:00 00 00 00 00 00 00 00 -83 A0 B3 C9 00 00 55 AA ..............U. 

The following table describes the fields in the BPB and the extended BPB on NTFS volumes. The fields starting at 0x0B, 0x0D, 0x15, 0x18, 0x1A, and 0x1C match those on FAT16 and FAT32 volumes. The sample values correspond to the data in this example.

Byte Offset

Field Length

Sample Value

Field Name

0x0B

WORD

0x0002

Bytes Per Sector

0x0D

BYTE

0x08

Sectors Per Cluster

0x0E

WORD

0x0000

Reserved Sectors

0x10

3 BYTES

0x000000

always 0

0x13

WORD

0x0000

not used by NTFS

0x15

BYTE

0xF8

Media Descriptor

0x16

WORD

0x0000

always 0

0x18

WORD

0x3F00

Sectors Per Track

0x1A

WORD

0xFF00

Number Of Heads

0x1C

DWORD

0x3F000000

Hidden Sectors

0x20

DWORD

0x00000000

not used by NTFS

0x24

DWORD

0x80008000

not used by NTFS

0x28

LONGLONG

0x4AF57F0000000000

Total Sectors

0x30

LONGLONG

0x0400000000000000

Logical Cluster Number for the file $MFT

0x38

LONGLONG

0x54FF070000000000

Logical Cluster Number for the file $MFTMirr

0x40

DWORD

0xF6000000

Clusters Per File Record Segment

0x44

DWORD

0x01000000

Clusters Per Index Block

0x48

LONGLONG

0x14A51B74C91B741C

Volume Serial Number

0x50

DWORD

0x00000000

Checksum

Protecting the Boot Sector

Because a normally functioning system relies on the boot sector to access a volume, it is highly recommended that you run disk scanning tools such as Chkdsk regularly, as well as back up all of your data files to protect against data loss if you lose access to a volume.

?

파일시스템
2011.03.17 13:37

NTFS 시스템 파일

조회 수 1558 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제

NTFS System Files

NTFS includes several system files, all of which are hidden from view on the NTFS volume. A system file is one used by the file system to store its metadata and to implement the file system. System files are placed on the volume by the Format utility.

Table 5-4 Metadata Stored in the Master File Table

System File

File Name

MFT Record

Purpose of the File

Master file table

$Mft

0

Contains one base file record for each file and folder on an NTFS volume. If the allocation information for a file or folder is too large to fit within a single record, other file records are allocated as well.

Master file table 2

$MftMirr

1

A duplicate image of the first four records of the MFT. This file guarantees access to the MFT in case of a single-sector failure.

Log file

$LogFile

2

Contains a list of transaction steps used for NTFS recoverability. Log file size depends on the volume size and can be as large as 4 MB. It is used by Windows NT/2000 to restore consistency to NTFS after a system failure.

Volume

$Volume

3

Contains information about the volume, such as the volume label and the volume version.

Attribute definitions

$AttrDef

4

A table of attribute names, numbers, and descriptions.

Root file name index

$

5

The root folder.

Cluster bitmap

$Bitmap

6

A representation of the volume showing which clusters are in use.

Boot sector

$Boot

7

Includes the BPB used to mount the volume and additional bootstrap loader code used if the volume is bootable.

Bad cluster file

$BadClus

8

Contains bad clusters for the volume.

Security file

$Secure

9

Contains unique security descriptors for all files within a volume.

Upcase table

$Upcase

10

Converts lowercase characters to matching Unicode uppercase characters.

NTFS extension file

$Extend

11

Used for various optional extensions such as quotas, reparse point data, and object identifiers.

   

12-15

Reserved for future use.

Quota management file

$Quota

24

Contains user assigned quota limits on the volume space.

Object Id file

$ObjId

25

Contains file object IDs.

Reparse point file

$Reparse

26

This file contains information about files and folders on the volume include reparse point data

 

?

파일시스템
2011.03.17 13:31

NTFS 기초

조회 수 1083 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제

NTFS 파일시스템은 FAT파일시스템에 비해 보다 나은 퍼포먼스, 신뢰성, 및 호환성을 제공합니다.

NTFS 파일시스템은 빠른 검색, 읽기, 쓰기을 제공하기 위해 설계된 파일시스템입니다. 또한 대용량 하드디스크에 대한 파일시세틈 복구기능을 제공합니다.

NTFS 파일시스템으로 포맷하는 경우 여러 메타데이타파일(MFT - Master File Table, $Bitmap, $LogFile )들이 생성됩니다. 이러한 메타데이타파일은 NTFS 볼륨의 파일이나 폴더들에 대한 정보가 저장됩니다.

The first information on an NTFS 볼륨의 첫번째 정보는 파티션 부트섹터 ($Boot metadata file) 입니다.

파티션 부트섹터는 sector 0 에 위치하며 16 sectors 의 크기로 확장될수 있습니다.

부트섹터는 기본 NTFS 볼륨정보 및 $MFT의 위치 정보가 저장됩니다.

 

다음은 디스크를 NTFS 볼륨으로 포맷했을 때 레이아웃입니다.

 

※ 포맷된 NTFS 볼륨

?

파일시스템
2011.03.17 13:46

NTFS vs FAT

조회 수 4181 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제

NTFS vs FAT


Criteria

NTFS5

NTFS

exFAT

FAT32

FAT16

FAT12

Operating System

Windows 2000
Windows XP
Windows 2003 Server
Windows 2008
Windows Vista
Windows 7

Windows NT
Windows 2000
Windows XP
Windows 2003 Server
Windows 2008Windows Vista
Windows 7

Windows CE 6.0
Windows Vista SP1
Windows 7
WinXP+KB955704  

DOS v7 and higher
Windows 98
Windows ME
Windows 2000
Windows XP
Windows 2003 Server
Windows Vista
Windows 7

DOS
All versions of
Microsoft Windows

DOS
All versions of
Microsoft Windows

 

Limitations

Max Volume Size

264 clusters minus 1 cluster

232 clusters minus 1 cluster

128PB

32GB for all OS.
2TB for some OS

2GB for all OS.
4GB for some OS

16MB

Max Files on Volume

4,294,967,295 (232-1)

4,294,967,295 (232-1)

Nearly Unlimited

4194304

65536

Max File Size

264 bytes (16 ExaBytes)
minus 1KB

244 bytes (16 TeraBytes)
minus 64KB

16EB

4GB minus 2 Bytes

2GB (Limit Only
by Volume Size)

16MB (Limit Only
by Volume Size)

Max Clusters Number

264 clusters minus 1 cluster

232 clusters minus 1 cluster

4294967295

4177918

65520

4080

Max File Name Length

Up to 255

Up to 255

Up to 255

Up to 255

Standard - 8.3
Extended - up to 255

Up to 254

 

File System Features

Unicode File Names

Unicode
 Character Set

Unicode
 Character Set

Unicode
 Character Set

System
 Character Set

System
 Character Set

System
 Character Set

System Records Mirror

MFT Mirror File

MFT Mirror File

No

Second Copy of  FAT

Second Copy of  FAT

Second Copy of  FAT

Boot Sector Location

First and Last Sectors

First and Last Sectors

Sectors 0 to 11
Copy in 12 to 23

First Sector and
Copy in Sector #6

First Sector

First Sector

File Attributes

Standard and Custom

Standard and Custom

Standard Set

Standard Set

Standard Set

Standard Set

Alternate Streams

Yes

Yes

No

No

No

No

Compression

Yes

Yes

No

No

No

No

Encryption

Yes

No

No

No

No

No

Object Permissions

Yes

Yes

Yes

No

No

No

Disk Quotas

Yes

No

No

No

No

No

Sparse Files

Yes

No

No

No

No

No

Reparse Points

Yes

No

No

No

No

No

Volume Mount Points

Yes

No

No

No

No

No

 

Overall Performance

Built-In Security

Yes

Yes

Yes
minimal ACL only

No

No

No

Recoverability

Yes

Yes

Yes
if TFAT activated

No

No

No

Performance

Low on small volumes
High on Large

Low on small volumes
High on Large

High

High on small volumes
Low on large

Highest on small volumes
Low on large

High

Disk Space Economy

Max

Max

Max

Average

Minimal on large volumes

Max

Fault Tolerance

Max

Max

Yes
if TFAT activated

Minimal

Average

Average

?

파일시스템
2011.03.17 13:43

NTFS Sparse Files (NTFS5 only)

조회 수 1657 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제

NTFS Sparse Files (NTFS5 only)

A sparse file has an attribute that causes the I/O subsystem to allocate only meaningful (nonzero) data. Nonzero data is allocated on disk, and non-meaningful data (large strings of data composed of zeros) is not. When a sparse file is read, allocated data is returned as it was stored; non-allocated data is returned, by default, as zeros.

NTFS deallocates sparse data streams and only maintains other data as allocated. When a program accesses a sparse file, the file system yields allocated data as actual data and deallocated data as zeros.

NTFS includes full sparse file support for both compressed and uncompressed files. NTFS handles read operations on sparse files by returning allocated data and sparse data. It is possible to read a sparse file as allocated data and a range of data without retrieving the entire data set, although NTFS returns the entire data set by default.

With the sparse file attribute set, the file system can deallocate data from anywhere in the file and, when an application calls, yield the zero data by range instead of storing and returning the actual data. File system application programming interfaces (APIs) allow for the file to be copied or backed as actual bits and sparse stream ranges. The net result is efficient file system storage and access. Next figure shows how data is stored with and without the sparse file attribute set.

Figure 5-4 Windows 2000 Data Storage

Important
If you copy or move a sparse file to a FAT or a non-NTFS volume, the file is built to its originally specified size. If the required space is not available, the operation does not complete.

?

파일시스템
2011.03.17 13:48

NTFS Optimization

조회 수 9386 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제

NTFS Optimization

If you investigate your storage needs, you can tune some of global NTFS parameters to achieve significant increase of disk performance. Other techniques like disk defragmentation could help you either.

There are several factors (we do not mention here drive type, rpm ...) that affect the NTFS Performance: Cluster Size, location and fragmentation of Master File Table (MFT) and paging file, NTFS Volume compression, NTFS Volume Source (created or converted from existing FAT volume).

 

Define Cluster Size Properly

Cluster is an allocation unit. If you create file lets say 1 byte in size, at least one cluster should be allocated on FAT file system. On NTFS if file is small enough, it can be stored in MFT record itself without using additional clusters. When file grows beyond the cluster boundary, another cluster is allocated. It means that the bigger the cluster size, the more disk space is wasted, however, the performance is better.

The following table shows the default values that Windows NT/2000/XP uses for NTFS formatting:

Drive size                   
   (logical volume)             Cluster size          Sectors
   ----------------------------------------------------------
     512 MB or less               512 bytes           1
     513 MB - 1,024 MB (1 GB)   1,024 bytes (1 KB)    2
   1,025 MB - 2,048 MB (2 GB)   2,048 bytes (2 KB)    4
   2,049 MB and larger          4,096 bytes (4 KB)    8

However, when you format the partition manually, you can specify cluster size 512 bytes, 1 KB, 2 KB, 4 KB, 8 KB, 16 KB, 32 KB, 64 KB in the format dialog box or as a parameter to the command line FORMAT utility.

What it gives us? Determine average file size and format the partition accordingly. How to determine? The simplest (but rough) way is to divide number of files on the drive by total disk usage in kilobytes. Another idea is to estimate the approximate data size in advance before formatting the hard drive. If you are going to store multimedia stuff that is usually huge in size, make cluster bigger to increase a performance. If you plan to store small web pages or text documents, make cluster size smaller not to lose a lot of disk space. Think!

Note: On Volumes, having cluster size more than 4 KB compression is not supported

 

MFT Reservation and Fragmentation

MFT contains frequently used system files and indexes, so performance of MFT affects a lot to the entire volume performance.

By default NTFS reserves zone, 12.5% of volume size for MFT and does not allow writing there any user's data, which lets MFT to grow. However, when, for example, a lot of files are placed to the drive, MFT can grow beyond the reserved zone and becomes fragmented. Another reason is when you delete file, NTFS does not always use its space in MFT to store new one, it just marks MFT entry as deleted and allocates new entry  for the new file. It provides some performance and recovery benefits, however it forces MFT  to be fragmented.

The more MFT fragmentation, the more the HDD heads movements to access the data, the less overall performance of file system.

Starting from Windows NT 4.0 SP4 you can define MFT Zone Reservation value through the Registry.
Key: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlFileSystem
Value NtfsMftZoneReservation of DWORD type (1 to 4) allows you to specify MFT Zone for the newly created/formatted volumes(12.5 percent, 25 percent, 37.5 percent, 50 percent of NTFS volume accordingly)

 

File and Directory Fragmentation

Not only MFT but also other files and directories can be fragmented when drive becomes full and you perform lots of copying and deleting actions with files. It also slows down system performance, so using standard Defragmentation Tools regularly is advisable when you perform a lot of copy/move/delete operations on the volume. Starting from Windows 2000, Disk Defragmenter is a part of Operating System and you can find it in Computer Management console.

If you do not have such tools, you can try doing it manually. Just copy files and folders to another partition, leaving original one nearly empty, and then copy them back. This solution is less effective than using standard Defragmentation Toools, however, it could greatly improve the volume performance in case if your partition was heavily fragmented.
Note: It's not an acceptable solution if you have security/permissions setup on these files. While copying between partitions you'll loose this information.

To prevent directory fragmentation, just perform complete drive defragmentation before installing new applications or copying lots of files onto the volume.

 

Paging File Fragmentation

You cannot use standard Defragmentation Tools to defragment Paging File (PAGEFILE.SYS) because it's being constantly used by Operating System for virtual memory storage. However, you still can do it manually. Just change it's location to another drive (or decrease it's size to minimal value if you do not have another drive), re-boot machine, perform volume Defragmentation, and change parameters of Paging File back to the original state. That's it!

 

Compression on NTFS Volumes

Compression could save some space on your volume and could increase or decrease your overall performance depending on CPU speed, Volume Size, and Compressible Data. If you have fast CPU and relatively slow HDD, compression is recommended because compressed data takes less size on volume and will be read and decompressed in the memory much faster than reading the whole uncompressed block from the slow drive. The larger the volume (> 8Gb), the lesser its performance if compressed. And, for sure, there is no use of compressing the Volume or folder containing uncompressible data, such as JPG images, ZIP files, etc... Ideal data for the compression are text and office documents, bitmap images and other files consisting of lots of repeating characters.

To compress the file/folder/volume - just go to its properties in Windows Explorer and mark Compressed checkbox.

 

Conversion volume from FAT to NTFS

If you did not setup Windows on the newly created NTFS Volume, but converted volume from FAT to NTFS, usually it causes MFT fragmentation so generally converted partitions are much slower than the ones being originally created as NTFS. Defragmentation tools are in general unable to defragment MFT, however, you can try to backup the whole system, re-format the volume with proper cluster size, and restore it back.

 

Unnecessary Access Updates

NTFS automatically updates the last access time and date stamp on folders and files when NTFS traverses its B-tree folder structure. To enhance NTFS performance you can disable this behavior and reduce NTFS's operational overhead without significantly impairing functionality. In the HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlFileSystem Registry key, change the NtfsDisableLastAccessUpdate value of type REG_DWORD from the default value 0 (enabled) to 1 (disabled). This Registry value doesn't exist by default, so you need to enter it manually.

Outdated DOS 8.3 Name creation

You can increase NTFS performance if you disable DOS 8.3 name creation. In the HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlFileSystem Registry key, change the NtfsDisable8dot3NameCreation value of type REG_DWORD from the defaoult value 0 (enabled) to 1 (disabled).

 

Recommended Reading:

HOW TO: Defragment Your Disk Drive Volumes in Windows XP (Q314848):
http://support.microsoft.com/kb/314848

Description of the New Command Line Defrag.exe Included with Windows XP:
http://support.microsoft.com/kb/283080

The Default Cluster Size for the NTFS and FAT File Systems (Q314878) :
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q314878

How NTFS Reserves Space for its Master File Table (MFT) (Q174619)
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q174619

Optimizing NTFS
http://technet.microsoft.com/en-us/library/cc767961.aspx

How to Disable the 8.3 Name Creation on NTFS Partitions
http://support.microsoft.com/kb/121007

?

파일시스템
2011.03.17 13:38

NTFS Multiple Data Streams

조회 수 1387 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제

NTFS Multiple Data Streams

NTFS supports multiple data streams, where the stream name identifies a new data attribute on the file. A handle can be opened to each data stream. A data stream, then, is a unique set of file attributes. Streams have separate opportunistic locks, file locks, and sizes, but common permissions.

This feature enables you to manage data as a single unit. The following is an example of an alternate stream:

myfile.dat:stream2	

A library of files might exist where the files are defined as alternate streams, as in the following example:

library:file1
:file2
:file3

A file can be associated with more than one application at a time, such as Microsoft® Word and Microsoft® WordPad. For instance, a file structure like the following illustrates file association, but not multiple files:

program:source_file
           :doc_file
           :object_file
           :executable_file

 

To create an alternate data stream, at the command prompt, you can type commands such as:

echo text>program:source_file
    more<program:source_file 

Important
When you copy an NTFS file to a FAT volume, such as a floppy disk, data streams and other attributes not supported by FAT are lost.

?

파일시스템
2011.03.17 13:35

NTFS MFT 분석

조회 수 1432 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제

NTFS Master File Table (MFT)

Each file on an NTFS volume is represented by a record in a special file called the master file table (MFT). NTFS reserves the first 16 records of the table for special information. The first record of this table describes the master file table itself, followed by a MFT mirror record. If the first MFT record is corrupted, NTFS reads the second record to find the MFT mirror file, whose first record is identical to the first record of the MFT. The locations of the data segments for both the MFT and MFT mirror file are recorded in the boot sector.

Full list of metadata files are presented in the "System Files" chapter.

Figure provides a simplified illustration of the MFT structure:

Figure 5-2 MFT Structure

The master file table allocates a certain amount of space for each file record. The attributes of a file are written to the allocated space in the MFT. Small files and directories (typically 512 bytes or smaller), such as the file illustrated in next figure, can entirely be contained within the master file table record.

Figure 5-2 MFT Record for a Small File or Directory:

This design makes file access very fast. Consider, for example, the FAT file system, which uses a file allocation table to list the names and addresses of each file. FAT directory entries contain an index into the file allocation table. When you want to view a file, FAT first reads the file allocation table and assures that it exists. Then FAT retrieves the file by searching the chain of allocation units assigned to the file. With NTFS, as soon as you look up the file, it's there for you to use.

Directory records are housed within the master file table just like file records. Instead of data, directories contain index information. Small directory records reside entirely within the MFT structure. Large directories are organized into B-trees, having records with pointers to external clusters containing directory entries that could not be contained within the MFT structure.

?

파일시스템
2011.03.17 13:39

NTFS Compressed Files

조회 수 1478 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제

NTFS Compressed Files

Windows NT/2000 supports compression on individual files, folders, and entire NTFS volumes. Files compressed on an NTFS volume can be read and written by any Windows-based application without first being decompressed by another program.

Decompression occurs automatically when the file is read. The file is compressed again when it is closed or saved. Compressed files and folders have an attribute of C when viewed in Windows Explorer.

Only NTFS can read the compressed form of the data. When an application such as Microsoft® Word or an operating system command such as copy requests access to the file, the compression filter driver decompresses the file before making it available. For example, if you copy a compressed file from another Windows NT/2000-based computer to a compressed folder on your hard disk, the file is decompressed when read, copied, and then recompressed when saved.

NTFS allows for the compression of an entire volume, of one or more folders within a volume, or even one or more files within a folder of an NTFS volume.

The compression algorithms in NTFS are designed to support cluster sizes of up to 4 KB. When the cluster size is greater than 4 KB on an NTFS volume, none of the NTFS compression functions are available.

Each NTFS data stream contains information that indicates whether any part of the stream is compressed.

NTFS provides real-time access to a compressed file, decompressing the file when it is opened and compressing it when it is closed. When writing a compressed file, the system reserves disk space for the uncompressed size. The system gets back unused space as each individual compression buffer is compressed.

?

파일시스템
2011.03.17 13:36

NTFS 파일속성

조회 수 1311 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제

NTFS File Attributes

The NTFS file system views each file (or folder) as a set of file attributes. Elements such as the file's name, its security information, and even its data, are all file attributes. Each attribute is identified by an attribute type code and, optionally, an attribute name.

When a file's attributes can fit within the MFT file record, they are called resident attributes. For example, information such as filename and time stamp are always included in the MFT file record. When all of the information for a file is too large to fit in the MFT file record, some of its attributes are nonresident. The nonresident attributes are allocated one or more clusters of disk space elsewhere in the volume. If all attributes can not fit into one MFT record NTFS creates additional MFST records and puts the Attribute List attribute to the first file's MFT record to describe the location of all of the attribute records.

Table 5-3 lists all of the file attributes currently defined by the NTFS file system. This list is extensible, meaning that other file attributes can be defined in the future.

Table 5-3 File Attributes Defined by NTFS

Attribute Type

Description

Standard Information

Includes information such as timestamp and link count.

Attribute List

Lists the location of all attribute records that do not fit in the MFT record.

File Name

A repeatable attribute for both long and short file names. The long name of the file can be up to 255 Unicode characters. The short name is the 8.3, case-insensitive name for the file. Additional names, or hard links, required by POSIX can be included as additional file name attributes.

Security Descriptor

Describes who owns the file and who can access it.

Data

Contains file data. NTFS allows multiple data attributes per file. Each file typically has one unnamed data attribute. A file can also have one or more named data attributes, each using a particular syntax.

Object ID

A volume-unique file identifier. Used by the distributed link tracking service. Not all files have object identifiers.

Logged Utility Stream

Similar to a data stream, but operations are logged to the NTFS log file just like NTFS metadata changes. This is used by EFS.

Reparse Point

Used for volume mount points. They are also used by Installable File System (IFS) filter drivers to mark certain files as special to that driver.

Index Root

Used to implement folders and other indexes.

Index Allocation

Used to implement folders and other indexes.

Bitmap

Used to implement folders and other indexes.

Volume Information

Used only in the $Volume system file. Contains the volume version.

Volume Name

Used only in the $Volume system file. Contains the volume label.

 

?

파일시스템
2011.03.17 13:42

Issues with EFS

조회 수 1473 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제

Issues with EFS

Temporary file is not erased. When EFS encrypts file, it copies its contents into temporary hidden file named Efs0.tmp in the same folder, as encrypting file. Then, it encrypts plain text by blocks and writes encrypted data into original file. After the process is done, temporary file is deleted. The problem is that EFS simply marks it as deleted without actually erasing its contents, which makes possible easy access to unprotected data by low-level data recovery software like Active@ Undelete. Solution - to wipe free disk space. Usually, even if plain text overwritten ones, small magnetic traces remain detectible, thus giving a chance to read erased data with proper equipment. To minimize this possibility, use commercially available software providing sophisticated data erasing algorithms like Active@ Eraser or ZDelete.NET or wipe unused volume and MFT space with Active@ KillDisk.

File names in encrypted folder are not protected. Actually, encrypting folder contents means automatically applying encryption to all files in the folder, not encrypting directory data itself. Since the file name itself could contain sensitive information, it could be a breach in security. One of the solutions would be using encrypted .zip archives instead of folders, which are treated by Windows XP almost like folders. Thus, only one file is needed to be encrypted and archived data themselves are harder to crack.

EFS security relies on public/private key pair which is stored on local computer. Windows protects all private keys by encrypting them through Protected Storage service. Protected Storage encrypts all private keys with Session Key, derived from 512 bit Master Key, and stores them in %User Profile%Application DataMicrosoftCryptoRSAUser SID. The Master Key is encrypted by Master Key Encryption Key, which is derived from user password by using a Password Based Key Derivation Function and stored in %User Profile%Application DataMicrosoftProtectUser SID. Despite the efforts Windows takes to protect keys, the fact, that all information is stored on local computer, gives an attacker, who's got an access to hard drive, a chance to figure out keys and use them to decrypt protected data. The overall security could be significantly enhanced by encrypting private keys with System Key. The syskey.exe utility can be used to store System Key on a floppy disk and remove it from computer. In this case user must insert a diskette with System Key when computer boots up. Nevertheless, this method should be taken with precautions since if key diskette is lost, there's no way to get access to computer.

?

파일시스템
2011.03.19 12:45

hfs+ 개요

조회 수 172905 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제

HFS Plus

 
HFS+
Developer Apple
Full name Hierarchical File System Plus
Introduced January 19, 1998 (Mac OS 8.1)
Partition identifier Apple_HFS (Apple Partition Map)
0xAF (MBR)
Apple_HFSX (Apple Partition Map) when HFSX
48465300-0000-11AA-
AA11-00306543ECAC
(GPT)
Structures
Directory contents B-tree
File allocation Bitmap
Bad blocks B-tree
Limits
Max file size 8 EiB[1]
Max number of files 4,294,967,295 (232-1)
Max filename length 255 characters (255 UTF-16 encoding units, normalized to Apple-modified variant of Unicode Normalization Format D)
Max volume size 8 EiB [2]
Allowed characters in filenames Unicode, any character, including NUL. OS APIs may limit some characters for legacy reasons
Features
Dates recorded access, attributes modified, backed up, contents modified, created
Date range January 1, 1904 - February 6, 2040
Date resolution 1 s
Forks Yes
Attributes Color (3 bits, all other flags 1 bit), locked, custom icon, bundle, invisible, alias, system, stationery, inited, no INIT resources, shared, desktop
File system permissions Unix permissions, NFSv4 ACLs (Mac OS X v10.4 onward)
Transparent compression Yes (on Mac OS X 10.6 and higher)
Transparent encryption No, although per-home directory AES using HFS+ formatted .dmg volumes is possible using FileVault in Mac OS X v10.3 onward
Supported operating systems Mac OS 8.1, Mac OS 9, Mac OS X, & Darwin, Linux, Microsoft Windows (through MacDrive or Bootcamp[citation needed] IFS drivers)

HFS Plus or HFS+ is a file system developed by Apple Inc. to replace their Hierarchical File System (HFS) as the primary file system used in Macintosh computers (or other systems running Mac OS). It is also one of the formats used by the iPod digital music player. HFS Plus is also referred to as Mac OS Extended (or, erroneously, “HFS Extended”), where its predecessor, HFS, is also referred to as Mac OS Standard (or, erroneously, as “HFS Standard”). During development, Apple referred to this filesystem with the codename Sequoia.[3]

HFS Plus is an improved version of HFS, supporting much larger files (block addresses are 32-bit length instead of 16-bit) and using Unicode (instead of Mac OS Roman or any of several other character sets) for naming the items (files, folders) – names which are also character encoded in UTF-16[verification needed] and normalized to a form very nearly the same as Unicode Normalization Form D (NFD)[4] (which means that precomposed characters like are decomposed in the HFS+ filename and therefore count as two characters[5] and UTF-16 implies that characters from outside the Basic Multilingual Plane — often seldom used and characters from ancient writing systems — also count as two characters in an HFS+ filename). HFS Plus permits filenames up to 255 UTF-16 characters in length, and n-forked files similar to NTFS, though until recently, almost no software takes advantage of forks other than the data fork and resource fork. HFS Plus also uses a full 32-bit allocation mapping table, rather than HFS’s 16 bits. This was a serious limitation of HFS, meaning that no disk could support more than 65,536 allocation blocks under HFS. When disks were small, this was of little consequence, but as larger-capacity drives became available, it meant that the smallest amount of space that any file could occupy (a single allocation block) became excessively large, wasting significant amounts of space. For example, on a 1 GB disk, the allocation block size under HFS is 16 KB, so even a 1 byte file would take up 16 KB of disk space. Unlike most other file systems HFS Plus supports hard links to directories.

Like HFS, HFS Plus uses B-trees to store most volume metadata.

Contents

[hide]

History

HFS+ was introduced with the January 19, 1998 release of Mac OS 8.1.[1] However its first appearance, as a beta filesystem, was in the never-released Copland OS betas.

With the release of the 10.2.2 update on November 11, 2002, Apple added optional journaling features to HFS Plus for improved data reliability. These features were easily accessible in Mac OS X Server, but only accessible through the command line in the standard desktop client.[6] With Mac OS X v10.3, all HFS Plus volumes on all Macs are set to be journaled by default. Within the system, an HFS Plus volume with a journal is identified as HFSJ.

10.3 also introduced another version of HFS Plus called HFSX. HFSX volumes are almost identical to HFS Plus volumes, except that they are never surrounded by the HFS Wrapper that is typical of HFS Plus volumes and they optionally support case sensitivity for file and folder names. HFSX volumes can be recognized by two entries in the Volume Header, a value of HX in the signature field and 5 in the version field.[1]

Additionally, Mac OS X 10.3 marked Apple's adoption of Unicode 3.2 decomposition, superseding the Unicode 2.1 decomposition used previously. This change has caused problems for developers writing software for Mac OS X.[7]

With 10.4, Apple added support for Inline Attribute Data records, something that had been a part of the Mac OS X implementation of HFS Plus since at least 10.0, but always marked as "reserved for future use".[8] Until the release of Mac OS X Server 10.4, HFS Plus supported only the standard UNIX file system permissions, however 10.4 introduced support for access control list-based file security, which provides a richer mechanism to define file permissions and is also designed to be fully compatible with the file permission models on other platforms such as Microsoft Windows XP and Windows Server 2003.[9]

Design

HFS Plus volumes are divided into sectors (called logical blocks in HFS), that are usually 512 bytes in size. These sectors are then grouped together into allocation blocks which can contain one or more sectors; the number of allocation blocks depends on the total size of the volume. HFS Plus uses a larger value to address allocation blocks than HFS, 32 bits rather than 16 bits; this means it can access 4,294,967,296 (= 232) allocation blocks rather than the 65,536 (= 216) allocation blocks available to HFS.[1]

Formerly, HFS Plus volumes were embedded inside an HFS standard filesystem. This was phased out by the Tiger transition to Intel Macs, where the HFS Plus filesystem was not embedded inside a wrapper. The wrapper was designed for two purposes; it allowed Macintosh computers without HFS Plus support in their ROM to boot HFS Plus volumes and it also was designed to help users transition to HFS Plus by including a minimal HFS volume with a read-only file called Where_have_all_my_files_gone?, explaining to users with versions of Mac OS 8.0 and earlier without HFS Plus, that the volume requires a system with HFS Plus support. The original HFS volume contains a signature and an offset to the embedded HFS Plus volume within its volume header. All allocation blocks in the HFS volume which contain the embedded volume are mapped out of the HFS allocation file as bad blocks.[1]

There are nine structures that make up a typical HFS Plus volume:[1]

  1. Sectors 0 and 1 of the volume are HFS boot blocks. These are identical to the boot blocks in an HFS volume. They are part of the HFS wrapper.
  2. Sector 2 contains the Volume Header equivalent to the Master Directory Block in an HFS volume. The Volume Header stores a wide variety of data about the volume itself, for example the size of allocation blocks, a timestamp that indicates when the volume was created or the location of other volume structures such as the Catalog File or Extent Overflow File. The Volume Header is always located in the same place.
  3. The Allocation File which keeps track of which allocation blocks are free and which are in use. It is similar to the Volume Bitmap in HFS, in which each allocation block is represented by one bit. A zero means the block is free and a one means the block is in use. The main difference with the HFS Volume Bitmap, is that the Allocation File is stored as a regular file, it does not occupy a special reserved space near the beginning of the volume. The Allocation File can also change size and does not have to be stored contiguously within a volume.
  4. The Catalog File is a B-tree that contains records for all the files and directories stored in the volume. The HFS Plus Catalog File is very similar to the HFS Catalog File, the main differences being records are larger to allow more fields and to allow for those fields to be larger (for example to allow the longer 255-character unicode file names in HFS Plus). A record in the HFS Catalog File is 512 bytes in size, a record in the HFS Plus Catalog File is 4 KB in Mac OS and 8 KB in Mac OS X. Fields in HFS are of fixed size, in HFS Plus the size can vary depending on the actual size of the data they store.
  5. The Extents Overflow File is another B-tree that records the allocation blocks that are allocated to each file as extents. Each file record in the Catalog File is capable of recording eight extents for each fork of a file; once those are used extents are recorded in the Extents Overflow File. Bad blocks are also recorded as extents in the Extents Overflow File. The default size of an extent record in Mac OS is 1 KB and 4 KB in Mac OS X.
  6. The Attributes File is a new B-tree in HFS Plus that does not have a corresponding structure in HFS. The Attributes File can store three different types of 4 KB records: Inline Data Attribute records, Fork Data Attribute records and Extension Attribute records. Inline Data Attribute records store small attributes that can fit within the record itself. Fork Data Attribute records contain references to a maximum of eight extents that can hold larger attributes. Extension Attributes are used to extend a Fork Data Attribute record when its eight extent records are already used.
  7. The Startup File is designed for non-Mac OS systems that don't have HFS or HFS Plus support. It is similar to the Boot Blocks of an HFS volume.
  8. The second to last sector contains the Alternate Volume Header equivalent to the Alternate Master Directory Block of HFS.
  9. The last sector in the volume is reserved for use by Apple. It is used during the computer manufacturing process.

Other operating systems

Linux

The Linux kernel includes the hfsplus module[10] for mounting HFS+ filesystems. HFS+ fsck and mkfs have been ported to Linux and are part of the hfsprogs package.[11] These drivers currently have issues with corruption of HFS+ drives with a capacity greater than 2 TB. As such Linux distributions such as Ubuntu do not allow mounting of HFS+ drives or partitions greater than 2 TB.[12]

The Linux HFS+ kernel driver has support to read and write to HFS+ non-journaled drives/parititions but only has read support of journaled HFS+. Journaling ability was added to HFSplus when Mac OS X came out and is by default on for Mac OS X installations. Journaling is a redundant behavior of a filesystem that helps protect data loss. If planning to write to an HFS+ partition then drive journaling must be turned off in OSX.[13]

Windows

On Windows, a fairly complete filesystem driver for HFS+ exists as a commercial software package called MacDrive.[14] This package allows Windows users to read and write HFS+ formatted drives, and read Mac-format optical disks.

Another solution is provided by Paragon, with their HFS+ for Windows driver; this supports both read and write on HFS+ partitions.[15]

Apple has released read-only HFS+ drivers for Windows XP, Windows Vista, and Windows 7 in Boot Camp in Mac OS X 10.6. Microsoft has created a HFS+ driver for the XBox 360 mainly for the purpose of reading HFS+ formatted iPods.

A free (GPL) alternative to MacDrive is HFSExplorer written by Erik Larsson.[16] HFSExplorer is an application for viewing and extracting files from an HFS+ volume (Mac OS Extended) or an HFSX volume (Mac OS Extended, Case-sensitive) located either on a physical disk, on a .dmg disk image, or in a raw file system dump. HFSExplorer is less complete than MacDrive in the sense that it can read, but not write to HFS formatted volumes.

See also

References

  1. ^ a b c d e f "Technical Note TN1150: HFS Plus Volume Format". Apple Developer Connection. March 5, 2004. http://developer.apple.com/technotes/tn/tn1150.html. Retrieved 2007-03-28. 
  2. ^ "Mac OS X: Mac OS Extended format (HFS Plus) volume and file limits". Support.apple.com. 2008-07-29. http://support.apple.com/kb/HT2422. Retrieved 2010-07-05. 
  3. ^ "New Mac OS Extended Format (HFS+) Available". Apple Developer News. 1997. http://developer.apple.com/adcnews/pastissues/devnews090597.html. Retrieved 2007-03-28. 
  4. ^ "Technical Q&A QA1235: Converting to Precomposed Unicode". Apple Developer Connection. February 7, 2003. http://developer.apple.com/qa/qa2001/qa1235.html. Retrieved 2007-03-28. 
  5. ^ there are some minor differences derived from the fact that the HFS Plus format was finalized before Unicode had standardized the NFD format (see “Unicode Subtleties” for more information)
  6. ^ John Gruber (November 11, 2002). "Crow". DaringFireball.net. http://daringfireball.net/2002/11/crow. Retrieved 2007-03-28. 
  7. ^ "Re: git on MacOSX and files with decomposed utf-8 file names". KernelTrap. 2010-05-07. http://kerneltrap.org/mailarchive/git/2008/1/23/593749/thread. Retrieved 2010-07-05. 
  8. ^ John Siracusa (April 28, 2005). "Mac OS X 10.4 Tiger: Metadata revisited". Ars Technica. http://arstechnica.com/reviews/os/macosx-10.4.ars/6. Retrieved 2007-03-28. 
  9. ^ "Apple - Mac OS X Server - Windows Services". Apple.com. Archived from the original on 2007-12-31. http://web.archive.org/web/20071231203318/http://www.apple.com/br/server/macosx/windowsservices.html. Retrieved 2007-11-12. 
  10. ^ Git Repository Kernel.org
  11. ^ User-space supporting tools for HFS+ filesystems under Posix systems.
  12. ^ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=550010
  13. ^ http://ubuntuforums.org/showthread.php?p=2346494
  14. ^ "MacDrive". Mediafour. http://www.mediafour.com/products/macdrive/. Retrieved 2010-07-05. 
  15. ^ "HFS for Windows - file system driver | PARAGON Software Group". Paragon-software.com. http://www.paragon-software.com/home/hfs-windows/. Retrieved 2010-07-05. 
  16. ^ "Catacombae - HFSExplorer". Erik Larsson. 2008-12-23. http://catacombae.org/hfsx.html. Retrieved 2010-12-19. 

External links

  • Apple Technote 1150 - HFS Plus Volume Format
  • Apple Technote 1189 - The Monster Disk Driver Technote
  • hfsdebug - A debugger for HFS Plus volumes by Amit Singh
  • hfsprogs - Userspace support tools for HFS+ filesystems under Linux systems (adapted from Apple's native tools).
  • iBored - A disk editor and viewer supporting HFS Plus


?

파일시스템
2011.03.16 14:02

FAT32 파일시스템의 MBR 살펴보기

조회 수 1756 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제
MBR (Master Boot Record)



MBR - Master Boot Record. MBR은 디스크의 첫번째 섹터에 있습니다. 


플래시메모리에는 MBR이 없습니다. 대신 Boot sector가 있습니다.

MBR 에는 해당드라이브의 파티션에 관한 정보가 저장됩니다.4개의 파티션생성이 가능하나 일반적으로 플래시메모리에는 1파티션으로만 관리하는 경우가 많습니다.

boot sector 의 마직막에는 2-byte 의 signature word 또는 sector marker  55 AA가 있습니다.

MBR:
  shift   size   Description
446-461 16 - partition record 1
462-477 16 - partition record 2
478-493 16 - partition record 3
494-509 16 - partition record 4
510-511 2 - signature 55АА




Flag
Flag of boot partition
80 - boot
00 - no

Type 
파티션구분
FAT16 - 04, 06, 0E
FAT32 - 0B, 0C
NTFS - 07 
확장파티션 - 0f 
확장 DOS 파티션 - 05

Start 
파티션의 시작주소 

Size
파티션의 섹터수
?

파일시스템
2011.03.16 14:03

FAT 파일시스템의 부트섹터 살펴보기

조회 수 1388 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제
Boot (boot sector)



Boot sector는 partition의 첫번째 섹터에 위치하며 마지막 2 byte 는 55 AA 로 끝납니다.

Boot sector 에는 파일시스템 FAT, FAT16 혹은 FAT32 가 표시되나 꼭 필요한것은 아닙니다.

FAT boot 파라미터: 

FAT 16 boot sector 의 주요필드

 

FAT 32 boot sector 의 주요필드 



Sector
Bytes per sector. (512, 1024, 2048 or 4096)
Generally 0x200 = 512

Cluster
Sectors per cluster

Reserved
Reserved sector count. The number of sectors before the first FAT.

N
Number of file allocation tables.
Almost always 2 for flash.

Root Size
The size of root catalog
Size = Root_Size * 32
Root_Size is not used for FAT32 system

Total Sectors
The number of sectors is used in file system.

Table Size
The size of one copy of FAT - the number of sectors in one copy of FAT
?

조회 수 1169 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제
Dir (for FAT16 and FAT32)



Catalog consists of 32 bytes records. These records describe files and catalogs inside catalog.

First two records in catalog (except root) describe this catalog and catalog located on upper level.

Shift Size Descryption
0-0 1 - The first symbol of file name имени (deleted - E5)
1-10 10 - Other 2-11 symbols of file name
11-11 1 - Attributes of file
12-12 1 - Reserved
13-13 1 - Time creation (tenth parts of second)
14-15 2 - Time creation (hours, minutes, seconds)
16-17 2 - Date creation
18-19 2 - Date of last usage
20-21 2 - MSB cluster
22-23 2 - Date of last modification (hours, minutes, seconds)
24-25 2 - Date of last record
26-27 2 - LSB cluster
28-31 4 - File size (0 for catalogs)

?

파일시스템
2011.03.16 14:05

FAT 파일시스템의 FAT 테이블 살펴보기

조회 수 1207 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제
FAT16 table



FAT table is used for determination of condition of clusters and for searching next cluster of file or catalog.

One record about condition of cluster uses 2 bytes (16 bits) in FAT16.
The first sector of FAT16 table starts with signature F8 FF.
Free space is marked with signature 00 00. The end of the file is marked with signature FF F8 - FF FF. The damaged cluster is marked with signature FF F7

There is the special view of the first three sectors of FAT16 table on the picture above.
?

파일시스템
2011.03.16 14:06

FAT 파일시스템 FAT32 테이블 살펴보기

조회 수 16385 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제
FAT32 table



FAT table is used for determination of condition of clusters and for searching next cluster of file or catalog.

One record about condition of cluster uses 4 bytes (32 bits) in FAT32.
The first sector of FAT32 table starts with signature F8 FF FF.
Free space is marked with signature 00 00 00 00. The end of the file is marked with signature FF FF FF F8 - FF FF FF FF. The damaged cluster is marked with signature FF FF FF F7 .

There is the special view of the first three sectors of FAT32 table on the picture above.
?

파일시스템
2011.03.16 13:55

FAT 파일시스템

조회 수 1157 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제

저용량 저장매체의 경우 일반적으로 FAT 파일시스템을 적용하는 경우가 많습니다.

 

FAT 파일시스템의 구조를 살펴보면 아래그림과 같습니다.

 

 MBR - Master boot record
- Boot - boot record
- FAT16 table
- FAT32 table
- Dir (for FAT16 and FAT32)

?

Board Pagination Prev 1 2 Next
/ 2