#第二个分区和第三个分区的格式化命令与上面的相同
现在执行保存分区:(对于mount目录的自设置,我是/ root下新创建的alidata文件)
This filesystem will be automatically checked every 23 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. [root@mytest ~]# mkdir alidata/ [root@mytest ~]# mount /dev/sdb1 /root/alidata/ 查看硬盘空间(已经显示刚才挂载的) [root@mytest ~]# df -l Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda3 61522964 1922168 56475600 4% / tmpfs 540092 0 540092 0% /dev/shm /dev/sda1 198337 34099 153998 19% /boot /dev/sdb1 96120588 192176 91045676 1% /root/alidata #可以看到已经被挂载上来 #注:可能在格式化第三个分区的时候会提示如下: [root@mytest ~]# mkfs -t ext4 /dev/sdb3 mke2fs 1.41.12 (17-May-2010) # mkfs.ext4: Device size reported to be zero. Invalid partition specified, or partition table wasn't reread after running fdisk, due to a modified partition being busy and in use. You may need to reboot to re-read your partition table. #提示分区可能出现错误,需要重新启动linux [root@mytest ~]# reboot [root@mytest ~]# mkfs -t ext4 /dev/sdb3 #重启完后继续分区 mke2fs 1.41.12 (17-May-2010) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 61056 inodes, 244224 blocks 12211 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=251658240 8 block groups 32768 blocks per group, 32768 fragments per group 7632 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376 Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done 到止:分区全部完成。
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/dianqi/article-368963-2.html
重要的事情说三遍