wordpress添加底部导航,网站优化总结,非凡网站建设,wordpress 100w 数据通常情况下#xff0c;云平台开出来的服务器只有默认的系统盘#xff0c;而数据盘需要运维人员自己挂载在数据目录#xff0c;此篇记录centos磁盘挂载的过程#xff0c;以便今后遇到类似情况便于查看。
系统版本#xff1a;centos7.9 1、查看磁盘情况#xff1a;
[root…通常情况下云平台开出来的服务器只有默认的系统盘而数据盘需要运维人员自己挂载在数据目录此篇记录centos磁盘挂载的过程以便今后遇到类似情况便于查看。
系统版本centos7.9 1、查看磁盘情况
[rootxus ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 7.8G 0 7.8G 0% /dev
tmpfs 7.9G 0 7.9G 0% /dev/shm
tmpfs 7.9G 17M 7.8G 1% /run
tmpfs 7.9G 0 7.9G 0% /sys/fs/cgroup
/dev/vda1 20G 2.4G 18G 12% /
/dev/vdb1 69G 24K 66G 1% /dataext
tmpfs 1.6G 0 1.6G 0% /run/user/02、查看磁盘挂载
[rootxus ~]# fdisk -l
# /dev/vda已经做了分区
Disk /dev/vda: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units sectors of 1 * 512 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x0000c4baDevice Boot Start End Blocks Id System
/dev/vda1 * 2048 41929649 20963801 83 Linux# /dev/vdb已经做了分区,如果还有未分区的空间就没有下面的 /dev/vdb1 分区
Disk /dev/vdb: 75.2 GB, 75161927680 bytes, 146800640 sectors
Units sectors of 1 * 512 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xf8c48eecDevice Boot Start End Blocks Id System
/dev/vdb1 2048 146800639 73399296 83 Linux3、分区(操作完分区步骤后就会看到步骤2的结果)
[rootxus ~]# fdisk /dev/vdb
welcome to fdisk (util-linux 2.23.2)
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command .
Device does not contain a recognized partition tableBuilding a new DOs disklabel with disk identifier 0x774b38c4
Command (m for help): #输入n回车添加新分区如果需要更多请输入m回车看帮助Partition type:p primary (0 primary, extended, 4 free)e extended
select (default p): # 输入p回车P的意思是主分区Partition number (1-4): # 输入数字1回车分区数量First sector (2048-20971519default 2048): #认回车
Using default value 2048Last sectorsectors or sizefk,M,G) (2048-419430399default 419430399): # 默认回车
Using default value 419430399
Partition 1 of type Linux and of size 200GiB is setCommand (m for help): # 输入w保存
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.4、格式化分区
[rootxus ~]# mkfs.ext4 /dev/vdb15、建立挂载目录
[rootxus ~]# mkdir /dataext6、挂载分区
[rootxus ~]# mount /dev/vdb1 /dataext7、设置开机自动挂载
[rootxus ~]# echo /dev/vdb1 /dataext ext4 defaults 0 0 /etc/fstab8.确认是否挂载成功
[rootxus ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 7.8G 0 7.8G 0% /dev
tmpfs 7.9G 0 7.9G 0% /dev/shm
tmpfs 7.9G 17M 7.8G 1% /run
tmpfs 7.9G 0 7.9G 0% /sys/fs/cgroup
/dev/vda1 20G 2.4G 18G 12% /
/dev/vdb1 69G 24K 66G 1% /dataext #这是挂载完的磁盘
tmpfs 1.6G 0 1.6G 0% /run/user/09、重启系统
[rootxus ~]# reboot