1、fdisk -l进行检查
[root@shoujiyingyong02 ~]# fdisk -l
Disk /dev/vda: 42.9 GB, 42949672960 bytes, 83886080 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: 0x000b7861Device Boot Start End Blocks Id System
/dev/vda1 * 2048 83886046 41941999+ 83 LinuxDisk /dev/vdb: 1099.5 GB, 1099511627776 bytes, 2147483648 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
--------------
2、进行分区
parted /dev/vdb
mklabel gpt
mkpart primary 0% 100%
[root@shoujiyingyong02 ~]# mkfs.xfs /dev/vdb1
meta-data=/dev/vdb1 isize=512 agcount=4, agsize=67108736 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=0, sparse=0
data = bsize=4096 blocks=268434944, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal log bsize=4096 blocks=131071, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
---------------如果使用上面命令提示command not found.
yum -y install xfsprogs ##安装一个就好啦
[root@shoujiyingyong02 ~]# mount /dev/vdb1 /data/
[root@shoujiyingyong02 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 40G 24G 15G 63% /
devtmpfs 16G 0 16G 0% /dev
tmpfs 16G 0 16G 0% /dev/shm
tmpfs 16G 33M 16G 1% /run
tmpfs 16G 0 16G 0% /sys/fs/cgroup
tmpfs 3.2G 0 3.2G 0% /run/user/1000
cm_processes 16G 0 16G 0% /opt/cm-5.16.2/run/cloudera-scm-agent/process
cm_processes 16G 20M 16G 1% /run/cloudera-scm-agent/process
tmpfs 3.2G 0 3.2G 0% /run/user/0
/dev/vdb1 1.0T 33M 1.0T 1% /data
===============
方法2
有问题请加博主微信进行沟通!
全部评论