diskutil list
-bash-3.2# diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: *500.1 GB disk0
/dev/disk1 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme +2.1 GB disk1
1: Apple_HFS macOS Base System 2.0 GB disk1s1
/dev/disk2 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +10.5 MB disk2
/dev/disk3 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +10.5 MB disk3
/dev/disk4 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk4
/dev/disk5 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk5
/dev/disk6 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk6
/dev/disk7 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk7
/dev/disk8 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk8
/dev/disk9 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk9
/dev/disk10 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +12.6 MB disk10
/dev/disk11 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +4.2 MB disk11
/dev/disk12 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +1.0 MB disk12
/dev/disk13 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk13
/dev/disk14 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk14
/dev/disk15 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk15
/dev/disk16 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk16
/dev/disk17 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +1.0 MB disk17
/dev/disk18 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk18
/dev/disk19 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +6.3 MB disk19
/dev/disk20 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +6.3 MB disk20
/dev/disk21 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk21
/dev/disk22 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk22
-bash-3.2#
-bash-3.2# diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: *500.1 GB disk0
/dev/disk1 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme +2.1 GB disk1
1: Apple_HFS macOS Base System 2.0 GB disk1s1
/dev/disk2 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +10.5 MB disk2
/dev/disk3 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +10.5 MB disk3
/dev/disk4 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk4
/dev/disk5 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk5
/dev/disk6 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk6
/dev/disk7 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk7
/dev/disk8 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk8
/dev/disk9 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk9
/dev/disk10 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +12.6 MB disk10
/dev/disk11 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +4.2 MB disk11
/dev/disk12 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +1.0 MB disk12
/dev/disk13 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk13
/dev/disk14 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk14
/dev/disk15 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk15
/dev/disk16 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk16
/dev/disk17 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +1.0 MB disk17
/dev/disk18 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk18
/dev/disk19 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +6.3 MB disk19
/dev/disk20 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +6.3 MB disk20
/dev/disk21 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk21
/dev/disk22 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk22
/dev/disk23 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.0 TB disk23
1: EFI EFI 209.7 MB disk23s1
2: Apple_HFS Clone 999.9 GB disk23s2
-bash-3.2#
-bash-3.2# diskutil eraseDisk apfs Alex gpt disk0
Started erase on disk0
Unmounting disk
Creating the partition map
Waiting for partitions to activate
Formatting disk0s2 as APFS with name Alex
Mounting disk
Finished erase on disk0
-bash-3.2#
diskutil list internal
-bash-3.2# diskutil list internal
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.1 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk24 499.9 GB disk0s2
/dev/disk24 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +499.9 GB disk24
Physical Store disk0s2
1: APFS Volume Alex 24.6 KB disk24s1
-bash-3.2#
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
/dev/disk1s1 2.0G 1.3G 669M 67% 47930 4294919349 0% /
devfs 210k 210k 0B 100% 712 0 100% /dev
/dev/disk2 10M 3.9M 6.6M 38% 22 4294967257 0% /private/var/log
/dev/disk3 10M 262k 10M 3% 3 4294967276 0% /private/var/log/dm
/dev/disk4 524k 147k 377k 29% 5 4294967274 0% /Volumes
/dev/disk5 524k 147k 377k 29% 7 4294967272 0% /private/var/tmp
/dev/disk6 524k 160k 365k 31% 15 4294967264 0% /private/var/run
/dev/disk7 2.1M 152k 1.9M 8% 6 4294967273 0% /private/tmp
/dev/disk8 524k 143k 381k 28% 2 4294967277 0% /System/Installation
/dev/disk9 524k 307k 217k 59% 28 4294967251 0% /private/var/db
/dev/disk10 13M 5.8M 6.8M 47% 103 4294967176 0% /private/var/folders
/dev/disk11 4.2M 541k 3.7M 13% 49 4294967230 0% /private/var/root/Library
/dev/disk13 2.1M 537k 1.6M 26% 123 4294967156 0% /private/var/root/Library/Containers
/dev/disk14 524k 176k 348k 34% 13 4294967266 0% /Library/Preferences
/dev/disk15 2.1M 143k 2.0M 7% 2 4294967277 0% /Library/Preferences/Logging
/dev/disk16 524k 164k 360k 32% 6 4294967273 0% /Library/Preferences/SystemConfiguration
/dev/disk17 1.0M 201k 848k 20% 8 4294967271 0% /Library/Keychains
/dev/disk18 524k 143k 381k 28% 2 4294967277 0% /Library/Security/Trust Settings
/dev/disk19 6.3M 176k 6.1M 3% 2 4294967277 0% /private/var/tmp/RecoveryTemp
/dev/disk20 6.3M 987k 5.3M 16% 5 4294967274 0% /private/var/tmp/OSISPredicateUpdateProductTemp
/dev/disk21 524k 143k 381k 28% 2 4294967277 0% /private/var/tmp/InstallerCookies
/dev/disk22 2.1M 143k 2.0M 7% 2 4294967277 0% /Library/Logs/DiagnosticReports
/dev/disk23s2 1000 415G 585G 42% 683344 4294283935 0% /Volumes/Clone
/dev/disk24s1 500G 25k 500G 1% 2 4881817438 0% /Volumes/Alex
-bash-3.2#
diskutil resizeVolume disk23s2 500g jhfs+ Data 0b
-bash-3.2# diskutil resizeVolume disk23s2 500g jhfs+ Data 0b
Resizing to 500000000000 bytes and adding 1 partition
Started partitioning on disk23s2 Clone
Verifying the disk
Verifying file system
Volume was successfully unmounted
Performing fsck_hfs -fn -x /dev/rdisk23s2
Checking Journaled HFS Plus volume
Checking extents overflow file
Checking catalog file
Checking multi-linked files
Checking catalog hierarchy
Checking extended attributes file
Checking volume bitmap
Checking volume information
The volume Clone appears to be OK
File system check exit code is 0
Restoring the original state found as mounted
Resizing
Shrinking file system
Modifying partition map
Initialized /dev/rdisk23s3 as a 465 GB case-insensitive HFS Plus volume with a 40960k journal
Mounting disk
Finished partitioning on disk23s2 Clone
/dev/disk23 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.0 TB disk23
1: EFI EFI 209.7 MB disk23s1
2: Apple_HFS Clone 500.0 GB disk23s2
3: Apple_HFS Data 499.7 GB disk23s3
-bash-3.2#
-bash-3.2# diskutil ap convert disk23s3
Converting the volume on disk23s3 to an APFS Volume on an APFS Container
Started APFS operation on disk23s3 Data
Converting HFS Volume to an APFS Container which will export one APFS Volume
The target is the Journaled HFS+ volume "Data" backed by the GPT partition disk23s3
The target is a macOS system disk
Found APFS EFI driver /usr/standalone/i386/apfs.efi to install into the APFS Container
The target is not encrypted
Unmounting disk23s3
Starting conversion from HFS to APFS
Performing apfs_hfs_convert -x --verbose=0x400 --efi /usr/standalone/i386/apfs.efi /dev/disk23s3
Reporting pre-conversion statistics
Reporting post-conversion statistics
Successfully finished conversion from HFS to APFS
Successful conversion in commit mode so will switch type to APFS
Setting type of disk23s3 to APFS
Changing the physical disk partition type in shared mode
Partition modification attempt count was 1
Opening and closing disk23s3 to terminate old content driver
Expecting the new APFS Container at Physical Store disk23s3
Confirmed existence of new unencrypted APFS Volume disk25s1
Mounting APFS Volume disk25s1
APFS Volume mount attempt result was 0
Exiting conversion operations with error code 0
Disk from APFS operation: disk25s1
Finished APFS operation on disk23s3 Data
-bash-3.2#
caffeinate -dimsu &
cp -av /Volumes/Clone/* /Volumes/Data