Usage: diskutil eraseVolume format name MountPoint|DiskIdentifier|DeviceNode
Completely erase a disk (partition or whole), laying down a new file system
volume. Ownership of the affected disk is required. Format is the specific
file system personality name (or alias) you want to erase it as (JHFS+, etc.).
Name is the (new) volume name (subject to file system naming restrictions), or
can be specified as %noformat% to skip initialization (to skip newfs). You
cannot erase the boot volume. A format of "Free Space" will cause removal
of the partition.
Example: diskutil eraseVolume JHFS+ UntitledHFS /Volumes/SomeDisk
iMac:~ yannicklemort$ diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.0 TB disk0
1: EFI EFI 209.7 MB disk0s1
/dev/disk1 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *256.1 GB disk1
1: EFI EFI 209.7 MB disk1s1
2: Apple_APFS Container disk3 255.9 GB disk1s2
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *2.0 TB disk2
1: EFI EFI 209.7 MB disk2s1
2: Apple_HFS Time Machine 2.0 TB disk2s2
/dev/disk3 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +255.9 GB disk3
Physical Store disk1s2
1: APFS Volume Machintosh HD 194.2 GB disk3s1
2: APFS Volume Preboot 19.4 MB disk3s2
3: APFS Volume Recovery 517.4 MB disk3s3
4: APFS Volume VM 2.1 GB disk3s4
iMac:~ yannicklemort$ diskutil erasevolume jhfs+ untitleled disk0
Started erase on disk0
Unmounting disk
Error: -69888: Couldn't unmount disk
iMac:~ yannicklemort$
diskutil partitionDisk disk0 gpt jhfs+ Data 100%
Je me permet de revenir vers toi, j'ai essayé avec Stellar mais il ne retrouve rien de plus que ma sauvegarde du coup je veux réinitialiser le disque mais je n'y arrive pas je poste la liste de mes disque c'est le disk0 1.0TB je t'avais dis archive mais comme il n'apparait pas je ne peux pas le renommer voici la commande que j'ai tapé mais ça ne fonctionne pas.
merci pour ton aide
diskutil erasevolume jhfs+ disk0
Bloc de code:Usage: diskutil eraseVolume format name MountPoint|DiskIdentifier|DeviceNode Completely erase a disk (partition or whole), laying down a new file system volume. Ownership of the affected disk is required. Format is the specific file system personality name (or alias) you want to erase it as (JHFS+, etc.). Name is the (new) volume name (subject to file system naming restrictions), or can be specified as %noformat% to skip initialization (to skip newfs). You cannot erase the boot volume. A format of "Free Space" will cause removal of the partition. Example: diskutil eraseVolume JHFS+ UntitledHFS /Volumes/SomeDisk iMac:~ yannicklemort$ diskutil list /dev/disk0 (internal, physical): #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *1.0 TB disk0 1: EFI EFI 209.7 MB disk0s1 /dev/disk1 (external, physical): #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *256.1 GB disk1 1: EFI EFI 209.7 MB disk1s1 2: Apple_APFS Container disk3 255.9 GB disk1s2 /dev/disk2 (external, physical): #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *2.0 TB disk2 1: EFI EFI 209.7 MB disk2s1 2: Apple_HFS Time Machine 2.0 TB disk2s2 /dev/disk3 (synthesized): #: TYPE NAME SIZE IDENTIFIER 0: APFS Container Scheme - +255.9 GB disk3 Physical Store disk1s2 1: APFS Volume Machintosh HD 194.2 GB disk3s1 2: APFS Volume Preboot 19.4 MB disk3s2 3: APFS Volume Recovery 517.4 MB disk3s3 4: APFS Volume VM 2.1 GB disk3s4 iMac:~ yannicklemort$ diskutil erasevolume jhfs+ untitleled disk0 Started erase on disk0 Unmounting disk Error: -69888: Couldn't unmount disk iMac:~ yannicklemort$
csrutil status
System Integrity Protection status: disabled
sudo gpt show disk0
iMac-de-Famille:~ famille$ sudo gpt show disk0
Password:
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 1565156192 2 GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC
1565565832 4294967303
5860533135 32 Sec GPT table
5860533167 1 Sec GPT header
1565565832 4294967303
diskutil ap resizeContainer disk1 0b ; diskutil list
iMac-de-Famille:~ famille$ diskutil ap resizeContainer disk1 0b ; diskutil list
Started APFS operation
Error: -69743: The new size must be different than the existing size
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *3.0 TB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk1 801.4 GB disk0s2
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +801.4 GB disk1
Physical Store disk0s2
1: APFS Volume Macintosh HD 23.4 GB disk1s1
2: APFS Volume Preboot 23.4 MB disk1s2
3: APFS Volume Recovery 512.0 MB disk1s3
4: APFS Volume VM 20.5 KB disk1s4
diskutil ap list
iMac-de-Famille:~ famille$ diskutil ap list
APFS Container (1 found)
|
+-- Container disk1 1DDE98F9-3FBE-4131-8938-B2E227820887
====================================================
APFS Container Reference: disk1
Size (Capacity Ceiling): 801359970304 B (801.4 GB)
Minimum Size: 32965140480 B (33.0 GB)
Capacity In Use By Volumes: 24136888320 B (24.1 GB) (3.0% used)
Capacity Not Allocated: 777223081984 B (777.2 GB) (97.0% free)
|
+-< Physical Store disk0s2 905E68FA-3434-4ABB-A517-AEF3C83F65AA
| -----------------------------------------------------------
| APFS Physical Store Disk: disk0s2
| Size: 801359970304 B (801.4 GB)
|
+-> Volume disk1s1 82A9FB89-D5B0-445C-BFA3-44E6F912D1CE
| ---------------------------------------------------
| APFS Volume Disk (Role): disk1s1 (No specific role)
| Name: Macintosh HD (Case-insensitive)
| Mount Point: /
| Capacity Consumed: 23413268480 B (23.4 GB)
| FileVault: No
|
+-> Volume disk1s2 FC51B8B3-C560-420B-809D-07A8472F8992
| ---------------------------------------------------
| APFS Volume Disk (Role): disk1s2 (Preboot)
| Name: Preboot (Case-insensitive)
| Mount Point: Not Mounted
| Capacity Consumed: 23375872 B (23.4 MB)
| FileVault: No
|
+-> Volume disk1s3 72A1E6EA-9F52-40E8-A1B5-9AF3873141C1
| ---------------------------------------------------
| APFS Volume Disk (Role): disk1s3 (Recovery)
| Name: Recovery (Case-insensitive)
| Mount Point: Not Mounted
| Capacity Consumed: 511983616 B (512.0 MB)
| FileVault: No
|
+-> Volume disk1s4 8032F7AE-CD78-427B-812A-E31803F7D18B
---------------------------------------------------
APFS Volume Disk (Role): disk1s4 (VM)
Name: VM (Case-insensitive)
Mount Point: /private/var/vm
Capacity Consumed: 20480 B (20.5 KB)
FileVault: No
diskutil verifyVolume disk1
iMac-de-Famille:~ famille$ diskutil verifyVolume disk1
Started file system verification on disk1
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 snapshot 1 of 2
Checking snapshot 2 of 2
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
Finished file system verification on disk1
diskutil ap resizeContainer disk1 100g jhfs+ Test 0b ; diskutil list
iMac-de-Famille:~ famille$ diskutil ap resizeContainer disk1 100g jhfs+ Test 0b ; diskutil list
Started APFS operation
Aligning shrink delta to 701 359 972 352 bytes and targeting a new physical store size of 99 999 997 952 bytes
Determined the minimum size for the targeted physical store of this APFS Container to be 32 965 140 480 bytes
Resizing APFS Container designated by APFS Container Reference disk1
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 snapshot 1 of 2
Checking snapshot 2 of 2
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
Shrinking APFS Physical Store disk0s2 from 801 359 970 304 to 99 999 997 952 bytes
Shrinking APFS data structures
Shrinking partition
Modifying partition map
Initialized /dev/rdisk0s3 as a 653 GB case-insensitive HFS Plus volume with a 57344k journal
Mounting disk
1 new disk created or changed due to APFS operation
Disk from APFS operation: disk0s3
Finished APFS operation
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *3.0 TB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk1 100.0 GB disk0s2
3: Apple_HFS Test 701.2 GB disk0s3
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +100.0 GB disk1
Physical Store disk0s2
1: APFS Volume Macintosh HD 23.4 GB disk1s1
2: APFS Volume Preboot 23.4 MB disk1s2
3: APFS Volume Recovery 512.0 MB disk1s3
4: APFS Volume VM 20.5 KB disk1s4