linux修改挂载目录
linux修改挂载目录修改扩展磁盘默认的挂载点/home到/data
# df -h
文件系统 容量已用可用 已用%% 挂载点
/dev/mapper/VolGroup-lv_root
50G3.3G 44G 7% /
tmpfs 7.7G 07.7G 0% /dev/shm
/dev/sda2 485M 36M424M 8% /boot
/dev/sda1 200M256K200M 1% /boot/efi
/dev/mapper/VolGroup-lv_home
492G3.7G463G 1% /home
# 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 devptsgid=5,mode=6200 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
修改/etc/fstab里面的/home为/data, 让系统启动的时候自动挂载到/data
页:
[1]