Install the second hard disk for the Linux operating system

Source: Internet
Author: User

What should I do if I feel that the hard disk is not enough for a while after installing Linux?

First of all, I would like to remind you that you need to pay attention to the installation of 2nd hard disks in Linux: if it is an IDE hard disk, pay attention to the master and slave disk settings; if it is a SCSI hard disk, select an unused ID. In this example, we will set 2nd new IDE hard disks as slave disks and connect them to the first data cable to see how to install and use 2nd hard disks in Linux.

I. Partitioning

There is no partition for a new hard disk. After it is installed, in Linux, you must use the hard disk partition program fdisk (for example, the Red Flag desktop version) Partition (figure 1 ).

2. After formatting and creating a hard disk partition, execute:

[Root @ work root] # mke2fs/dev/hdb1

Command to format the hard disk.

3. Mount to a directory

After formatting the hard disk, you can use the mount command to mount the hard disk partition to a directory. Create the directory first. If the directory to be mounted Is/disk2, run the "mkdir disk2", "mount/dev hdb1/disk2" commands in sequence to use the new hard disk.

4. automatic mounting upon startup

According to the above operation, each time the machine starts, the mount command must be executed for mounting. This is very troublesome. You can modify the/etc/fstab configuration file (figure 2) enable the machine to automatically mount the hard disk partition at startup.

After modifying the configuration file, restart the computer and the system will automatically mount the partition. So far, you can easily use your 2nd hard disks!

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.