Linux automatically mounts disk partitions based on UUID

Source: Internet
Author: User

The general server has multiple hard disk partitions, which may change when the logical location of these partitions is loaded after a reboot, and may cause confusion due to changes in disk order if the disk is mounted using traditional device names (for example:/DEV/SDA).

Each block device in the Linux environment has a globally unique UUID that identifies the device, and we can replace the device name with a UUID in the fstab so that this confusion does not occur.

  

1. Take SDB1 as an example, first use the LSBLK command to get a clear picture of the global block device layout

  

2. Then use the Blkid command to get the device's UUID. Copy Note SDB1 's UUID

  

3.VI editing/etc/fstab File System Information

4. Add a line at the end. Then: Wq Save exit

5. After rebooting, Df-h can see that the SDB1 has been loaded automatically.

Linux automatically mounts disk partitions based on UUID

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.