是否可以在不安装/重命名/卸载/安装的情况下重命名sparsebundle卷标?

eat*_*oaf 6 filesystems macos diskimage timemachine

我知道以下内容可行:

hdiutil attach old.sparsebundle -mountroot .
diskutil rename old_label new_label
hdiutil detach old_label
hdiutil attach old.sparsebundle -mountroot .
Run Code Online (Sandbox Code Playgroud)

这会导致old_label被安装为new_label,但是安装它以重命名它然后卸载它并重新安装它以使标签生效是不优雅的.

还有另外一种方法吗?