Disk mounting under Linux and using parted to mount disks larger than 2T

  
 

The normal mount disk under Linux uses fdisk, but fdisk does not support GPT partition (MBR partition table only supports 2T disk), so if the disk to be mounted is larger than 2T, you must use parted for GPT disk operation. !

parted is very powerful, both command line and interactive. Entering parted at the prompt will enter interactive mode. If there are multiple disks, you need to run select sdX (X is disk). ) to select the disk, you can also use the parted /dev/sdX to specify the corresponding hard disk ~

The following are two kinds of mounting solutions, all sorted out~

1. Fdisk mount disk 1. Switch to root; 2. Run the command "fdisk /dev/xvdb";3. Enter "n", "p", "1";4. 5. Enter "w", when prompted for Syncing disks., indicates that the partition has been successfully completed; 6. Enter "mkfs.ext4 /dev/xvdb1" format the partition; 7. Enter "mkdir /myidata" Mount the directory 8. Use the "mount /dev/xvdb1 /home " command to mount the partition and use it. 9. vi /etc/fstab press i last line write /dev/xvdb1 /home ext4 defaults 0 0

Second, use parted to mount disk parted /dev/vdc larger than 2T (use part command to 3T Hard disk partition processing) mklabel gpt (3TB can be made in one partition with gpt format) unit TB (setting unit is TB) mkpart logical 0 2 (set to a primary partition, size is 3TB, start is 0, end is 3 Print (display the set partition size) quit (exit parted program) mkfs.ext4 /dev/vdc1 (after executing the above command, use fdisk -l to view the disk that has been divided into good areas) mount /dev/vdc1 /home< Br>

OK.

Copyright © Windows knowledge All Rights Reserved