Microsoft MVP성태의 닷넷 이야기
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 

(시리즈 글이 6개 있습니다.)
Windows: 111. 복구(Recovery) 파티션 삭제하는 방법
; https://www.sysnet.pe.kr/2/0/2918

Windows: 142. Windows 10의 복구 콘솔로 부팅하는 방법
; https://www.sysnet.pe.kr/2/0/11207

Windows: 143. Windows 10의 Recovery 파티션을 삭제 및 새로 생성하는 방법
; https://www.sysnet.pe.kr/2/0/11209

Windows: 147. 시스템 복구 디스크를 USB 디스크에 만드는 방법
; https://www.sysnet.pe.kr/2/0/11598

Windows: 156. 가상 디스크의 용량을 복구 파티션으로 인해 늘리지 못하는 경우
; https://www.sysnet.pe.kr/2/0/11807

Windows: 263. Windows - 복구 파티션(Recovery Partition) 용량을 늘리는 방법
; https://www.sysnet.pe.kr/2/0/13586




가상 디스크의 용량을 복구 파티션으로 인해 늘리지 못하는 경우


경고!!!!!!!
이 글에서 설명하고 있는 diskpart.exe를 이용해 파티션 삭제 등의 작업을 할 때는 정말, 정말, 정말 주의를 해야 합니다. 자칫 실수로 작업 파티션을 날리면 하드 디스크 복구 업체를 통하지 않고는 데이터 복원이 안되는 사태를 경험할 수 있습니다.





가상 디스크(VHD, VHDX)의 용량이 모자라서 늘리긴 했는데, 다음과 같이 복구 파티션이 중간에 끼이는 경우가 있습니다.

move_recovery_partition_1.png

이 때문에 "볼륨 확장(Extend volume)" 명령을 사용할 수가 없는데, 해결책은 다음의 글에서 이미 설명했습니다.

Windows 10의 Recovery 파티션을 삭제 및 새로 생성하는 방법
; https://www.sysnet.pe.kr/2/0/11209

단순히 삭제 후 새롭게 만들어 주면 되지만 그럴 경우 winre.wim 파일을 다시 만들어야 하는 번거로움이 있으므로 그냥 단순하게 기존의 복구 파티션에 있는 내용을 그대로 재사용하는 것이 더 좋습니다. 따라서 Recovery Partition에 드라이브 문자를 할당하고,

C:\WINDOWS\system32> diskpart

Microsoft DiskPart version 10.0.14393.0

Copyright (C) 1999-2013 Microsoft Corporation.
On computer: TESTPC

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online           45 GB    11 GB
  Disk 1    Online           16 GB  1024 KB
  Disk 2    Online            8 GB  1024 KB

DISKPART> select disk 0

Disk 0 is now the selected disk.

DISKPART> list part

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Primary            100 MB  1024 KB
  Partition 2    Primary             33 GB   101 MB
  Partition 3    Recovery           450 MB    33 GB

DISKPART> sel part 3

Partition 3 is now the selected partition.

DISKPART> assign letter=k

DiskPart successfully assigned the drive letter or mount point.

다음과 같이 robocopy를 이용해 백업해 둡니다.

C:\WINDOWS\system32> robocopy k:\ d:\temp\Kdrive\ /S

이제 복구 파티션을 삭제하고,

C:\WINDOWS\system32> diskpart

Microsoft DiskPart version 10.0.14393.0

Copyright (C) 1999-2013 Microsoft Corporation.
On computer: TESTPC

DISKPART> sel disk 0

DISKPART> sel part 3

Partition 3 is now the selected partition.

DISKPART> delete part override

DiskPart successfully deleted the selected partition.

아래와 같이 450MB 공간이 남도록 파티션을 재조정합니다.

move_recovery_partition_2.png

그다음, 다시 기존 백업해 두었던 내용을 새로운 드라이브에 복사해 준 후,

robocopy d:\temp\Kdrive\ f:\ /S /XF tracking.log

Recovery 파티션으로써 동작하도록 설정 작업을 마무리합니다.

F:\> reagentc /setreimage /path f:\recovery\WindowsRE\Winre.wim
Directory set to: \\?\GLOBALROOT\device\harddisk0\partition3\recovery\WindowsRE

REAGENTC.EXE: Operation Successful.


F:\> reagentc /enable
REAGENTC.EXE: Operation Successful.

"Windows 10의 Recovery 파티션을 삭제 및 새로 생성하는 방법" 글에서도 설명했지만, 여기까지 하면 복구 파티션으로의 동작은 합니다. 다만 이전과 동일하게 보이지 않도록 만들고 싶다면 다음과 같이 복구 파티션임을 명시하는 작업을 추가합니다.

F:\> diskpart

Microsoft DiskPart version 10.0.14393.0

Copyright (C) 1999-2013 Microsoft Corporation.
On computer: TESTPC

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online           45 GB  1024 KB
  Disk 1    Online           16 GB  1024 KB
  Disk 2    Online            8 GB  1024 KB

DISKPART> sel disk 0

Disk 0 is now the selected disk.

DISKPART> list part

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Primary            100 MB  1024 KB
  Partition 2    Primary             44 GB   101 MB
  Partition 3    Primary            462 MB    44 GB

DISKPART> sel part 3

Partition 3 is now the selected partition.

GPT 파티션인 경우에는 다음의 명령어로,

DISKPART> set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac

DiskPart successfully set the partition ID.


DISKPART>  GPT attributes=0x8000000000000001

DiskPart successfully assigned the attributes to the selected GPT partition.

DISKPART> detail part

Partition 3
Type    : de94bba4-06d1-4d40-a16a-bfd50179d6ac
Hidden  : Yes
Required: Yes
Attrib  : 0X8000000000000001
Offset in Bytes: 106688413696

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
* Volume 3     F   New Volume   NTFS   Partition    462 MB  Healthy    Hidden

MBR 파티션인 경우에는 다음의 명령어로,

DISKPART> set id=27 override

DiskPart successfully set the partition ID.

수행한 후, 마지막으로 (취향에 따라) 기존에 할당한 드라이브 문자를 제거합니다.

diskpart - remove letter 이후 재부팅 시 다시 드라이브 문자가 할당되는 경우
; https://www.sysnet.pe.kr/2/0/11804




그렇다면, 다음에도 디스크 용량이 부족하면 어떻게 해야 할까요? 당연히 위와 같은 작업을 또 해줘야 합니다. 이쯤에서, 왜??? 복구 파티션이 언제나 앞에 있었는지 그 이유를 알 수 있습니다. ^^

참고로, 여타의 파티션 관리 소프트웨어를 통해 이 작업을 좀 더 편하게 할 수 있습니다. 단지, 대부분의 프로그램들이 유료이거나 믿을 수 없는(untrusted) 소스로부터 다운로드하는 것이어서 개인적으로는 이렇게 직접 작업하는 것을 더 선호합니다. ^^




[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]







[최초 등록일: ]
[최종 수정일: 2/16/2023]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 



2019-11-14 07시46분
[궁금해요] 후미에 생성된 복구파티션을 맨 앞으로 옮기는 방법은 없나요..?
[guest]
2019-11-14 08시25분
넵 없습니다. 그렇긴 한데, 제가 알기로는 상용 파티션 도구들은 그런 기능을 제공하는 것도 있는 듯합니다.
정성태
2019-11-14 10시23분
[궁금해요] 그렇군요..답변 감사합니다.
[guest]
2021-01-24 08시51분
[마냥] 사용중인 PC에 복구 파티션 때문에 C 드라이브 크기 조절을 못하고 있었는데 이 글 덕분에 해결했습니다. 고맙습니다^^
[guest]

... 61  62  63  64  65  66  67  68  69  [70]  71  72  73  74  75  ...
NoWriterDateCnt.TitleFile(s)
11892정성태5/10/201912534웹: 38. HTTP Cookie의 expires 시간 형식(RFC7231)
11891정성태5/9/201915009.NET Framework: 831. (번역글) .NET Internals Cookbook Part 12 - Memory structure, attributes, handles
11890정성태5/8/201910775개발 환경 구성: 439. "Visual Studio Enterprise is required to execute the test." 메시지와 관련된 코드 기록
11889정성태5/8/201911623개발 환경 구성: 438. mstest, QTAgent의 로그 파일 설정 방법
11888정성태5/8/201926803.NET Framework: 830. C# - 비동기 호출을 취소하는 CancellationToken의 간단한 예제 코드 [1]파일 다운로드1
11887정성태5/8/201913319.NET Framework: 829. C# - yield 문을 사용할 수 있는 메서드의 조건
11886정성태5/7/201912401오류 유형: 534. mstest.exe 실행 시 "Visual Studio Enterprise is required to execute the test." 오류 [2]
11885정성태5/7/20199374오류 유형: 533. mstest.exe 실행 시 "File extension specified '.loadtest' is not a valid test extension." 오류 발생
11884정성태5/5/201913053.NET Framework: 828. C# DLL에서 Win32 C/C++처럼 dllexport 함수를 제공하는 방법 - 두 번째 이야기
11883정성태5/3/201917362.NET Framework: 827. C# - 인터넷 시간 서버로부터 받은 시간을 윈도우에 적용하는 방법파일 다운로드1
11882정성태5/2/201914278.NET Framework: 826. (번역글) .NET Internals Cookbook Part 11 - Various C# riddles파일 다운로드1
11881정성태4/28/201914520오류 유형: 532. .NET Core 프로젝트로 마이그레이션 시 "CS0579 Duplicate 'System.Reflection.AssemblyCompanyAttribute' attribute" 오류 발생
11880정성태4/25/201911219오류 유형: 531. 이벤트 로그 오류 - Task Scheduling Error: m->NextScheduledSPRetry 1547, m->NextScheduledEvent 1547
11879정성태4/24/201916462.NET Framework: 825. (번역글) .NET Internals Cookbook Part 10 - Threads, Tasks, asynchronous code and others파일 다운로드2
11878정성태4/22/201914470.NET Framework: 824. (번역글) .NET Internals Cookbook Part 9 - Finalizers, queues, card tables and other GC stuff파일 다운로드1
11877정성태4/22/201914418.NET Framework: 823. (번역글) .NET Internals Cookbook Part 8 - C# gotchas파일 다운로드1
11876정성태4/21/201914250.NET Framework: 822. (번역글) .NET Internals Cookbook Part 7 - Word tearing, locking and others파일 다운로드1
11875정성태4/21/201914614오류 유형: 530. Visual Studo에서 .NET Core 프로젝트를 열 때 "One or more errors occurred." 오류 발생
11874정성태4/20/201914625.NET Framework: 821. (번역글) .NET Internals Cookbook Part 6 - Object internals파일 다운로드1
11873정성태4/19/201913584.NET Framework: 820. (번역글) .NET Internals Cookbook Part 5 - Methods, parameters, modifiers파일 다운로드1
11872정성태4/17/201914046.NET Framework: 819. (번역글) .NET Internals Cookbook Part 4 - Type members파일 다운로드1
11871정성태4/16/201913904.NET Framework: 818. (번역글) .NET Internals Cookbook Part 3 - Initialization tricks [3]파일 다운로드1
11870정성태4/16/201911574.NET Framework: 817. Process.Start로 실행한 콘솔 프로그램의 출력 결과를 얻는 방법파일 다운로드1
11869정성태4/15/201915419.NET Framework: 816. (번역글) .NET Internals Cookbook Part 2 - GC-related things [2]파일 다운로드2
11868정성태4/15/201913146.NET Framework: 815. CER(Constrained Execution Region)이란?파일 다운로드1
11867정성태4/15/201912175.NET Framework: 814. Critical Finalizer와 SafeHandle의 사용 의미파일 다운로드1
... 61  62  63  64  65  66  67  68  69  [70]  71  72  73  74  75  ...