Terminal "Ownership of the affected disk is required"

Discussion in 'macOS' started by Jesuslizardjr., Feb 9, 2017.

  1. Jesuslizardjr. macrumors newbie

    Jul 9, 2011

    I'm currently trying to repair my External HD using Terminal as the "First Aid" option is greyed out in Disk Util (See Image Below) without losing any data on the drive itself.

    Whenever I try to use the "repairvolume" command it comes back at me with this:

    > diskutil repairvolume /Volumes/Eric's Data
    Usage:  diskutil repairVolume MountPoint|DiskIdentifier|DeviceNode
    Repair the file system data structures of a volume.
    Ownership of the affected disk is required.
    I have tried sudo beforehand to see if it was my permission as an admin that was stopping me but that didn't help, i've tried mounting it first (If you look at the diskutil screen shot below you can see it's not mounted) and I got this error:

    > diskutil mount /Volumes/Eric's Data
    Usage:   diskutil mount [readOnly] [-mountPoint Path] DiskIdentifier|DeviceNode
    Mount will mount the volume in the "standard" place (/Volumes), unless
    an optional mount point is specified.
    Again, i'm trying to repair the drive without losing the contents!

    Macbook Early 2011, El Captan 10.11.5

  2. BrianBaughn macrumors 603


    Feb 13, 2011
    Baltimore, Maryland
    In Finder, if you select the external drive and "Get Info" on it, is "Ignore ownership on this volume" checked (bottom of Info window popup)?
  3. MacUser2525, Feb 9, 2017
    Last edited: Feb 9, 2017

    MacUser2525 macrumors 68000


    Mar 17, 2007
    You need to escape the illegal characters or it will never work something like this diskutil mount /Volumes/Eric\'s\ Data. Typing in Terminal then hitting the TAB key will do it automatically for you starting with diskutil mount /Volumes/E then hit TAB for the completion to have it done correctly and of course then ENTER key to execute the command.

    Edit: Now I think about it that would be a command on an already mounted volume with the name showing you need to get the raw disk name by using a diskutil list. Which would give you something like this.

    MacUser2525:~$ diskutil list
    /dev/disk0 (internal, physical):
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:      GUID_partition_scheme                        *480.1 GB   disk0
       1:                        EFI EFI                     209.7 MB   disk0s1
       2:                 Apple_RAID                         30.0 GB    disk0s2
       3:                 Apple_Boot Boot OS X               134.2 MB   disk0s3
       4:                 Apple_RAID                         449.6 GB   disk0s4
       5:                 Apple_Boot Boot OS X               134.2 MB   disk0s5
    Now here if I want to mount the partition named EFI when displayed I use this command.

    MacUser2525:~$ diskutil mount /dev/disk0s1
    Volume EFI on /dev/disk0s1 mounted
    You need to determine the proper /dev/disk?s? for your Eric's Data partition to do a mounting of it from the command line.

    Edit2: Looking at the second picture looks like /dev/disk2s1 is it for the raw disk needed.
  4. Weaselboy Moderator


    Staff Member

    Jan 23, 2005
    MacUser2525 has explained why your commands are not working, but it looks like the volume is not mounted in Disk Utility and that is why the first aid button is greyed out. Can you right click on the volume in Disk Util then mount it?

    Screen Shot 2017-02-09 at 8.07.08 AM.png
  5. BLUEDOG314 macrumors 6502


    Dec 12, 2015
    In terminal try "diskutil disableOwnership disk2s2" then try to mount and repair.

Share This Page

4 February 9, 2017