File partition format and mount

Source: Internet
Author: User

Create a 5G partition, the file system is ext2, the volume is labeled data, the block size is 1024, the reserved administrative space is 8% of the disk partition, mount to the/backup directory, require the use of the volume label to mount, and on the mount when the ACL function on the file system is started;


after the virtual machine has created a hard disk, use the FDISK-L command to see if the system recognizes

Start preparing to partition the hard disk

Enter n, which means creating a new partition

Then you will be prompted to choose E or P, E is to establish an extended partition, p is to establish a primary partition, because the system has 3 primary partitions, so I chose to create an extended partition
Enter E to continue

Then choose the size of the hard disk, here I made a mistake. Because too casual, input +5g, the system immediately told me, do not know g ... and give the correct input format. Linux is strictly case-sensitive, so I changed to +5g. Enter W to save the exit.

Partition complete. Continue to use the FDISK-L command to see if the system is recognized.

Then I'm ready to start formatting the partition, and the system mocks me again.

Remembered that the extended partition is not formatted, and the logical partition under the extended partition is formatted. Helpless to continue to create logical partitions
With Fdisk-l/dev/sdb, this time it's not the same as creating an extended partition.

Using n, the hint is no longer asking whether you are creating an extended partition or a primary partition, but a logical partition and a primary partition. No doubt, enter L, continue. Ibid., select partition size, enter W save to exit.
Use fdisk-l again to view, this time is right.

Enter MKFS-T EXT3/DEV/SDB5 to format the logical partition you just created

Input mke2fs-l data-m 8-b 1024-j/DEV/SDB5

Get ready to work, start mounting, and start the ACL
Mount-o ACL Label=data/backup
Df-h Look at the

No problem, finally set boot up
Enter/etc/fstab with the Vim editor to write the hard drive that was just mounted

Where the first column is mounted hard disk second column mount point third column file system format IV column file system type v column backup time sixth column boot sequence
Save exit, restart to see effects

Normal after reboot.

File partition format and 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.