1. View the partition information:
[Email protected]/]# fdisk-l
disk/dev/vdb:209.7 GB, 209715200000 bytes
Heads, Sectors/track, 406349 cylinders
Units = Cylinders of 1008 * 516096 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x00000000
2, hard disk partition:
[Email protected]/]# FDISK/DEV/VDB
Command (M for help): M
Command Action
a toggle a bootable flag
b Edit BSD disklabel< br> c Toggle the DOS compatibility flag
d Delete a partition
& nbsp; l list known partition types
m Print this menu
n& nbsp; add a new partition
o Create a new empty DOS partition table
P&nbs p; Print the partition table
q quit without saving changes
s & nbsp Create a new empty Sun Disklabel
t Change a partition ' s system ID
u ; Change display/entry units
v Verify the partition table
w Write Table to disk and exit
x Extra functionality (experts only)
Command (M for help): N
Command Action
E Extended
P primary partition (1-4)
P
Partition number (1-4): 1
First cylinder (1-406349, default 1):
Using Default value 1
Last cylinder, +cylinders or +size{k,m,g} (1-406349, default 406349):
Using Default Value 406349
3. Format the hard drive:
[Email protected]/]# mkfs-t EXT4/DEV/VDB1
4. Mount the hard disk partition:
[Email protected]/]# Mount/dev/vdb1/home
4.1. Unmount the hard disk partition:
[Email protected]/]# Umount/home
5. Add the Mount command to the system startup entry:
[[email protected]]# vim/etc/fstab/dev/vdb1/home ext4 defaults 1 3
[The END]
Linux Add new hard disk and partition, format, mount