1、添加一块硬盘(20G),分1个主分区,3个逻辑分区。

进行分区的命令:
centos7磁盘的分区与挂载
划分主分区:
centos7磁盘的分区与挂载
划分扩展分区:
centos7磁盘的分区与挂载
划分逻辑分区:
centos7磁盘的分区与挂载

2、将主分区格式化为ext4,并挂载到/mnt/sdb1目录下。

[[email protected] ~]# mkfs -t ext4 /dev/sdc1
[[email protected] ~]# mkdir /mnt/sdb1
[[email protected] ~]# cd /mnt/
[[email protected] mnt]# mount -t ext4 /dev/sdc1 /mnt/sdb1
[[email protected] mnt]# df -h /dev/sdc1 查看是否挂载成功
文件系统 容量 已用 可用 已用% 挂载点
/dev/sdc1 5.8G 24M 5.5G 1% /mnt/sdb1

3、将sdb5格式化为ext3,并挂载到/mnt/sdb3目录下为只读。

[[email protected] mnt]# mkfs -t ext3 /dev/sdc5
[[email protected] ~]# mkdir /mnt/sdb3
[[email protected] mnt]# mount -r /dev/sdc5 /mnt/sdb3
[[email protected] mnt]# df -h /mnt/sdb3 查看是否挂载
文件系统 容量 已用 可用 已用% 挂载点
/dev/sdc5 4.8G 11M 4.6G 1% /mnt/sdb3
[[email protected] mnt]# mount | grep sdc5
/dev/sdc5 on /mnt/sdb3 type ext3 (ro ,relatime,seclabel,data=ordered)

相关文章:

  • 2021-10-14
  • 2022-12-23
  • 2021-11-21
  • 2021-11-10
  • 2021-11-06
猜你喜欢
  • 2022-01-10
  • 2022-12-23
  • 2021-12-03
  • 2021-11-21
  • 2021-06-26
  • 2021-09-03
相关资源
相似解决方案