Hacker News new | ask | show | jobs
by rosser 5477 days ago
On my collocated server, I use encrypted LVM for all of my filesystems (except /boot, of course). On my next hardware upgrade cycle, I'm going to install a USB gyroscope (inside the chassis, using one of the front USB headers) and write a daemon that will issue a `umount -lfa && halt -n` if the box is ever moved.

Note that this isn't simply to keep prying eyes off my data; I live near an overdue earthquake fault line. When it does finally give, I should have a (slightly) better chance of the machine coming through intact.

1 comments

Shouldn't you throw in a `sync` before halting?
If you do that, I would change && to ; on the basis you want the halt no matter whether the umount succeeds or not.