How to Create Mount Point in CentOS 7

The method for creating a new mount point on CentOS 7 is as follows:

  1. Create a directory for mounting point:
  2. Create a new directory at the specified mount point using superuser privileges.
  3. Among them, is the name of the mount point you want.
  4. Find the identifier of the device or file system to be mounted by using one of the following commands:
  5. lsblk: displays disk and partition layout.
  6. fdisk -l: displays disk and partition information.
  7. blkid: displays the UUID and label of devices or file systems.
  8. Mount a device or file system to a mount point.
  9. Elevate the mount command to connect the specified device to the designated mount point.
  10. “Or”
  11. Mount the specified UUID to the designated mount point.
  12. Among them, is the identifier of a device or file system, and is the UUID of a device or file system.
  13. To verify if the mounting was successful, use one of the following commands to check if the device or filesystem has been successfully mounted to the mount point:
  14. df -h: Displays the mounted file systems.
  15. Mount: displays devices or filesystems that are already mounted.
  16. (Optional) Configure automatic mounting:
    To automatically mount devices or file systems during system startup, please edit the /etc/fstab file and add the following line:
  17. /dev/ is mounted at /mnt/ with the specified and default settings, both set to 0.
  18. Or
  19. UUID= mounted at /mnt/ using with default settings.
  20. Among them, is the type of file system.
  21. Save the file and exit the editor.
  22. Restart the system or manually execute the following command to apply the changes.
  23. – Run the command “sudo mount -a”

By doing this, you are creating a new mounting point and attaching a device or file system to it.

bannerAds