Benches macOS

3

How to get rid of a whiteout

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

To experiment, I created some whiteouts in a subdirectory of /tmp (contained on a HFSXJ partition) via mknod w. I now seem to have no way to get rid of them (nor does a reboot get rid of them). How do I delete the whiteouts?

3 replies

Sign in or join Beachball Help to reply.

  1. 0

    BobHarris

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    This is the first time I've heard of a whiteout node, so I did some Google searching.

    A whiteout node is used are part of a union file system mount, where a 2nd file system is mounted over a base file system, and the files in both file systems appear to be merged.

    When you delete a file in the union file system which happens to be in the bottom layer (which is effectively read-only), the top layer gets a whiteout node created to indicate that the bottom layer file should not be returned on a directory lookup.

    So while I did not find anything about deleting a whiteout node, my theory is that maybe if you create a real file or directory with the exact same name as the whiteout node you created, the file system will automatically remove the whiteout node. Or try renaming a file to the same name as the whiteout node.

    This is all just while speculation, as today is the first time I've heard of whiteout nodes (and I make my living writing file systems 🙂 ).

  2. 0

    etresoft

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Did you try rm or unlink, with sudo?

  3. 0

    Hachikou

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Finally I did remove my whiteout node with "rm -rfW". Try these options.