Linux system mount data disk

  
1. View the data disk before using the partition and formatted data disk, use the “df –h” command to see the data disk. You can use the “fdisk -l” command to view . As shown below: Friendly Tips: If you execute the fdisk -l command and find that no /dev/xvdb indicates that your cloud service has no data disk, then you do not need to mount it. At this time, this tutorial is not applicable to you
2. Partition the data disk to execute the “fdisk /dev/xvdb” command to partition the data disk; according to the prompt, enter “ld”;n”,“p”“1”, two carriage returns, “wq&rdquo ;, the partition will begin and will be completed soon. 3. View the new partition using the “fdisk -l” command to see that the new partition xvdb1 has been created. 4, format the new partition use the "mkfs.ext3 /dev /xvdb1 & rdquo; command to format the new partition, the format time varies according to the size of the hard disk. 5. Add partition information Use the “echo '/dev/xvdb1/mnt ext3defaults00' >> /etc/fstab” command to write new partition information. Then use the “cat /etc/fstab” command to view, the following message appears to indicate that the write was successful. 6. Mount the new partition. Use the mount-a” command to mount the new partition. Then use the “df -h” command to view it. The following information indicates that the mount is successful and you can start using the new partition.
Copyright © Windows knowledge All Rights Reserved