Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On macOS the disk size is wrong #266

Open
Migulon opened this issue Jul 30, 2021 · 3 comments
Open

On macOS the disk size is wrong #266

Migulon opened this issue Jul 30, 2021 · 3 comments
Labels
block Block storage and device issues bug macos

Comments

@Migulon
Copy link

Migulon commented Jul 30, 2021

It's doubled. Strange. For block storage.

@rareinator
Copy link

rareinator commented Dec 1, 2021

So I know this is a kinda old issue but just ran into this issue as well. Looks to be because of the way diskutil reads the drives from MacOS.
When I run the diskutil list i get 3 total drives, one being marked as (internal, physical). Which seems to be the right one, and then a second one marked (synthesized), which seems to be something that occurs because of the APFS filesystem.
It was introduced in macOS 10.12.4

Here is the output

/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.3 GB   disk0
   1:                        EFI ⁨EFI⁩                     314.6 MB   disk0s1
   2:                 Apple_APFS ⁨Container disk1⁩         500.0 GB   disk0s2

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +500.0 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume ⁨Macintosh HD - Data⁩     458.4 GB   disk1s1
   2:                APFS Volume ⁨Preboot⁩                 476.1 MB   disk1s2
   3:                APFS Volume ⁨Recovery⁩                1.1 GB     disk1s3
   4:                APFS Volume ⁨VM⁩                      3.2 GB     disk1s4
   5:                APFS Volume ⁨Macintosh HD⁩            15.7 GB    disk1s5
   6:              APFS Snapshot ⁨com.apple.os.update-...⁩ 15.7 GB    disk1s5s1

/dev/disk2 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        +838.9 MB   disk2
   1:                  Apple_HFS ⁨FontForge⁩               838.8 MB   disk2s1

I will try and look into if its possible to see from diskutil list -plist which one is the right one

@jaypipes jaypipes added block Block storage and device issues bug macos labels Dec 2, 2021
@jaypipes
Copy link
Owner

jaypipes commented Dec 2, 2021

Hi @rareinator and @Migulon! sorry for the delay in looking into this, and thank you @rareinator for providing some hints as to why this is happening on MacOS. I don't have a Mac handy at this point to experiment with, unfortunately, which is part of the reason why Mac support in ghw is so much behind Linux and Windows.

@rareinator
Copy link

Hi, @jaypipes yeah no worries 😃 I looked into it a bit last night and from what I could gather it seems that the -plist option returns the APFS scheme with a key called APFSPhysicalStores.
If you need anything else from me you can always reach out, I can also upload the entire output on Pastebin or something😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
block Block storage and device issues bug macos
Projects
None yet
Development

No branches or pull requests

3 participants