Server Administration & Management

How to find UUID of devices in Linux

This trick is for those who deal with many removable devices, with every device changing its name after you restart your systm. The solution is to mount devices by using their UUIDs (Universally Unique Identifier)

# blkid

/dev/sda1: UUID=”0bd49e6e-6692-410e-8408-5353905f5c42″ TYPE=”ext4″
/dev/sda2: UUID=”cea4d6d2-d624-4193-9576-67ec27b15796″ TYPE=”ext4″
/dev/sda3: UUID=”3b00985c-cf8d-4b87-be92-74186d0a2dcb” TYPE=”ext4″
/dev/sda5: UUID=”79b4e73d-d40d-428b-86a8-930506d86d8d” TYPE=”swap”

Which will show the UUIDs of devices, Now you can make an entry in the “/etc/fstab” file to avoid any problems.
This tip can also be applied in case of SAN storage, where every Logical Unit Number (LUN) needs to be mounted.

June 20, 2014 - Posted by | Tips & Tricks, Unix/Linux | , ,

No comments yet.

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s

%d bloggers like this: