1、查看盘符信息:
[root@dm02 ~]# df -h
[root@dm02 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 63G 0 63G 0% /dev
tmpfs 63G 0 63G 0% /dev/shm
tmpfs 63G 25M 63G 1% /run
tmpfs 63G 0 63G 0% /sys/fs/cgroup
/dev/vda1 99G 3.3G 91G 4% /
tmpfs 63G 4.0K 63G 1% /tmp
tmpfs 13G 0 13G 0% /run/user/0
[root@dm02 ~]# fdisk -l
[root@dm02 ~]# fdisk -l
Disk /dev/vda: 100 GiB, 107374182400 bytes, 209715200 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
Disklabel type: dos
Disk identifier: 0x07d5d815
Device Boot Start End Sectors Size Id Type
/dev/vda1 * 2048 209713151 209711104 100G 83 Linux
Disk /dev/vdb: 2 TiB, 2199023255552 bytes, 4294967296 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 /dev/vdb: 2 TiB 新数据库,未分区使用。
2、分区格盘挂载
分区
[root@dm02 ~]# fdisk /dev/vdb
n p 默认 默认 p w
--- 重新读取分区表信息
[root@dm02 ~]# partprobe
格盘
[root@dm02 ~]# mkfs -t ext4 /dev/vdb1
挂载
[root@dm02 ~]# mkdir /data
[root@dm02 ~]# mount /dev/vdb1 /data
[root@dm02 ~]# blkid /dev/vdb1
/dev/vdb1: UUID="33abfebc-4872-4f1e-91a5-a1287ceb15a2" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="eaff96a4-01"
[root@dm02 ~]# vim /etc/fstab
UUID=33abfebc-4872-4f1e-91a5-a1287ceb15a2 /data ext4 defaults 1 1
[root@dm02 ~]# mount -all
[root@dm02 ~]# df -h