# Fdisk/dev/SDB
Enter the fdisk mode:
Command (M for help): P // view the partition of the New Hard Disk
Command (M for help): N // create a new partition
Command action
E extended // input e to create an extended partition
P primary partition (1-4) // input P to create the primary partition. Here we select P
Partion number (1-4): 1 // The first extended partition, which can be divided into up to four primary partitions as needed
First cylinder (1-1014, default 1): 1 // Number of disks starting from the first primary Partition
Last cylindet or + Siza or + sizem or + sizek: + 1024 MB // number in MB or
Number of disk blocks. Input + MB indicates that the partition size is 1 GB.
Command (M for help): W
The partition table has been altered!
Calling IOCTL () to re-read partition table.
Syncing disks.
# Mkfs-T ext3-C/dev/sdb1 // if multiple partitions exist, change the partition to sdb2.
# Mkdir www // create/WWW directory. We will mount the new partition to www
# Mount/dev/sdb1/www // Mount/dev/sdb1 to/WWW
# DF // use the DF command to view
Filesystem 1k-blocks used available use % mounted on
/Dev/sda2 3771316 1388956 2190788 39%/
/Dev/sda1 101089 9463 86407 10%/boot
None 62988 0 62988 0%/dev/SHM
/Dev/sdb1 485906 8239 452580 2%/www //
As you can see, this is the newly mounted partition.
# Vi/etc/fstab
/Dev/sdb1/WWW ext3 defaults 1 2