Relabeling Your Filesystem with SELinux

If you've been mucking about with your filesystems, you want to force an SELinux filesystem relabel at next boot. For example, I just had a situation where I had /var on a secondary drive but wanted to move it to the primary drive.

This is a time-consuming task, but it makes sure that files are labeled correctly.

Anyway, forcing an SELinux relabel is easy. As root:

touch /.autorelabel

Then reboot.