Add a new hard drive to a Linux server

Source: Internet
Author: User
Keywords Servers Linux
Tags aliyun data disk finding hard hard drive how to html

The lack of existing hard disk capacity often haunts the Linux http://www.aliyun.com/zixun/aggregation/13879.html "> system administrator, the most common reason is the ever-expanding number of data and increasing numbers of users, as well as before finding replacements Linux servers must also perform a number of tasks properly.

This article describes how to add a hard disk to a Linux system in two ways. The first way is to move a folder from a full partition to another empty partition, and then link the folder directory to a two-piece hard disk. Alternatively, use the Linux logical Partition Manager (LVM) to merge several partitions into one partition.

On some occasions you will encounter problems adding a new hard drive to a Linux server, perhaps because the existing hard drive is broken or there is no room. To provide more space, this section will tell you how to add a hard disk with only one partition and how to transfer data from a full hard drive to a new hard disk.

Some folders are always crowded: even if you delete all the unwanted data, the Var partition is still full, and you need to add a new hard drive to the system. You can verify by calling command DF, which shows that the other partitions are full and cannot accept new data.

[Root@bigboy tmp]# df-kfilesystem 1k-blocks Used Available use% mounted On/dev/hda3 505636 118224 361307 mainly 101089 14281 81589 15%/bootnone 63028 0 63028 vs/dev/shm/dev/hda5 248895 6613 229432 gros/tmp/dev/hda7 3304768 2720332 416560 87%/usr/dev/hda2 3304768 3300536 4232 99%/var[root@bigboy tmp]#

Refer to Manufacturer's instructions the new hard drive can be added to the system, but you need to know how to do it.

Determine the type of hard disk

Linux stores the names of all known hard disk partitions in the/proc/partitons file. A mirror with a secondary number of 0 for the entire hard disk indicates that all partitions on the hard disk are sorted from 1 to the beginning. In the following example, the system has two hard drives, the hard drive/dev/hda has been divided, and the new hard disk (/DEV/HDB) needs to be set up to receive data.

[Root@bigboy tmp]# cat/proc/partitionsmajor Minor #blocks name 3 0 7334145 hda 3 1 104391 hda1 3 2 1052257 hda2 3 3 2040255 Hda3 3 4 1 hda4 3 5 3582463 hda5 3 6 554211 hda6 0 78150744 hdb[root@bigboy tmp]#

Note: The naming of Linux hard disk devices follows certain standards. The SCSI hard disk starts with the SD and the IDE hard disk begins with HD, and then a single hard drive is determined by one letter, for example, the first hard drive is a, the second is B and the third is C and so on. Finally, a two-digit number determines the partition number. The fifth partition of the fourth IDE drive using this rule should be/dev/hdd5.

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.