류짱:Beyond MySelf

시스템 파티션과 부트 파티션 - 메모리 덤프가 생성 되는 곳은? 본문

Microsoft/Windows Platform

시스템 파티션과 부트 파티션 - 메모리 덤프가 생성 되는 곳은?

リュちゃん 2012. 7. 31. 10:16

Widows server 2003 환경에서는 메모리 덤프가 수집 되기 위해서는 반드시 Paging 파일이 필요하다. 그런데 가끔 시스템을 보면 해당 시스템이 두개의 파티션 즉 C 와 D가 있는데 D 드라이브에 Windows 폴더가 있는 경우가 있습니다.
일반적인 경우라면  C 드라이브에 Windows 폴더가 위치 하겠지만 멀티 부팅이나 다른 이유 들로 C가 아닌 D 드라이브에 Windows 폴더가 위치 할 수 있겠죠?

여튼 이런 경우에는 메모리 덤프 수집을 위한 페이징 파일은 어디에 만들어야 하는 걸까? Ntldr이나 boot.ini가 있는 시스템 파티션인 C 드라브에 만들어야 할까? 아니면 Windows 폴더가 위치한 D 드라이브에 만들어야 할 까요?
물론 디스크에 여유 공간이 충분해 두 군데 다 페이징 파일을 만들 수도 있겠지만.... 용량이 충분치 않은 상황이라면..

아래 kb를 보면 그 답을 알 수 있습니다.
http://support.microsoft.com/kb/254649/en-us

you must have a paging file on the boot volume that is sufficient to hold all the physical RAM plus 1 megabyte (MB).

페이징 파일이 반드시 Boot volume(부트 볼륨)에 위치 해야합니다. 시스템에 볼륨에 위치 할 경우 덤프가 생성 되지 않습니다.

부트 볼륨과 시스템 볼륨의 정의에 대해서는 아래 KB를 참고 하길 바랍니다.

Definitions for system volume and boot volume
http://support.microsoft.com/kb/314470/en-us

시스템 파티션
시스템 파티션은 Windows를 시작하는 데 필요한 하드웨어 관련 파일(예: Ntldr, Boot.ini 및 Ntdetect.com)이 포함된 디스크 볼륨을 말합니다.
참고: 동적 디스크에서는 이것을 "시스템 볼륨"이라고 합니다.
Intel 186 이상의 컴퓨터("x86" 계열만 해당)에서는 시스템 파티션이 활성으로 표시된 주 파티션이어야 합니다. x86 계열의 lntel 컴퓨터에서 시스템 파티션은 항상 드라이브 0입니다. 이 드라이브는 운영 체제가 시작될 때 시스템 BIOS가 검색하는 드라이브입니다.
필수 사항은 아니지만 시스템 파티션과 부팅 파티션이 동일할 수 있습니다.

부팅 파티션
부팅 파티션은 Windows 운영 체제 파일(기본적으로 WINDOWS 폴더에 있음) 및 지원 파일(기본적으로 WINDOWS\System32 폴더에 있음)이 포함된 디스크 볼륨을 말합니다.
동적 디스크에서는 이것을 "부팅 볼륨"이라고 합니다.
필수 사항은 아니지만 부팅 파티션과 시스템 파티션이 동일할 수 있습니다.
시스템 파티션은 하나뿐이지만 다중 부팅 시스템에서는 부팅 파티션이 각 운영 체제별로 있습니다.

참고로 Windows Vista 이후 버전 부터는 DedicateDumpFile이라는 레지스트리를 이용해서 부트 파티션이 아닌 용량이 충분한 로컬 디스크(SAN 스토리지는 안됨)라면 어떤 드라이브에서라도  덤프를 생성 할 수 있다.
DedicatedDumpFile 을 사용하는 방법
http://ryuchan.kr/90

그리고 추가로 Windows 7과 8 클라이언트 머신에서는 덤프 생성 알고리즘이 변경 되어 아래와 같은 경우에는 덤프가 생성되지 않을수 있으며 덤프를 생성하기 위해서는 AlwaysKeepMemoryDump 값을 레지스트리에 추가 하셔야 합니다.

Algorithm to decide whether to store/delete memory.dmp file generated after a system crash:

a.First report the kernel fault to the Online Crash Analysis Service.
b.Then, if machine has a registry setting AlwaysKeepMemoryDump set to 1, store the dump file on disk.
c.Else, if machine is a Windows Server SKU, store the dump file on disk.
d.Else, if the machine is joined to a domain (i.e. this is a corporate machine), store the dump file on disk.
e.Else, if machine is not on a domain (i.e. this is a home user’s machine),
If free disk space is >= 25GB, store the dump file on disk.
Else (free disk space is < 25 GB), delete the dump file.

The exact location of the AlwaysKeepMemoryDump setting in the registry is:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl
AlwaysKeepMemoryDump Type: REG_DWORD  1 (hex)


감사합니다.

[참고 자료]
Definitions for system volume and boot volume
http://support.microsoft.com/kb/314470/en-us

Overview of memory dump file options for Windows 2000, Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2
http://support.microsoft.com/kb/254649/en-us

No kernel memory dump created on Windows 7 or Windows
http://blogs.msdn.com/b/wer/archive/2009/02/09/kernel-dump-storage-and-clean-up-behavior-in-windows-7.aspx