SAS 硬盘
SATA 硬盘
SSD 硬盘
SCSI 硬盘
IDE 硬盘
你的服务器使用什么磁盘?
SAS 硬盘:
SAS(串行连接 SCSI 接口)
SAS(Serial Attached SCSI),串行连接 SCSI 接口,串行连接小型计算机系统接口。
SAS 是新一代的 SCSI 技术,和现在流行的 Serial ATA(SATA)硬盘相同,都是采用串行技术以获得
更高的传输速度,并通过缩短连结线改善内部空间等。
SAS 的接口技术可以向下兼容 SATA。(技术兼容但是磁盘接口未必一致)
[root@Centos83 ~]# fdisk /dev/sdb
...
Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition 删除分区
g create a new empty GPT partition table
G create an IRIX (SGI) partition table
l list known partition types 显示分区类型
m print this menu 打印帮助菜单
n add a new partition 添加新的分区
o create a new empty DOS partition table
p print the partition table 显示分区表
q quit without saving changes 不保存,退出
s create a new empty Sun disklabel
t change a partition's system id 改变分区类型
u change display/entry units
v verify the partition table
w write table to disk and exit 写分区表信息到硬盘,保存操作并退出
x extra functionality (experts only)
Command (m for help): p -----打印分区表
Command (m for help): n ----新建一个分区
Partition type:
p primary (2 primary, 0 extended, 2 free) p:主分区
e extended e:扩展分区
Select (default p): -- #直接默认
Using default response p
Partition number (1,4, default 1): --- #直接默认
First sector (1230848-41943039, default 1230848): --- #直接默认
Using default value 1230848
Last sector, +sectors or +size{K,M,G} (1230848-41943039, default 41943039): +1G
#输入分区大小
Partition 3 of type Linux and of size 1 GiB is set
Command (m for help): w #保存退出
[root@Centos83 ~]# ls /dev/sdb*
/dev/sdb /dev/sdb1
[root@Centos83 ~]# yum -y install gdisk
[root@Centos83 ~]# gdisk /dev/sdb
。。。
Command (? for help): ? # 查看帮助
b back up GPT data to a file
c change a partition's name
d delete a partition #删除分区
ishow detailed information on a partition
llist known partition types
n add a new partition # 添加一个分区
o create a new empty GUID partition table (GPT)
p print the partition table # 打印分区表
q quit without saving changes # 退出不保存
r recovery and transformation options (experts only)
s sort partitions
t change a partition's type code
v verify disk
w write table to disk and exit # # 写入分区表并退出
x extra functionality (experts only)
? print this menu
Command (? for help): n #新建分区表
Partition number (1-128, default 1): #直接回车
First sector (34-41943006, default = 2048) or {+-}size{KMGTP}:
#直接回车, 从头开始划分空间
Last sector (2048-41943006, default = 41943006) or {+-}size{KMGTP}: +1G
#分配 1G 空间
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300):
#分区类型默认即可
注:8300 Linux filesystem ;8e00 Linux LVM 想查看,可以按 L 来显示
Changed type of partition to 'Linux filesystem'
Command (? for help): p #查看
。。。
Number Start (sector) End (sector) Size Code Name
1 2048 2099199 1024.0 MiB 8300 Linux filesystem
Command (? for help): w #保存
Do you want to proceed? (Y/N): y #确定写入
OK; writing new GUID partition table (GPT) to /dev/sdb.
The operation has completed successfully.
[root@Centos83 ~]# mkfs.xfs /dev/sdb1 #格式化