Is it possible to rename a sparsebundle volume label without mounting/renaming/unmounting/mounting?

4.4k Views Asked by At

I know that the following will work:

hdiutil attach old.sparsebundle -mountroot .
diskutil rename old_label new_label
hdiutil detach old_label
hdiutil attach old.sparsebundle -mountroot .

This results in old_label being mounted as new_label, but it's inelegant to mount it to rename it and then to unmount it and remount it for the label to take effect.

Is there another way?

0

There are 0 best solutions below