The first step:
Have a certain understanding of the status of the system's current disks. This is going to use the fdisk-l command.
Fdisk-l
As can be seen/dev/sdb/is not partitioned, the following example we are going to partition the/dev/sdb and also to attach it to the Linux directory tree up.
Step Two:
Fdisk/dev/sdb--This means to operate on the/DEV/SDB disk,
As shown, the instructions have entered the Fdisk program; Some of its important operations are
1, p print the current partition information
2. L View available partition types
3, n Create a new partition
4, d Delete a partition
5, T set the type of partition
Step Two: Partition the disk
1. Enter n
The program will indicate whether to create a primary partition (P) or an extended partition (e), and the difference between the two partitions is not mentioned here.
2, enter p is to establish the primary partition
Partition number, the starting sector does not work the default can be, the last sector will be decided by itself this is the space you want to allocate to the partition, such as the allocation of 4G space you want to write +4g; Remember there is a ' + ' sign here.
3. Enter W to write this to disk.
4. Format disk, MKFS.EXT3/DEV/SDB1
5. Mount MOUNT/DEV/SDB1/MNT/SDB1
You can see that the/DEV/SDB1 is not mounted to the Linux directory tree, and we're going to put it up there.
6, if we want to hang up can be so umount/dev/sdb1--that is, with the specified disk partitioning method to complete
It is also possible to do so umount/mnt/sdb1-that is, by specifying a mount point
Linux Disk Partitioning