Redhat 基础配置之二:格式化

作者:reistlin 发布时间:January 21, 2011 分类:原创文章

作者: reistlin
来源: http://www.reistlin.com/blog/126
更新时间: 2011.01
版权声明: 原创文章.转载请保留作者信息和原文完整.谢绝任何方式的摘要

redhat

Part1:格式化,设备 /dev/sdb1 和 /dev/sdc1 均为主分区(1TB)

1,执行 mkfs.ext3(mkfs -t exe3)命令格式化 /dev/sdb1

[root@reistlin.com ~]# mkfs.ext3 /dev/sdb1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
122109952 inodes, 244190000 blocks
12209500 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
7453 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
        102400000, 214990848
 
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
 
This filesystem will be automatically checked every 32 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

2,执行 mkfs.ext3(mkfs -t exe3)命令格式化 /dev/sdc1

[root@reistlin.com ~]# mkfs.ext3 /dev/sdc1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
122109952 inodes, 244190000 blocks
12209500 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
7453 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
        102400000, 214990848
 
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
 
This filesystem will be automatically checked every 26 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

3,执行 fdisk -l 显示分区表信息,我们可以看到设备 /dev/sdb1 和 /dev/sdc1 均格式化完成,状态正常

[root@reistlin.com ~]# fdisk -l
 
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      121601   976760001   83  Linux
 
Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1      121601   976760001   83  Linux

Part2:格式化命令 mkfs 介绍

1,命令格式:

mkfs -t <磁盘格式> <设备名>

2,磁盘格式:

ext2 ext3 msdos vfat cramfs

3,或者,直接执行相应的磁盘格式化命令:

mkfs.ext2
mkfs.ext3
mkfs.msdos
mkfs.vfat
mkfs.cramfs

Part3:Thanks Old Yang (RHCE) [http://www.oldyang.net]

标签: redhat

评论已关闭