How Not to Lose Disks

Have you ever upgraded a machine, only to find that during the upgrade, your device names got rearranged, so that your filesystems aren’t where they used to be, and you can’t mount anything?

This happened to us at work: we upgraded a fileserver with a hundred or so filesystems on a SAN. The driver software silently shuffled the devices around, so after the upgrade, nothing got mounted where it beloned. We had to ask the users to look through the filesystems and tell us where they should have been mounted.

To prevent this sort of thing in the future, we adopted a simple trick: on each filesystem, create a file called mountpoint that says where the filesystem ought to be mounted.

Yes, this is pretty much the same as labeling each partition, as some OSes allow you to do. Except that it’s arguably more robust, because you don’t need to rely on different versions of the OS being able to read the partition label. Besides, it’s simpler, and survives backups, replication, and so forth.

Automating all of this is left as an exercise for the student.

Advertisements
This entry was posted in Geek, Things I've Learned. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s