CentOS disk partitioning, formatting and mounting external storage methods

Source: Internet
Author: User

1. Divide the primary partition of the external storage:

Assuming that the external storage is recognized as/DEV/SDB in the Linux system, use the FDISK/DEV/SDB to enter the partition tool operator interface.

Press the P key to print the current external storage partition, if displayed as empty, it means that the storage is not partitioned;

Press N to create a new partition and press the P key to create a new primary partition (press the E key to create a new partition). If you are/dev/sdb all resources into a primary partition, type 1 (carriage return), (carriage return), and (carriage return) to create a partitioned table.

Press the W key to exit and save the Fdisk partition tool, at which point the external storage is partitioned into a primary partition named/DEV/SDB1.

2. Format the primary partition

Use the command line MKFS.EXT3/DEV/SDB1 to format/dev/sdb1 as a ext3-formatted partition.

Hint this: Writing superblocks and filesystem accounting information: Enter can

3. Mount Partition

Create Mount Path: Mkdir/mnt/sdb.

Manually mount the/DEV/SDB1 under the/mnt/sdb path: Mount/dev/sdb1/mnt/sdb.

After completing the above steps, the external storage has been mounted to the/mnt/sdb file directory, and users can access the files in the external storage by accessing/MNT/SDB. However, after the system shutdown, the external storage will be automatically uninstalled, the user in the boot system to be manually mounted to the/MNT/SDB

4. Configure system files to automatically mount the external storage when the system starts

Modify the/etc/fstab file at the end of the file in a row, enter "/dev/sdb1/mnt/sdb ext3 defaults 1 1", Save and exit.

CentOS disk partitioning, formatting and mounting external storage methods

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.