Newbie School: How to resize the hard disk Of a Linux operating system

Source: Internet
Author: User
Newbie School: Linux operating system hard disk resizing method-general Linux technology-Linux technology and application information, the following is a detailed description. Hard Disk resizing steps, note: The machine must be shut down first, and then inserted into the hard disk, otherwise the machine is not shut down, it will report a group of IO errors.


1. After the machine is started, press F8 to enter the array management. First, view the logical driver to check the number of physical hard disks that exist and the ports occupied, then careate logical driver selects radius [0] [0 + 1] [1] according to actual needs. I select radius [0] and press F8 to save the disk and exit. Note: run delete logical driver in case of an error and then restart the machine.


2. view the existing File System


Df-k

File System 1 K-block used available % mount point

/Dev/cciss/c0d0p1 98747 14994 78654 17%/boot

/Dev/cciss/c0d0p7 21525300 5074728 15357136 25%/home

/Dev/cciss/c0d1p1 70009904 553120 65900456 1%/old


Based on the results, we recommend that you add a new physical device in linux. The device name above is c0d1. From this we can infer that the new device name is c0d2.


3. verify the accuracy of the new device name


Sfdisk-l/dev/cciss/c0d2


Disk/dev/cciss/c0d2: 17433 cylinders, 255 heads, 32 sectors/track


Sfdisk: ERROR: sector 0 does not have an msdos signature

/Dev/cciss/c0d2: unrecognized partition


4. Partition new devices


Fdisk/dev/cciss/c0d2


Command action

A toggle a bootable flag

B edit bsd disklabel

C toggle the dos compatibility flag

D delete a partition

L list known partition types

M print this menu

N add a new partition

O create a new empty DOS partition table

P print the partition table

Q quit without saving changes

S 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-17433, default 1 ):

Using default value 1

Last cylinder or + size or + sizeM or + sizeK (1-17433, default 17433 ):

Using default value 17433


Command (m for help): w

The partition table has been altered!


5. Create a linux File System for the storage device in the new partition: mkfs-t ext3/dev/cciss/c0d2p1


6. overload the file system to the new directory: mount/dev/cciss/c0d2p1 /.


OK. Now your hard disk has been added to the system. You can use the new hard disk. The space is huge.


Note:


A. File Mounting Error. You can use the umount/dev/cciss/c0d2p1/directory to uninstall it.


B. If the array management program cannot find the hard disk and its existing hard disk, the new disk must be a bad disk.
Related Article

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.