近期我们选择的一台云服务器,默认是有数据盘的,但是默认他自动挂载在data目录,但是我们需要安装的宝塔面板是需要挂载www目录,所以需要提前调整挂载后才可以安装宝塔面板。
查看当前磁盘情况
命令:df -h
[root@125-227-249-184 /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root 50G 2.3G 45G 5%
/tmpfs 7.8G 14M 7.8G 1% /dev/shm
/dev/sda1 477M 28M 425M 7% /boot
/dev/mapper/VolGroup-lv_home 53G 52M 50G 1% /home
/dev/sdb1 917G 14G 857G 2% /data
创建www目录
命令:mkdir /www
下载原来目录
命令:umount /data
挂载新目录
命令:mount /dev/sdb1 /www
查看是否成功挂载
[root@125-227-249-184 /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root 50G 2.3G 45G 5%
/tmpfs 7.8G 14M 7.8G 1% /dev/shm
/dev/sda1 477M 28M 425M 7% /boot
/dev/mapper/VolGroup-lv_home 53G 52M 50G 1% /home
/dev/sdb1 917G 14G 857G 2% /www
设置开机启动
命令:echo '/dev/sdb1 /www ext4 defaults 0 0' >> /etc/fstab
检查情况
[root@125-227-249-184 /]# cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Fri Dec 8 07:21:20 2017
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/VolGroup-lv_root / ext4 defaults 1 1
UUID=7ffd29bd-6e23-4350-b344-507b6b2a43be /boot ext4 defaults 1 2
/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
/dev/sdb1 /www ext4 defaults 0 0
评论前必须登录!
注册