10.13 High Sierra Problème fusion disque interne APFS

Lardini

Membre enregistré
5 Janvier 2019
9
0
33
Bonjour,

Je me permet de poster ma question car depuis quelques heures je galère a fusionner un disque interne de mon MBP 2017 que j'ai coupé en deux (sans vraiment me rappeler comment).

J'ai ma partition principale en APFS de 220.5 gb et une partition en APFS de 29,75 gb. Je souhaite donc fusionner les deux partitions sans avoir à reformater le mac.

Voici ci-joint le diskutil list. Je vous remercie par avance de votre aide précieuse.

Bloc de code:
Last login: Tue Jul 14 17:36:15 on ttys000
MacBook-Pro-de-Benjamin:~ benjaminlardini$ diskutil list
/dev/disk0 (internal):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                         251.0 GB   disk0
   1:                        EFI EFI                     314.6 MB   disk0s1
   2:                 Apple_APFS Container disk2         220.5 GB   disk0s2
   3:                        EFI NO NAME                 314.6 MB   disk0s3
   4:                 Apple_APFS Container disk1         29.7 GB    disk0s4
   5:                 Apple_Boot Boot OS X               134.2 MB   disk0s5

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +29.7 GB    disk1
                                 Physical Store disk0s4
   1:                APFS Volume Untitled                843.8 KB   disk1s1

/dev/disk2 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +220.5 GB   disk2
                                 Physical Store disk0s2
   1:                APFS Volume macOS                   39.5 GB    disk2s1
   2:                APFS Volume Preboot                 31.6 MB    disk2s2
   3:                APFS Volume Recovery                519.1 MB   disk2s3
   4:                APFS Volume VM                      1.1 GB     disk2s4

MacBook-Pro-de-Benjamin:~ benjaminlardini$

Benjamin



Note de la modération: pas trop de rapport avec les portables Mac, je déplace dans le forum adéquat.
 
Dernière édition par un modérateur:
Bonsoir Benjamin

Tu as 2 Conteneurs apfs sur le disque de ton SSD : il s'agit d'espaces-disque virtuels exportés par des partitions primaires du disque physique. D'un démarrage à un autre > les index de disques virtuels de ces Conteneurs sont susceptibles de permuter (par exemple le Conteneur principal de 220 Go qui était disk2 d'après ton tableau de 17H 58' => est peut-être devenu disk1 maintenant).

- pour que je te passe une commande de réunification de l'espace disque (non destructrive de ton Conteneur principal) qui cible le Conteneur à supprimer par son index de disque actuel => repasse une commande :​
Bloc de code:
diskutil list

  • et reposte le tableau des disques => qu'on voie s'il y a eu changement d'index des Conteneurs ou pas.
 
Bonjour, Merci pour votre retour. Voici un diskutil list que je viens de faire ce matin à 8H25 :
Bloc de code:
Last login: Tue Jul 14 17:54:23 on ttys000
MacBook-Pro-de-Benjamin:~ benjaminlardini$ diskutil list
/dev/disk0 (internal):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                         251.0 GB   disk0
   1:                        EFI EFI                     314.6 MB   disk0s1
   2:                 Apple_APFS Container disk2         220.5 GB   disk0s2
   3:                        EFI NO NAME                 314.6 MB   disk0s3
   4:                 Apple_APFS Container disk1         29.7 GB    disk0s4
   5:                 Apple_Boot Boot OS X               134.2 MB   disk0s5

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +29.7 GB    disk1
                                 Physical Store disk0s4
   1:                APFS Volume Untitled                839.7 KB   disk1s1

/dev/disk2 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +220.5 GB   disk2
                                 Physical Store disk0s2
   1:                APFS Volume macOS                   58.8 GB    disk2s1
   2:                APFS Volume Preboot                 30.5 MB    disk2s2
   3:                APFS Volume Recovery                519.1 MB   disk2s3
   4:                APFS Volume VM                      1.1 GB     disk2s4

MacBook-Pro-de-Benjamin:~ benjaminlardini$
 
Bon. Passe la commande (copier-coller - copie-la bien jusqu'au list final) :
Bloc de code:
diskutil ap deleteContainer disk1 ; diskutil eraseVolume free null disk0s3 ; diskutil eraseVolume free null disk0s4 ; diskutil eraseVolume free null disk0s5 ; diskutil ap resizeContainer disk2 0b ; diskutil list

  • cette commande concaténée : a) supprime le petit Conteneur vide => ce qui reformate un volume Untitled sur sa partition de base > b) supprime dans l'ordre les 3 partitions sous celle du grand Conteneur => ce qui libère les blocs correspondants > c) récupère l'ensemble de l'espace libre au grand Conteneur (et à sa partition de base) > d) ré-affiche le tableau des disques

Poste l'intégralité du retour de la commande (et pas seulement le tableau final) => au cas où il y aurait eu un blocage de l'enchaînement à un point donné : qu'on voie où et pourquoi.
 
C'est fait et juste BRAVO a priori tout est rentré dans l'ordre. Voici quand même au cas ou le résultat de la commande :

Bloc de code:
Started APFS operation on disk1
Deleting APFS Container with all of its APFS Volumes
Unmounting Volumes
Unmounting Volume "Untitled" on disk1s1
Deleting Volumes
Deleting Container
Wiping former APFS disks
Switching content types
Reformatting former APFS disks
Initialized /dev/rdisk0s4 as a 28 GB case-insensitive HFS Plus volume with a 8192k journal
Mounting disk
1 new disk created or changed due to APFS operation
Disk from APFS operation: disk0s4
Finished APFS operation on disk1
Started erase on disk0s3 NO NAME
Unmounting disk
Finished erase on disk0
Started erase on disk0s4 Untitled
Unmounting disk
Finished erase on disk0
Unable to find disk for disk0s5
Started APFS operation
Aligning grow delta to 30 214 107 136 bytes and targeting a new physical store size of 250 685 575 168 bytes
Determined the maximum size for the targeted physical store of this APFS Container to be 250 684 547 072 bytes
Resizing APFS Container designated by APFS Container Reference disk2
The specific APFS Physical Store being resized is disk0s2
Verifying storage system
Using live mode
Performing fsck_apfs -n -x -l /dev/disk0s2
Checking volume
Checking the container superblock
Checking the EFI jumpstart record
Checking the space manager
Checking the object map
Checking the APFS volume superblock
Checking the object map
Checking the fsroot tree
Checking the snapshot metadata tree
Checking the extent ref tree
Checking the snapshots
Checking the APFS volume superblock
Checking the object map
Checking the fsroot tree
Checking the snapshot metadata tree
Checking the extent ref tree
Checking the snapshots
Checking the APFS volume superblock
Checking the object map
Checking the fsroot tree
Checking the snapshot metadata tree
Checking the extent ref tree
Checking the snapshots
Checking the APFS volume superblock
Checking the object map
Checking the fsroot tree
Checking the snapshot metadata tree
Checking the extent ref tree
Checking the snapshots
Verifying allocated space
The volume /dev/disk0s2 appears to be OK
Storage system check exit code is 0
Growing APFS Physical Store disk0s2 from 220 471 468 032 to 250 685 575 168 bytes
Modifying partition map
Growing APFS data structures
Finished APFS operation
/dev/disk0 (internal):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                         251.0 GB   disk0
   1:                        EFI EFI                     314.6 MB   disk0s1
   2:                 Apple_APFS Container disk2         250.7 GB   disk0s2

/dev/disk2 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +250.7 GB   disk2
                                 Physical Store disk0s2
   1:                APFS Volume macOS                   92.2 GB    disk2s1
   2:                APFS Volume Preboot                 31.6 MB    disk2s2
   3:                APFS Volume Recovery                519.1 MB   disk2s3
   4:                APFS Volume VM                      2.1 GB     disk2s4

/dev/disk3 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *120.0 GB   disk3
   1:                        EFI EFI                     209.7 MB   disk3s1
   2:                 Apple_APFS Container disk4         119.8 GB   disk3s2

/dev/disk4 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +119.8 GB   disk4
                                 Physical Store disk3s2
   1:                APFS Volume SSD                     112.6 GB   disk4s1
   2:                APFS Volume Preboot                 20.5 KB    disk4s2
   3:                APFS Volume Recovery                20.5 KB    disk4s3
   4:                APFS Volume VM                      20.5 KB    disk4s4

MacBook-Pro-de-Benjamin:~ benjaminlardini$