Modify mount mount directory name under Linux

Source: Internet
Author: User
Tags uuid

Sometimes it is necessary to change mount Mount directory name to keep multiple machines unified, convenient for our distributed operation, the following is the detailed operation details.

Before modification:

[Email protected] ~]# df-h

File system capacity has been used with available percent mount points

/dev/mapper/volgroup-lv_root

50G 3.3G 44G 7%/

Tmpfs 7.7G 0 7.7G 0%/dev/shm

/dev/sda2 485M 36M 424M 8%/boot

/DEV/SDA1 200M 256K 200M 1%/boot/efi

/dev/mapper/volgroup-lv_home

492G 3.7G 463G 1%/Home

Modified in:

# Mkdir/data

# Umount/home

# Mount/dev/mapper/volgroup-lv_home/data

# Vi/etc/fstab

/DEV/MAPPER/VOLGROUP-LV_ROOT/EXT4 Defaults 1 1

Uuid=e8e5023f-de70-4a7e-9bc9-4d22ed6fdc0b/boot EXT4 Defaults 1 2

Uuid=5268-c0f3/boot/efi vfat umask=0077,shortname=winnt 0 0

/dev/mapper/volgroup-lv_home /Home EXT4 Defaults 1 2

/dev/mapper/volgroup-lv_swap swap swap defaults 0 0

TMPFS/DEV/SHM TMPFS Defaults 0 0

Devpts/dev/pts devpts gid=5,mode=620 0 0

Sysfs/sys Sysfs Defaults 0 0

PROC/PROC proc Defaults 0 0

Modify the/etc/fstab inside the/home for/data, let the system start automatically mount to/data

After modification:

[Email protected] ~]# df-h

File system capacity has been used with available percent mount points

/dev/mapper/volgroup-lv_root

50G 3.3G 44G 7%/

Tmpfs 7.7G 0 7.7G 0%/dev/shm

/dev/sda2 485M 36M 424M 8%/boot

/DEV/SDA1 200M 256K 200M 1%/boot/efi

/dev/mapper/volgroup-lv_home

492G 3.7G 463G 1%/data

To this, modify the Linux Mount Mount directory operation to complete.

 

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.