Format the new hard disk in centos and set automatic mounting upon startup

Source: Internet
Author: User
Centos format the new hard disk and add a new hard disk to the automatically mounted server when it is started. Only one sdb device can be seen under/dev. As a result, you need to partition, create a file system, and set automatic mounting upon startup. The process is as follows: 1. create a partition using the parted command partition: [plain] # parted/de... centos format the new hard disk and add a new hard disk to the automatically mounted server when it is started. Only one sdb device can be seen under/dev. As a result, you need to partition, create a file system, and set automatic mounting upon startup. The process is as follows: 1. create a partition using the parted command partition: [plain] # parted/dev/sdb (parted) the parameter after mktable gpt (parted) mkpart data 1024KiB-1 (parted print) parted is the device name. The three parameters of the mkpart command are the partition name (starting at will), the start address, and the end address (-1 indicates the end of the block device). the space in front may be used to store partition information, if you do not leave it, you will receive a warning. Print View partition result 2. after the partition is formatted and created, the/dev/sdb1 Partition appears. Use the mkfs command to format the partition: [plain] # mkfs/dev/sdb1 ext4 3. set the boot mount to modify the/etc/fstab file, and add a line at the end: [plain]/dev/sdb1/data ext4 defaults 0 0 each field is partition, Mount point, file format, Mount parameter. The last two generally restart with 0 to see if the settings are successful.
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.