Does anyone know how to change the UUID of a Volume? The background for this question is that I have a duplicate UUID issue:

I have /Volumes/OldMacHD with a UUID of XYZ. I have /Volumes/Mirror1 with a UUID of XYZ (same UUID! I bet that's because OldMacHD USED to be part of this mirror). I got these UUIDs via:

diskutil info /dev/thatdisknumber | grep UUID 

I’d like to change the UUID of Mirror1.

I discovered by chance the hfs.util utility, since these are HFS volumes after all. The man page for hfs.util says that if you issue the -s flag, this changes the UUID. However, if you type hfs.util all by itself, it doesn’t show you the -s option at all, just every option besides that! Grr. I tried it anyway:

sudo /System/Library/Filesystems/hfs.fs/hfs.util -s /dev/disk4 (the raid volume).  

Nothing happens. No error message, no success message. UUID exactly the same. I tried it while the volume was unmounted.

Any ideas?

6 Answers 6


the syntax for hfs.util appears to just be the devicename, not the path including /dev/


Server:~ admin$ mount
/dev/disk1s2 on /Volumes/Backup (hfs, local, journaled)
Server:~ admin$ sudo /System/Library/Filesystems/hfs.fs/hfs.util -s rdisk1s2

make sure to unmount the drive before the hfs.util -s and mount afterwards.

use the "raw" device i.e. rdisk1s2 instead of disk1s2

diskutil info will not show the new uuid until you remount.

  • 2
    In El Capitan, hfs.util is located in /System/Library/Filesystems/hfs.fs/Contents/Resources.
    – skozin
    May 16, 2016 at 22:28

It should be doable. try using the hfs.util specifying the actual device id of the volume (if it's a raid volume you want the device id of the volume on the raid, not of any specific disk).

Alternatively use the little tool that is part of SuperDuper! so you can specify the path to a mounted volume.

The gory details of how the volume id is handled (which is actually not an UUID, the UUID is only used for display and is re-computed every time from the actual volume id) is explained in my answer to How does one change the UUID of a Volume on Mac OS X to a SPECIFIED value?


You can simply change UUID by partition format/erase.

1) Format disk to Mac OS Extended using built-in Disk Utility

2) If you need windows partition, format disk to exFAT after you have done first step (for some reason you need two steps for windows partition)

You can check if UUID changed by listing all UUID numbers:

find /Volumes -maxdepth 1 -mindepth 1 -exec diskutil info {} \;

/dev/disk4 isn't an HFS volume, it's an entire drive, including the partition table and any number of separate volumes (partitions) on the drive. /dev/disk4s0 would be an example of a volume. Find the correct identifier for the actual HFS volume you care about, and try doing hfs.util -s on that.


All the examples I can find just take the device BSD name, not the full path to a device file. Have you tried that?

  • Yup, tried them both. I ended up non-destructively killing and rebuilding the raid mirror in order to change the UUID, because nothing else worked. Would be interesting to know how to do this for the future.
    – Emmel
    Apr 4, 2010 at 16:21
  • Odds are good it's never been tested on a RAID setup. Try it on a single device, and if it still doesn't do anything, file a bug report. Apr 4, 2010 at 17:42

Easiest and most compatiable way I have found is with Gparted (can find the mac dmg on either sourceforge OR http://gparted.org) and manually selecting that partition /drive and editing the uuid that way

BUT with disk util (this works on both linux & Mac:

  1. insert drive

  2. select the gear and turn off auto mount

  3. in the newly editable boxes Change "Display Name" and then select (from "mount as") mount as UUID=foo

    • if nothing of value is left on this drive reformat and declare a Display Name and mount as "${Display Name} (which would be uuid=foo)
  4. (optional) if needed re-enable auto mounting

  5. reuse

  6. (optional) modify fstab to re-enter the mix of drives

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.