3.再次查看当前分区状态:
[root@aaaa ~]# fdisk -l
Disk /dev/sda: 300.0 GB, 300000000000 bytes
255 heads, 63 sectors/track, 36472 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1305    10482381   83  Linux
/dev/sda2            1306        2610    10482412+  82  Linux swap / Solaris
/dev/sda3            2611       36472   271996515   83  Linux
Disk /dev/hdb: 2147 MB, 2147483648 bytes
16 heads, 63 sectors/track, 4161 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 1 4161 2097112 83 Linux
  可以看出,已经出来了一个/dev/hdb1的新分区。下一步将其格式化,再使用
  4.用mkfs.ext3格式化新分区
[root@aaaa ~]# mkfs.ext3 /dev/hdb1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
262144 inodes, 524278 blocks
26213 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=536870912
16 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Writing inode tables: 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.
  5.挂载使用。
[root@aaaa ~]# mkdir /mnt/hdb1 //新建一个挂载点。
[root@aaaa ~]# mount /dev/hdb1 /mnt/hdb1 //挂载。
[root@aaaa ~]# df -h
文件系统 容量 已用 可用 已用% 挂载点
/dev/mapper/VolGroup00-LogVol00
4.3G 3.6G 487M 89% /
/dev/hda1 99M 12M 82M 13% /boot
tmpfs 125M 0 125M 0% /dev/shm
/dev/hdb1 2.0G 3.0M 1.9G 1% /mnt/hdb1
  6 .开机自动挂载
  三.设置新硬盘开机自动挂载
  在vi /etc/fstab中添加新硬盘的挂载信息.添加下面一行:
  /dev/hdb1 /mnt/hdb1 ext3 defaults 1 2(如果还有一个分区是1 3,以此类推)
  这样,每次开机后,系统会自动将/dev/hdb1挂载到/mnt/hdb1
  #mkfs -t(系统型式) ext3 -c(检查是否有坏轨) /dev/sdb1
  mkfs -t ext3 /dev/sdf1 && mkfs -t ext3 /dev/sdf1(同时格式化连接符 &&)
  批量挂载:
[root@aa-05 /]# mkdir  /data 创建data文件夹
[root@aa-05 /]# ls
bin  boot  data  dev  etc  home  lib  lib64  lost+found  media  mnt  opt  proc  root  sbin  selinux
srv  sys  tmp  usr  var
[root@aa-05 /]# cd data
[root@aa-05 data]# mkdir 0 1 2 3 4 5 6 7 8 9 10 11
[root@aa-05 data]# mount /dev/sdb1 /data/0
echo "/dev/sdb1 /data/0 ext4 defaults 0 0" >>/etc/fstab
echo "/dev/sdc1 /data/1 ext4 defaults 0 0" >>/etc/fstab
echo "/dev/sdd1 /data/2 ext4 defaults 0 0" >>/etc/fstab
echo "/dev/sde1 /data/3 ext4 defaults 0 0" >>/etc/fstab
echo "/dev/sdf1 /data/4 ext4 defaults 0 0" >>/etc/fstab
echo "/dev/sdg1 /data/5 ext4 defaults 0 0" >>/etc/fstab
echo "/dev/sdh1 /data/6 ext4 defaults 0 0" >>/etc/fstab
echo "/dev/sdi1 /data/7 ext4 defaults 0 0" >>/etc/fstab
echo "/dev/sdj1 /data/8 ext4 defaults 0 0" >>/etc/fstab
echo "/dev/sdk1 /data/9 ext4 defaults 0 0" >>/etc/fstab
echo "/dev/sdl1 /data/10 ext4 defaults 0 0" >>/etc/fstab
echo "/dev/sdm1 /data/11 ext4 defaults 0 0" >>/etc/fstab
mount -a
df -lhT