fdisk /dev/sdc
→进入到新添加的硬盘中
he number of cylinders for this disk is set to 10402.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): e →输入e 再输入d删除分区
第二步:创建分区
fdisk /dev/sdc
à进入到新添加的硬盘中
The number of cylinders for this disk is set to 10402.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): n →创建新分区
Command action
e extended
p primary partition (1-4)
p →创建主分区
Partition number (1-4): 1 →新建的主分区序号
First cylinder (1-10402, default 1): →回车
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-10402, default 10402): →回车
Command (m for help): w →保存创建的主分区
第三步:使新创建的分区在系统中立即生效
partprobe
第四步:格式化新创建的分区
mkfs.ext3 /dev/sdc1
mkfs.ext4 /dev/sdc1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
122400 inodes, 488848 blocks
24442 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67633152
60 block groups
8192 blocks per group, 8192 fragments per group
2040 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 27 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
第五步:使新创建的分区挂载/home/001 目录下
mount /dev/sdc1 /home/001
第六步:让挂载在系统重启后自动挂载
vim /etc/fstab →编辑这个文件,添加上下面的一行,使挂载在重启后有效;
/dev/sdc1 /home/001 ext3 defaults 0 0
发表评论