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]

... 46  47  48  49  [50]  51  52  53  54  55  56  57  58  59  60  ...
NoWriterDateCnt.TitleFile(s)
12396정성태11/3/20208415VS.NET IDE: 152. Visual Studio - "Tools" / "External Tools..."에 등록된 외부 명령어에 대한 단축키 설정 방법
12395정성태11/3/20209738오류 유형: 677. SSMS로 DB 접근 시 The server principal "..." is not able to access the database "..." under the current security context.
12394정성태11/3/20208155오류 유형: 676. cacls - The Recycle Bin on ... is corrupted. Do you want to empty the Recycle Bin for this drive?
12393정성태11/3/20208652오류 유형: 675. Visual Studio - 닷넷 응용 프로그램 디버깅 시 Disassembly 창에서 BP 설정할 때 "Error while processing breakpoint." 오류
12392정성태11/2/202012765.NET Framework: 959. C# 9.0 - (9) 레코드(Records) [4]파일 다운로드1
12390정성태11/1/202011033디버깅 기술: 173. windbg - System.Configuration.ConfigurationErrorsException 예외 분석 방법
12389정성태11/1/202010769.NET Framework: 958. C# 9.0 - (8) 정적 익명 함수 (static anonymous functions)파일 다운로드1
12388정성태10/29/202010223오류 유형: 674. 어느 순간부터 닷넷 응용 프로그램 실행 시 System.Configuration.ConfigurationErrorsException 예외가 발생한다면?
12387정성태10/28/202011009.NET Framework: 957. C# - static 필드의 정보가 GC Heap에 저장될까요? [3]파일 다운로드1
12386정성태10/28/202011255Linux: 34. 사용자 정보를 함께 출력하는 리눅스의 ps 명령어 사용 방법
12385정성태10/28/20209073오류 유형: 673. openssl - req: No value provided for Subject Attribute CN, skipped
12384정성태10/27/202010281오류 유형: 672. AllowPartiallyTrustedCallers 특성이 적용된 어셈블리의 struct 멤버 메서드를 재정의하면 System.Security.VerificationException 예외 발생
12383정성태10/27/202011163.NET Framework: 956. C# 9.0 - (7) 패턴 일치 개선 사항(Pattern matching enhancements) [3]파일 다운로드1
12382정성태10/26/20208889오류 유형: 671. dotnet build - The local source '...' doesn't exist
12381정성태10/26/202010548VC++: 137. C++ stl map의 사용자 정의 타입을 key로 사용하는 방법 [1]파일 다운로드1
12380정성태10/26/20207971오류 유형: 670. Visual Studio - Squash_FailureCommitsReset
12379정성태10/21/202010973.NET Framework: 955. .NET 메서드의 Signature 바이트 코드 분석 [1]파일 다운로드2
12378정성태10/15/202010389.NET Framework: 954. C# - x86/x64 환경에 따라 달라지는 P/Invoke 함수의 export 이름파일 다운로드1
12377정성태10/15/202011684디버깅 기술: 172. windbg - 파일 열기 시점에 bp를 걸어 파일명 알아내는 방법(Managed/Unmanaged)
12376정성태10/15/20208400오류 유형: 669. windbg - sos의 name2ee 명령어 실행 시 "Failed to request module list." 오류
12375정성태10/15/20209782Windows: 177. 윈도우 탐색기에서 띄우는 cmd.exe 창의 디렉터리 구분 문자가 'Yen(¥)' 기호로 나오는 경우 [1]
12374정성태10/14/202014397.NET Framework: 953. C# 9.0 - (6) 함수 포인터(Function pointers) [1]파일 다운로드2
12373정성태10/14/20209687.NET Framework: 952. OpCodes.Box와 관련해 IL 형식으로 직접 코딩 시 유의할 점
12372정성태10/13/202011499.NET Framework: 951. C# 9.0 - (5) 로컬 함수에 특성 지정 가능(Attributes on local functions)파일 다운로드1
12371정성태10/13/202010284개발 환경 구성: 519. Visual Studio의 Ctrl+Shift+U (Edit.MakeUppercase) 단축키가 동작하지 않는 경우
12370정성태10/13/202011183Linux: 33. Linux - nmcli를 이용한 고정 IP 설정
... 46  47  48  49  [50]  51  52  53  54  55  56  57  58  59  60  ...