diskutil list
Last login: Thu Mar 19 14:40:38 on ttys000
MacBook-Air-de-BENAROUCHE:~ benarouchehichem$ diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *479.9 GB disk0
1: Apple_APFS Container disk1 328.0 GB disk0s2
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +328.0 GB disk1
Physical Store disk0s2
1: APFS Volume Macintoch HD 309.4 GB disk1s1
2: APFS Volume Preboot 44.1 MB disk1s2
3: APFS Volume Recovery 510.4 MB disk1s3
4: APFS Volume VM 3.2 GB disk1s4
/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_APFS Container disk7 2.0 TB disk2s2
/dev/disk3 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: Boot Camp +2.8 GB disk3
/dev/disk4 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: GSPCD1046A +374.5 MB disk4
/dev/disk5 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: CCCOMA_X64FRE_EN-US... +5.4 GB disk5
/dev/disk6 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: Boot Camp +2.8 GB disk6
/dev/disk7 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +2.0 TB disk7
Physical Store disk2s2
1: APFS Volume TOSHIBA External drive 328.3 GB disk7s1
2: APFS Volume PreBoot 42.1 MB disk7s2
3: APFS Volume Recovery 517.5 MB disk7s3
MacBook-Air-de-BENAROUCHE:~ benarouchehichem$
diskutil ap resizeContainer disk1 0b ; diskutil list internal
Last login: Thu Mar 19 22:35:10 on ttys000
MacBook-Air-de-BENAROUCHE:~ benarouchehichem$ diskutil ap resizeContainer disk1 0b ; diskutil list internal
Started APFS operation
Aligning grow delta to 151 737 229 312 bytes and targeting a new physical store size of 479 737 241 600 bytes
Determined the maximum size for the targeted physical store of this APFS Container to be 479 736 213 504 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 -S /dev/disk0s2
Checking the container superblock
Checking the EFI jumpstart record
Checking the space manager
Checking the space manager free queue trees
Checking the object map
Checking volume
Checking the APFS volume superblock
The volume Macintoch HD was formatted by hfs_convert (945.260.7) and last modified by apfs_kext (945.275.8)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Checking volume
Checking the APFS volume superblock
The volume Preboot was formatted by hfs_convert (945.260.7) and last modified by apfs_kext (945.275.8)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Checking volume
Checking the APFS volume superblock
The volume Recovery was formatted by diskmanagementd (945.260.7) and last modified by apfs_kext (945.275.8)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Checking volume
Checking the APFS volume superblock
The volume VM was formatted by apfs.util (945.260.7) and last modified by apfs_kext (945.275.8)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Verifying allocated space
The volume /dev/disk0s2 appears to be OK
Storage system check exit code is 0
Growing APFS Physical Store disk0s2 from 328 000 012 288 to 479 737 241 600 bytes
Modifying partition map
Growing APFS data structures
APFS Container Resize error code is 49157
A problem occurred; undoing all changes
Modifying partition map
Error: -69606: A problem occurred while resizing APFS Container structures
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *479.9 GB disk0
1: Apple_APFS Container disk1 328.0 GB disk0s2
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +328.0 GB disk1
Physical Store disk0s2
1: APFS Volume Macintoch HD 309.4 GB disk1s1
2: APFS Volume Preboot 44.1 MB disk1s2
3: APFS Volume Recovery 510.4 MB disk1s3
4: APFS Volume VM 3.2 GB disk1s4
MacBook-Air-de-BENAROUCHE:~ benarouchehichem$
diskutil ap list
Last login: Thu Mar 19 22:45:09 on ttys000
MacBook-Air-de-BENAROUCHE:~ benarouchehichem$ diskutil ap list
APFS Containers (2 found)
|
+-- Container disk1 D7EB4243-B947-488C-B275-33AFEE4DB94F
| ====================================================
| APFS Container Reference: disk1
| Size (Capacity Ceiling): 328000012288 B (328.0 GB)
| Capacity In Use By Volumes: 313307324416 B (313.3 GB) (95.5% used)
| Capacity Not Allocated: 14692687872 B (14.7 GB) (4.5% free)
| |
| +-< Physical Store disk0s2 E245163C-E2EF-4C68-8DD6-403CDF9F3A18
| | -----------------------------------------------------------
| | APFS Physical Store Disk: disk0s2
| | Size: 328000012288 B (328.0 GB)
| |
| +-> Volume disk1s1 97656955-7597-36C9-81F5-2B654E623211
| | ---------------------------------------------------
| | APFS Volume Disk (Role): disk1s1 (No specific role)
| | Name: Macintoch HD (Case-insensitive)
| | Mount Point: /
| | Capacity Consumed: 309385654272 B (309.4 GB)
| | FileVault: No
| |
| +-> Volume disk1s2 A4A5239E-22AD-4455-ACC4-46B80E260A4C
| | ---------------------------------------------------
| | APFS Volume Disk (Role): disk1s2 (Preboot)
| | Name: Preboot (Case-insensitive)
| | Mount Point: Not Mounted
| | Capacity Consumed: 44077056 B (44.1 MB)
| | FileVault: No
| |
| +-> Volume disk1s3 B69206D0-5CF2-4568-A1ED-C99EA74B8125
| | ---------------------------------------------------
| | APFS Volume Disk (Role): disk1s3 (Recovery)
| | Name: Recovery (Case-insensitive)
| | Mount Point: Not Mounted
| | Capacity Consumed: 510414848 B (510.4 MB)
| | FileVault: No
| |
| +-> Volume disk1s4 42B81C63-0EEA-4D6D-BF7A-C3C57319E1BE
| ---------------------------------------------------
| APFS Volume Disk (Role): disk1s4 (VM)
| Name: VM (Case-insensitive)
| Mount Point: /private/var/vm
| Capacity Consumed: 3221626880 B (3.2 GB)
| FileVault: No
|
+-- Container disk7 94C1BB12-2863-403A-94FA-10079CF712E5
====================================================
APFS Container Reference: disk7
Size (Capacity Ceiling): 2000189177856 B (2.0 TB)
Capacity In Use By Volumes: 329137385472 B (329.1 GB) (16.5% used)
Capacity Not Allocated: 1671051792384 B (1.7 TB) (83.5% free)
|
+-< Physical Store disk2s2 FA1E80EA-C107-42B9-B104-B983C3F295B9
| -----------------------------------------------------------
| APFS Physical Store Disk: disk2s2
| Size: 2000189177856 B (2.0 TB)
|
+-> Volume disk7s1 B04FF121-02C4-4F8F-96C0-1D532D7BAE80
| ---------------------------------------------------
| APFS Volume Disk (Role): disk7s1 (No specific role)
| Name: TOSHIBA External drive (Case-insensitive)
| Mount Point: /Volumes/TOSHIBA External drive
| Capacity Consumed: 328277250048 B (328.3 GB)
| FileVault: No
|
+-> Volume disk7s2 FF677757-1975-4942-ABA4-1A66A02087E6
| ---------------------------------------------------
| APFS Volume Disk (Role): disk7s2 (Preboot)
| Name: PreBoot (Case-insensitive)
| Mount Point: Not Mounted
| Capacity Consumed: 42143744 B (42.1 MB)
| FileVault: No
|
+-> Volume disk7s3 A49E258F-7C56-4C15-95CA-0081EC448F41
---------------------------------------------------
APFS Volume Disk (Role): disk7s3 (Recovery)
Name: Recovery (Case-insensitive)
Mount Point: Not Mounted
Capacity Consumed: 517537792 B (517.5 MB)
FileVault: No
MacBook-Air-de-BENAROUCHE:~ benarouchehichem$
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *479.9 GB disk0
1: Apple_APFS Container disk1 328.0 GB disk0s2
csrutil status
csrutil disable
sudo gpt show disk0
Last login: Thu Mar 19 23:22:08 on ttys001
AirdeBENAROUCHE:~ benarouchehichem$ sudo gpt show disk0
Password:
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 409606
409640 640625024 1 GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC
641034664 296361783
937396447 32 Sec GPT table
937396479 1 Sec GPT header
AirdeBENAROUCHE:~ benarouchehichem$
34 409606
diskutil list internal
-bash-3.2# diskutil list internal
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *479.9 GB disk0
1: Apple_APFS Container disk2 328.0 GB disk0s1
/dev/disk2 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +328.0 GB disk2
Physical Store disk0s1
1: APFS Volume Macintoch HD 306.2 GB disk2s1
2: APFS Volume Preboot 44.1 MB disk2s2
3: APFS Volume Recovery 510.4 MB disk2s3
4: APFS Volume VM 2.1 GB disk2s4
-bash-3.2#
diskutil umount force disk2s1
gpt add -b 40 -s 409600 -t C12A7328-F81F-11D2-BA4B-00A0C93EC93B disk0 ; diskutil list disk0
-bash-3.2# gpt add -b 40 -s 409600 -t C12A7328-F81F-11D2-BA4B-00A0C93EC93B disk0 ; diskutil list disk0
disk0s2 added
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *479.9 GB disk0
1: Apple_APFS Container disk2 328.0 GB disk0s1
2: EFI 209.7 MB disk0s2
-bash-3.2#
newfs_msdos -F 32 -v EFI /dev/disk0s2 ; diskutil mount disk0s2 ; diskutil list disk0