Device Boot Start End Blocks Id System
/dev/sdb1 1 2610 20964793+ 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
5、mkfs命令格式化磁盘
[root@oracle ~]# mkfs.ext4 /dev/sdb
mkfs.ext4: invalid fragment size - /dev/sdb
6、mount命令挂载分区
[root@oracle ~]# mount /dev/sdb /oracle/
You have new mail in /var/spool/mail/root
[root@oracle ~]# df -TH
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda2 ext4 19G 11G 7.3G 60% /
tmpfs tmpfs 2.1G 74k 2.1G 1% /dev/shm
/dev/sda1 ext4 297M 29M 253M 11% /boot
/dev/sdb ext4 22G 47M 20G 1% /oracle
7、添加到/etc/fstab文件下保存退出否则重启后硬盘消失
/dev/sdb /oracle ext4 defaults,noatime 0 0
Linux公社的RSS地址:https://www.linuxidc.com/rssFeed.aspx