Linux fdisk add hard disk, partition, mount, permanently mount

Source: Internet
Author: User

1. SSH Login server:

2. List all drives:

Command: Ll/dev/disk/by-path

I still have a SDA here.

3. Check the disk partition status:

Command: Fdisk-l

The top two sections indicate that I have two physical devices

/DEV/SDA 149.1G (160G HDD Installed)

/dev/mmcblk0 3.7G (motherboard belt 4G, also do not know what it was used to do.) I installed Fedora.)

The third part is the existing one partition situation, mainly is mmcblk0 this piece of disk.

And here's the partitioning information.

SDA has no partition, I cleaned it before loading.

4, to the hard disk partition:

Command: Fdisk device

I'm here, FDISK/DEV/SDA.

Look at the help information, all Chinese.

Enter G to create a GPT partition table

Input p, look at the current partition situation, if your hard disk already has partitions, you can consider d delete

Enter n new, partition number default 1, direct carriage return, first sector (start position) default 2048, direct carriage return, last sector (end position) default maximum last position, direct carriage return.

Prompt to create a new partition with the type "Linux filesystem"

Partition signature also do not know what to do, automatically generated, will not be deleted.

Input p, look at the current partition situation, as I need, this is a data disk, a partition is enough.

Enter W to write the partition table to disk and exit.

OK, this is the end of the partition.

5. Mount Disk to Directory

Linux fdisk add hard disk, partition, mount, permanently mount

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.