Centos 7 mounts a raid 10 hard drive to the Dell R730 Server

Source: Internet
Author: User

Centos 7 mounts a raid 10 hard drive to the Dell R730 Server

The company purchased a new Dell R730 server with two SAS hard disks and four SATA hard disks respectively. SAS hard disks constitute RAID 1 and SATA constitute raid 10. Install Centos 7 on the server and set RAID in the BIOS during installation.

When installing Centos, choose to install the system on the SAS hard disk of RAID 1, and use the SATA hard disk of RAID 10 as the data disk.

After installing and entering Centos, the system is currently only mounted on the SAS hard disk. You also need to partition and format the SATA hard disk and then attach it to the system.

First, run the fdisk-l command to view the system partition information. However, after you press enter, there are no command execution results and no error messages. Later, I suddenly remembered that I didn't use the root user to log on to the system because I didn't use the root permission to execute the command. I immediately used sudo to re-execute the fdisk-l command, and I saw the partition information of the system hard disk. You can see the/dev/sda hard disk, the partition under the hard disk, and the/dev/sdb hard disk. Now I want to partition/dev/sdb and start using the fdisk/dev/sdb command to partition. Later I checked it and thought it would be better to use the gdisk command. Use the sudo gdisk/dev/sdb command to temporarily split the sdb1 partition from/dev/sdb as prompted. The size is half the size of the entire raid 10 space.

After partitioning, You need to format the new partition. We recommend that you use the xfs File System on Centos. Therefore, use the mkfs. xfs/dev/sdb1 command for formatting.

Next, mount the formatted new partition to/home. This requires that the original mount point of/home be unmounted first. Before that, run the tar command to back up data under/home and run the following command: tar-cvf/tmp/home.tar/home, run sudo umount/home, but the system prompts the error "device is busy". This indicates that a process is using/home. Use fuser-m/home to check which process is using the/home directory. It is found that the root directory of the currently logged-on user is under/home because the ssh terminal is used to connect to the server, therefore, You need to log out of the current user and log on as the root user before unmounting/home.

After logging on to the system as a root user, use umount/home to unmount/home, and then use mount/dev/sdb1/home. The mounting is successful. Finally, you need to extract the data backed up in the original/home directory to the/home directory. After trying, you need to execute the following command in the system root directory: tar-xvf/tmp/home.tar home, if you use tar-xvf/tmp/home.tar. or tar-xvf/tmp/home.tar/or tar-xvf/tmp/home.tar/home will prompt/or. or the/home directory does not exist, because the root directory in the compressed package is home.

Now, what is RAID10 partition, formatting, and mounting in Centos has been completed.

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.