Datamation content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.
UUID (Universal Unique Identifier) notation is another way provided by
Linux to access your disks. Unlike the standard /dev/hda1,
/dev/sda2 notation, it is linked specifically to a particular piece
of hardware (whereas /dev/ notation can shift between disks depending
on how they’re plugged in). This means you don’t have the risk of a
system reconfiguration causing disks to be renamed, and thus causing
knock-on breakage of things that reference that disk.
OK, so, first, how do you find out the UUID of your disk? The command
blkid can be used — here’s its output for one of my disks:
# blkid /dev/hda1
/dev/hda1: UUID="0ef96300-36c0-4575-8a1d-2d36ff4cd585" SEC_TYPE="ext2" TYPE="ext3"
|
Alternatively, you can look at the /dev/disk/by_uuid/ directory to
see which UUID is associated with which disk. (Use df to find out
what device names you currently have mounted.)
You can also do this the other way around, starting from the UUID:
findfs UUID=uuid will tell you which disk is associated with that
UUID.
Once you have the UUID of a device, you can use it with mount by
using the -U switch:
mount -U 0ef96300-36c0-4575-8a1d-2d36ff4cd585 /mnt/disk1
|
or, you can use it in your /etc/fstab by putting UUID=uuid at
the start of the relevant line, instead of /dev/hdaX.
To assign a UUID to a disk, use tunefs. You can generate your own
UUID with the command uuidgen. Then type:
tune2fs -U uuid /dev/sda2
|
This might come in handy if, say, you’ve cloned your disk (e.g., by using
dd) and must be able to mount both the original and the clone.
Assign it a new UUID and you’re away!
This article was first published on ServerWatch.com.
RELATED NEWS AND ANALYSIS
-
Ethics and Artificial Intelligence: Driving Greater Equality
FEATURE | By James Maguire,
December 16, 2020
-
AI vs. Machine Learning vs. Deep Learning
FEATURE | By Cynthia Harvey,
December 11, 2020
-
Huawei’s AI Update: Things Are Moving Faster Than We Think
FEATURE | By Rob Enderle,
December 04, 2020
-
Keeping Machine Learning Algorithms Honest in the ‘Ethics-First’ Era
ARTIFICIAL INTELLIGENCE | By Guest Author,
November 18, 2020
-
Key Trends in Chatbots and RPA
FEATURE | By Guest Author,
November 10, 2020
-
Top 10 AIOps Companies
FEATURE | By Samuel Greengard,
November 05, 2020
-
What is Text Analysis?
ARTIFICIAL INTELLIGENCE | By Guest Author,
November 02, 2020
-
How Intel’s Work With Autonomous Cars Could Redefine General Purpose AI
ARTIFICIAL INTELLIGENCE | By Rob Enderle,
October 29, 2020
-
Dell Technologies World: Weaving Together Human And Machine Interaction For AI And Robotics
ARTIFICIAL INTELLIGENCE | By Rob Enderle,
October 23, 2020
-
The Super Moderator, or How IBM Project Debater Could Save Social Media
FEATURE | By Rob Enderle,
October 16, 2020
-
Top 10 Chatbot Platforms
FEATURE | By Cynthia Harvey,
October 07, 2020
-
Finding a Career Path in AI
ARTIFICIAL INTELLIGENCE | By Guest Author,
October 05, 2020
-
CIOs Discuss the Promise of AI and Data Science
FEATURE | By Guest Author,
September 25, 2020
-
Microsoft Is Building An AI Product That Could Predict The Future
FEATURE | By Rob Enderle,
September 25, 2020
-
Top 10 Machine Learning Companies 2021
FEATURE | By Cynthia Harvey,
September 22, 2020
-
NVIDIA and ARM: Massively Changing The AI Landscape
ARTIFICIAL INTELLIGENCE | By Rob Enderle,
September 18, 2020
-
Continuous Intelligence: Expert Discussion [Video and Podcast]
ARTIFICIAL INTELLIGENCE | By James Maguire,
September 14, 2020
-
Artificial Intelligence: Governance and Ethics [Video]
ARTIFICIAL INTELLIGENCE | By James Maguire,
September 13, 2020
-
IBM Watson At The US Open: Showcasing The Power Of A Mature Enterprise-Class AI
FEATURE | By Rob Enderle,
September 11, 2020
-
Artificial Intelligence: Perception vs. Reality
FEATURE | By James Maguire,
September 09, 2020