Terminal "Ownership of the affected disk is required"

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

  1. Jesuslizardjr. macrumors newbie

    Joined:
    Jul 9, 2011
    #1
    Hi,

    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:

    Code:
    > 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:

    Code:
    > 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!
    Thanks

    Macbook Early 2011, El Captan 10.11.5

    [​IMG]
     
  2. BrianBaughn macrumors 601

    BrianBaughn

    Joined:
    Feb 13, 2011
    Location:
    Baltimore, Maryland
    #2
    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

    MacUser2525

    Joined:
    Mar 17, 2007
    Location:
    Canada
    #3
    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.

    Code:
    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.

    Code:
    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

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #4
    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 regular

    BLUEDOG314

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

Share This Page