J'ai un disque dur externe de 1 To qui avait deux partitions. 400G pour Time Machine et 600G pour le reste. J'utilise MacOS Sierra 10.12.2.
~ diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.3 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_CoreStorage Macintosh HD 499.4 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
/dev/disk1 (internal, virtual):
#: TYPE NAME SIZE IDENTIFIER
0: Macintosh HD +499.1 GB disk1
Logical Volume on disk0s2
2C4E67F3-5642-4E87-82E2-38D7079B736E
Unlocked Encrypted
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.0 TB disk2
1: EFI EFI 209.7 MB disk2s1
2: Apple_CoreStorage Backup 400.0 GB disk2s2
3: Apple_Boot Boot OS X 134.2 MB disk2s3
4: Apple_HFS Jumbo 599.7 GB disk2s4
/dev/disk3 (external, virtual):
#: TYPE NAME SIZE IDENTIFIER
0: Backup +399.7 GB disk3
Logical Volume on disk2s2
E8E8E5D6-E9F2-45F4-A55A-AD126D187790
Unlocked Encrypted
~ gpt -r -vv show /dev/disk2
gpt show: /dev/disk2: mediasize=1000204886016; sectorsize=512; blocks=1953525168
gpt show: /dev/disk2: PMBR at sector 0
gpt show: /dev/disk2: Pri GPT at sector 1
gpt show: /dev/disk2: Sec GPT at sector 1953525167
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 6
40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
409640 781250000 2 GPT part - 53746F72-6167-11AA-AA11-00306543ECAC
781659640 262144 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
781921784 1171341200 4 GPT part - 48465300-0000-11AA-AA11-00306543ECAC
1953262984 262151
1953525135 32 Sec GPT table
1953525167 1 Sec GPT header
Je souhaite à présent modifier les tailles en réduisant la partition de 600 Go et en étendant celle de 400 Go. La réduction s'est déroulée sans problème avec diskutil resizeVolume disk2s4 300G
.
~ gpt -r -vv show /dev/disk2
gpt show: /dev/disk2: mediasize=1000204886016; sectorsize=512; blocks=1953525168
gpt show: /dev/disk2: PMBR at sector 0
gpt show: /dev/disk2: Pri GPT at sector 1
gpt show: /dev/disk2: Sec GPT at sector 1953525167
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 6
40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
409640 781250000 2 GPT part - 53746F72-6167-11AA-AA11-00306543ECAC
781659640 262144 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
781921784 585937496 4 GPT part - 48465300-0000-11AA-AA11-00306543ECAC
1367859280 585665855
1953525135 32 Sec GPT table
1953525167 1 Sec GPT header
Maintenant, la partie à développer :
J'ai trouvé cette réponse et suivre les étapes qui y sont mentionnées.
~ diskutil cs list
CoreStorage logical volume groups (2 found)
|
+-- Logical Volume Group 28A27FF8-1376-4F14-9AEF-ED6B306564E6
| =========================================================
| Name: Macintosh HD
| Status: Online
| Size: 499418034176 B (499.4 GB)
| Free Space: 4096 B (4.1 KB)
| |
| +-< Physical Volume 768A2ECD-804E-4657-B4B5-1D2222671DEA
| | ----------------------------------------------------
| | Index: 0
| | Disk: disk0s2
| | Status: Online
| | Size: 499418034176 B (499.4 GB)
| |
| +-> Logical Volume Family AD757291-D990-44F6-81C7-C1CD171CA6E7
| ----------------------------------------------------------
| Encryption Type: AES-XTS
| Encryption Status: Unlocked
| Conversion Status: Complete
| High Level Queries: Fully Secure
| | Passphrase Required
| | Accepts New Users
| | Has Visible Users
| | Has Volume Key
| |
| +-> Logical Volume 2C4E67F3-5642-4E87-82E2-38D7079B736E
| ---------------------------------------------------
| Disk: disk1
| Status: Online
| Size (Total): 499082485760 B (499.1 GB)
| Revertible: Yes (unlock and decryption required)
| Revert Status: Reboot required
| LV Name: Macintosh HD
| Volume Name: Macintosh HD
| Content Hint: Apple_HFS
|
+-- Logical Volume Group 734FF1FC-20B6-4875-B557-D31A5D7C78EB
=========================================================
Name: Backup
Status: Online
Size: 400000000000 B (400.0 GB)
Free Space: 4096 B (4.1 KB)
|
+-< Physical Volume 4196C157-11E1-465C-A822-A9FAFAC7E9C7
| ----------------------------------------------------
| Index: 0
| Disk: disk2s2
| Status: Online
| Size: 400000000000 B (400.0 GB)
|
+-> Logical Volume Family 255E74B3-8F71-4715-9CA7-A1640CDA9EB3
----------------------------------------------------------
Encryption Type: AES-XTS
Encryption Status: Unlocked
Conversion Status: Complete
High Level Queries: Fully Secure
| Passphrase Required
| Accepts New Users
| Has Visible Users
| Has Volume Key
|
+-> Logical Volume E8E8E5D6-E9F2-45F4-A55A-AD126D187790
---------------------------------------------------
Disk: disk3
Status: Online
Size (Total): 399664451584 B (399.7 GB)
Revertible: Yes (unlock and decryption required)
LV Name: Backup
Volume Name: Backup
Content Hint: Apple_HFS
Comme la sauvegarde était un volume CoreStorage, j'ai utilisé diskutil cs resizeStack E8E8E5D6-E9F2-45F4-A55A-AD126D187790 0g
sans succès. Malheureusement, je n'ai plus le message d'erreur exact, mais il ressemblait à quelque chose comme "La nouvelle taille doit être différente de la taille existante". (Vous verrez plus tard d'où vient ce message.) J'ai également essayé diskutil cs resizeVolume
y resizeDisk cs resizeDisk
sans succès.
Voici à quoi cela ressemble dans l'Utilitaire de disque :
Il n'y a pas de bouton pour redimensionner la sauvegarde, seul le Jumbo en a un.
J'ai pensé que cela pouvait être dû au fait que Backup est un volume crypté. J'ai donc désactivé le cryptage dans Time Machine. 12 heures plus tard, Backup est maintenant Apple_HFS
:
~ diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.3 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_CoreStorage Macintosh HD 499.4 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
/dev/disk1 (internal, virtual):
#: TYPE NAME SIZE IDENTIFIER
0: Macintosh HD +499.1 GB disk1
Logical Volume on disk0s2
2C4E67F3-5642-4E87-82E2-38D7079B736E
Unlocked Encrypted
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.0 TB disk2
1: EFI EFI 209.7 MB disk2s1
2: Apple_HFS Backup 400.0 GB disk2s2
3: Apple_Boot Boot OS X 134.2 MB disk2s3
4: Apple_HFS Jumbo 300.0 GB disk2s4
disk2s2
est le volume que je souhaite redimensionner :
~ diskutil resizeVolume disk2s2 R
Resizing to full size (fit to fill)
Started partitioning on disk2s2 Backup
Error: -69743: The new size must be different than the existing size
Boom, ça ne marche toujours pas. Essayons 700G (300G (actuel) + 400G (gratuit)) :
~ diskutil resizeVolume disk2s2 700G
Resizing to 700000000000 bytes
Started partitioning on disk2s2 Backup
Error: -69771: The target disk is too small for this operation
OK, regardons les limites :
~ diskutil resizeVolume disk2s2 limits
Resize limits for partition disk2s2 Backup:
Current partition size on map: 400.0 GB (400000000000 Bytes)
Minimum size (constrained by file usage): 306.2 GB (306166493184 Bytes)
Recommended minimum size (if used for OS): 311.5 GB (311535202304 Bytes)
Maximum size (constrained by map space): 400.0 GB (400000000000 Bytes)
Note : J'ai essayé toutes les étapes en mode normal et en mode de récupération avec les mêmes résultats.
Il y a donc une "taille maximale limitée par l'espace de la carte" et je ne sais pas ce que cela signifie. Comment puis-je modifier la taille ? Est-ce que c'est ce qui m'empêche d'étendre le volume ?
Voici le résultat de diskutil info
pour fournir quelques détails supplémentaires :
~ diskutil info disk2
Device Identifier: disk2
Device Node: /dev/disk2
Whole: Yes
Part of Whole: disk2
Device / Media Name: 024 HN-M101MBB
Volume Name: Not applicable (no file system)
Mounted: Not applicable (no file system)
File System: None
Content (IOContent): GUID_partition_scheme
OS Can Be Installed: No
Media Type: Generic
Protocol: USB
SMART Status: Not Supported
Disk Size: 1.0 TB (1000204886016 Bytes) (exactly 1953525168 512-Byte-Units)
Device Block Size: 512 Bytes
Read-Only Media: No
Read-Only Volume: Not applicable (no file system)
Device Location: External
Removable Media: Fixed
Virtual: No
OS 9 Drivers: No
Low Level Format: Not supported
~ diskutil info disk2s2
Device Identifier: disk2s2
Device Node: /dev/disk2s2
Whole: No
Part of Whole: disk2
Volume Name: Backup
Mounted: Yes
Mount Point: /Volumes/Backup
Partition Type: Apple_HFS
File System Personality: Journaled HFS+
Type (Bundle): hfs
Name (User Visible): Mac OS Extended (Journaled)
Journal: Journal size 32768 KB at offset 0xba7000
Owners: Enabled
OS Can Be Installed: Yes
Media Type: Generic
Protocol: USB
SMART Status: Not Supported
Volume UUID: 0FC68EF3-FF25-3C90-93DA-87236A2DBFAF
Disk / Partition UUID: 1E1BED05-CD09-4945-B60C-A7B45F28F76C
Disk Size: 400.0 GB (400000000000 Bytes) (exactly 781250000 512-Byte-Units)
Device Block Size: 512 Bytes
Volume Total Space: 400.0 GB (400000000000 Bytes) (exactly 781250000 512-Byte-Units)
Volume Used Space: 306.1 GB (306149363712 Bytes) (exactly 597947976 512-Byte-Units) (76.5%)
Volume Available Space: 93.9 GB (93850636288 Bytes) (exactly 183302024 512-Byte-Units) (23.5%)
Allocation Block Size: 4096 Bytes
Read-Only Media: No
Read-Only Volume: No
Device Location: External
Removable Media: Fixed
Editer 1 : Selon le diskutil cs list
le disque externe n'a plus de CoreStorage :
~ diskutil cs list
CoreStorage logical volume groups (1 found)
|
+-- Logical Volume Group 28A27FF8-1376-4F14-9AEF-ED6B306564E6
=========================================================
Name: Macintosh HD
Status: Online
Size: 499418034176 B (499.4 GB)
Free Space: 4096 B (4.1 KB)
|
+-< Physical Volume 768A2ECD-804E-4657-B4B5-1D2222671DEA
| ----------------------------------------------------
| Index: 0
| Disk: disk0s2
| Status: Online
| Size: 499418034176 B (499.4 GB)
|
+-> Logical Volume Family AD757291-D990-44F6-81C7-C1CD171CA6E7
----------------------------------------------------------
Encryption Type: AES-XTS
Encryption Status: Unlocked
Conversion Status: Complete
High Level Queries: Fully Secure
| Passphrase Required
| Accepts New Users
| Has Visible Users
| Has Volume Key
|
+-> Logical Volume 2C4E67F3-5642-4E87-82E2-38D7079B736E
---------------------------------------------------
Disk: disk1
Status: Online
Size (Total): 499082485760 B (499.1 GB)
Revertible: Yes (unlock and decryption required)
Revert Status: Reboot required
LV Name: Macintosh HD
Volume Name: Macintosh HD
Content Hint: Apple_HFS