Add a new hard disk for linux-general Linux technology-Linux technology and application information. The following is a detailed description. # 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.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service