Linux OS Add new Hard drive method _unix Linux

Source: Internet
Author: User
#fdisk/dev/sdb

Enter Fdisk mode:

Command (M for help):p//View new hard disk partitions

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 for creating primary partitions, here we select P


Partion Number (1-4): 1//First extended partition, up to 4 primary partitions per your requirement

First Cylinder (1-1014,default 1): 1//number of disk blocks from the beginning of the primary partition

Last Cylindet or +siza or +sizem or +sizek: +1024MB//Can be a number in megabytes or


The number of disk blocks, and the input +1024MB indicates a partition size of 1G.


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 there are multiple partitions, the partition is modified to SDB2 so


#mkdir www//Create/www directory, we will link the new partition to www

#mount/dev/sdb1/www///DEV/SDB1 mount to/www

# DF//With 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/

See, this is just the new mount partition.


#vi/etc/fstab

/dev/sdb1/www ext3 Defaults 1 2

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.