1. view the current hard disk status
Fdisk-l
2. Create a formatting hard disk and create a new partition
Fdisk/dev/sda
Command (m for help ):
N// Create a partition
Command action
E extended
P primary partition (1-4)
P// Create the original Partition
Partition number (1-4 ):1// Partition Number
First cylinder (1-4161, default 1 ):1// Use the default start cylindrical number
Last cylinder or size or sizeM or sizeK (1-4161, default 4161 )://
EnterUse the default end cylindrical number, that is, the partition uses the entire hard disk space.
Command (m for help ):W// Save the partition
3. format the new partition.
Mkfs. ext3/dev/hdb1
4. mount a new partition
Mkdir/mnt/sda1
// Create a mount point.
Mount/dev/sda1/mnt/sda1 // mount.
Df-h
// View the current disk usage
5. automatically mount partitions
Add the mount information of the New Hard Disk in vi/etc/fstab. Add the following line:
/Dev/hdb1/mnt/hdb1 ext3 defaults 1 2(If another partition is 1 3, and so on)