Home > Linux, Tech Tip > Mounting disks by label; A cautionary tale

Mounting disks by label; A cautionary tale

I was migrating some data to some new disks and since the drive letters would be changing once the old disks were removed, I partitioned them and then gave them label names so they could be mounted by label.

The original disks had labels like:
boot
srv
tmp

On the new disks I thought good names would be:
/boot
/srv
/tmp

(I think Redhat actually names things this way by default?)

Anyhow, to make a long story short, mount by label ignores the leading slash. When the system rebooted, as predicted the drives came up in a different order so a “mount LABEL=srv” will actually mount the first disk named either “/srv” or “srv”.

Moral of the story; it’s probably a good idea not to use any strange characters when naming disks.

Advertisement
Categories: Linux, Tech Tip
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

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

Gravatar
WordPress.com Logo

Please log in to WordPress.com to post a comment to your blog.

Twitter picture

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

Facebook photo

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

Connecting to %s

Follow

Get every new post delivered to your Inbox.