1.fdisk -l 查看整个系统情况
# fdisk -l
Disk /dev/sda: 163.9 GB, 163928604672 bytes
255 heads, 63 sectors/track, 19929 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 19929 159975270 8e Linux LVM
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 2 60801 488376000 f W95 Ext'd (LBA)
/dev/sdb5 2 60801 488375968+ 7 HPFS/NTFS
2.fdisk /dev/sdb 进入分区操作
3.输入P查看情况
4.输入m查看命令行
5.d删除分区
6.n新建分区
7.w保存退出
8. mkfs.ext3 /dev/sdb1 将之格式化成ext3
9. mkdir -p m500 创建一个挂载点
10. mount /dev/sdb1 /m500 创建这个硬盘
11. df -l 结果如下:
文件系统 1K-块 已用 可用 已用% 挂载点
/dev/mapper/VolGroup00-LogVol00
152995780 70511248 74587444 49% /
/dev/sda1 101086 16047 79820 17% /boot
tmpfs 503536 0 503536 0% /dev/shm
/dev/sdb1 480719056 202800 456097056 1% /m500