[root@centos7-template-10-252 ~]# fdisk -l

Disk /dev/sda: 53.7 GB, 53687091200 bytes, 104857600 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: 0x000be58d


  Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *        2048     1026047      512000   83  Linux

/dev/sda2         1026048   104857599    51915776   83  Linux


Disk /dev/sdb: 536.9 GB, 536870912000 bytes, 1048576000 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

mount 挂载新增磁盘_centos




[root@centos7-template-10-252 ~]# df -h

Filesystem      Size  Used Avail Use% Mounted on

devtmpfs         16G     0   16G   0% /dev

tmpfs            16G     0   16G   0% /dev/shm

tmpfs            16G  9.0M   16G   1% /run

tmpfs            16G     0   16G   0% /sys/fs/cgroup

/dev/sda2        50G  4.2G   46G   9% /

/dev/sda1       497M  168M  330M  34% /boot

tmpfs           3.2G     0  3.2G   0% /run/user/0

[root@centos7-template-10-252 ~]# 

mount 挂载新增磁盘_linux_02

[root@centos7-template-10-252 ~]# fdisk /dev/sdb  

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 table

Building a new DOS disklabel with disk identifier 0xf06bb944.


Command (m for help): n

Partition type:

  p   primary (0 primary, 0 extended, 4 free)

  e   extended

Select (default p): p

Partition number (1-4, default 1):  

First sector (2048-1048575999, default 2048):  

Using default value 2048

Last sector, +sectors or +size{K,M,G} (2048-1048575999, default 1048575999):  

Using default value 1048575999

Partition 1 of type Linux and of size 500 GiB is set


Command (m for help): t

Selected partition 1

Hex code (type L to list all codes): L


0  Empty           24  NEC DOS         81  Minix / old Lin bf  Solaris        

1  FAT12           27  Hidden NTFS Win 82  Linux swap / So c1  DRDOS/sec (FAT-

2  XENIX root      39  Plan 9          83  Linux           c4  DRDOS/sec (FAT-

3  XENIX usr       3c  PartitionMagic  84  OS/2 hidden C:  c6  DRDOS/sec (FAT-

4  FAT16 <32M      40  Venix 80286     85  Linux extended  c7  Syrinx          

5  Extended        41  PPC PReP Boot   86  NTFS volume set da  Non-FS data    

6  FAT16           42  SFS             87  NTFS volume set db  CP/M / CTOS / .

7  HPFS/NTFS/exFAT 4d  QNX4.x          88  Linux plaintext de  Dell Utility    

8  AIX             4e  QNX4.x 2nd part 8e  Linux LVM       df  BootIt          

9  AIX bootable    4f  QNX4.x 3rd part 93  Amoeba          e1  DOS access      

a  OS/2 Boot Manag 50  OnTrack DM      94  Amoeba BBT      e3  DOS R/O        

b  W95 FAT32       51  OnTrack DM6 Aux 9f  BSD/OS          e4  SpeedStor      

c  W95 FAT32 (LBA) 52  CP/M            a0  IBM Thinkpad hi eb  BeOS fs        

e  W95 FAT16 (LBA) 53  OnTrack DM6 Aux a5  FreeBSD         ee  GPT            

f  W95 Ext'd (LBA) 54  OnTrackDM6      a6  OpenBSD         ef  EFI (FAT-12/16/

10  OPUS            55  EZ-Drive        a7  NeXTSTEP        f0  Linux/PA-RISC b

11  Hidden FAT12    56  Golden Bow      a8  Darwin UFS      f1  SpeedStor      

12  Compaq diagnost 5c  Priam Edisk     a9  NetBSD          f4  SpeedStor      

14  Hidden FAT16 <3 61  SpeedStor       ab  Darwin boot     f2  DOS secondary  

16  Hidden FAT16    63  GNU HURD or Sys af  HFS / HFS+      fb  VMware VMFS    

17  Hidden HPFS/NTF 64  Novell Netware  b7  BSDI fs         fc  VMware VMKCORE  

18  AST SmartSleep  65  Novell Netware  b8  BSDI swap       fd  Linux raid auto

1b  Hidden W95 FAT3 70  DiskSecure Mult bb  Boot Wizard hid fe  LANstep        

1c  Hidden W95 FAT3 75  PC/IX           be  Solaris boot    ff  BBT            

1e  Hidden W95 FAT1 80  Old Minix      

Hex code (type L to list all codes): 8e

Changed type of partition 'Linux' to 'Linux LVM'

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

[root@centos7-template-10-252 ~]# 

mount 挂载新增磁盘_linux_03

mount 挂载新增磁盘_centos_04


mount 挂载新增磁盘_linux_05

[root@centos7-template-10-252 ~]# mkfs.xfs /dev/sdb1

meta-data=/dev/sdb1              isize=512    agcount=4, agsize=32767936 blks

        =                       sectsz=512   attr=2, projid32bit=1

        =                       crc=1        finobt=0, sparse=0

data     =                       bsize=4096   blocks=131071744, imaxpct=25

        =                       sunit=0      swidth=0 blks

naming   =version 2              bsize=4096   ascii-ci=0 ftype=1

log      =internal log           bsize=4096   blocks=63999, version=2

        =                       sectsz=512   sunit=0 blks, lazy-count=1

realtime =none                   extsz=4096   blocks=0, rtextents=0

[root@centos7-template-10-252 ~]#

mount 挂载新增磁盘_centos_06





[root@centos7-template-10-252 ~]# mount /dev/sdb1 /data/


[root@centos7-template-10-252 ~]# mount

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime,seclabel)

proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)

devtmpfs on /dev type devtmpfs (rw,nosuid,seclabel,size=16414268k,nr_inodes=4103567,mode=755)

securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)

tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,seclabel)

devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,seclabel,gid=5,mode=620,ptmxmode=000)

tmpfs on /run type tmpfs (rw,nosuid,nodev,seclabel,mode=755)

tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,seclabel,mode=755)

cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)

pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime,seclabel)

cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,net_cls,net_prio)

cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,pids)

cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,cpuset)

cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,memory)

cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,blkio)

cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,devices)

cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,cpu,cpuacct)

cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,perf_event)

cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,freezer)

cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,rdma)

cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,seclabel,hugetlb)

configfs on /sys/kernel/config type configfs (rw,relatime)

/dev/sda2 on / type xfs (rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota)

selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)

systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=31,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=31825)

mqueue on /dev/mqueue type mqueue (rw,relatime,seclabel)

debugfs on /sys/kernel/debug type debugfs (rw,relatime,seclabel)

fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)

hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,seclabel,pagesize=2M)

/dev/sda1 on /boot type xfs (rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota)

tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=3285384k,mode=700)

/dev/sdb1 on /data type xfs (rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota)

mount 挂载新增磁盘_ci_07


[root@centos7-template-10-252 ~]# blkid |grep sdb1

/dev/sdb1: UUID="d2a46df4-6cd4-410f-b4de-b1f7df7bd81c" TYPE="xfs"  

[root@centos7-template-10-252 ~]#

mount 挂载新增磁盘_linux_08



[root@centos7-template-10-252 ~]# vim /etc/fstab  

UUID=d2a46df4-6cd4-410f-b4de-b1f7df7bd81c /data                   xfs     defaults        0 0


[root@centos7-template-10-252 ~]# cat /etc/fstab  

mount 挂载新增磁盘_ci_09

#

# /etc/fstab

# Created by anaconda on Fri Jun  4 07:11:08 2021

#

# 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

#

UUID=12fc9f00-4289-445b-bd9d-0ae59c5c1e83 /                       xfs     defaults        0 0

UUID=2ef61db5-06d4-4617-bdcc-dfa6117cbeb2 /boot                   xfs     defaults        0 0

UUID=d2a46df4-6cd4-410f-b4de-b1f7df7bd81c /data                   xfs     defaults        0 0