How to get rid of a whiteout

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?

Macbook, Mac OS X (10.5.8)

Posted on Jan 28, 2010 2:17 AM

Reply
3 replies
Sort By: 

Jan 28, 2010 6:23 AM in response to Dr. T

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 🙂 ).
Reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to get rid of a whiteout

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.