Linux about adding hard drives: Notes

Source: Internet
Author: User

Add new Hard drive: Http://note.youdao.com/share/?id=8cf27602cdce36e1d4160f00e9004b00&type=note

Things to add to your hard drive:

First connect the hard disk to physical, then in the shell: if we add the hard disk written to the/etc/fstab file, it is best to use the partition UUID to view the UUID command: [[email protected]~]# DUMPE2FS/DEV/SDB6 | grep UUID
DUMPE2FS 1.41.12 (17-may-2010)
Filesystem uuid:7adfac51-c8fd-4a7d-bf87-b7bf7d777d42 above illustration: UUID is a device unique identification number (can use DUMPE2FS/DEV/SDB6 | grep UUID) to get/dat A mount point is the directory to mount to, to be created in advance, if you now edit/etc/fstab under Vim you can exit Edit mode:! To perform a create command such as View Figure 0.2EXT4 is a mounted partition format this must conform to defaults is the default, we can modify the rwx 1 here to 1 for the backup partition, this option only for the partitioned directory mount point to take effect 0 for unprepared 2 scan excellent First class, there are 0 1 2 where 0 is not scanning 1 for higher priority is generally the root directory normal directory is generally set to 2 figure 0.2: When the setup is complete, use MOUNT-A to load the modified configuration we are here to see if and when the partition is in effect, you can use Df-h or Use Mount View Mount Detail table here to add the format command: [[email protected]~]# mkfs-t EXT4/DEV/SDB4 and fdisk-l See all hard disk conditions and FDISK partition the hard disk FDISK/DEV/SDB the commands inside: M view Help P view existing partition table n create e for extended partition (extended partition only You can create a primary partition number that occupies 1-4) p primary partition (only 4 of the primary partition can be created so their partition number can only be 1-4) L is a logical partition (only if the extended partition is created and the logical partition number is not specified always starts from 5) specify the partition number: (1-4 logical partition without this step) Where does the polygon begin to divide (usually a carriage return this is the beginning sector of the partition do not manually specify) in just how much space can be used (+2g or +2m+1k and other ways to specify the size of the partition) to this setting is done but note (now the partition is not saved now direct exit is not effective) W Save Q Exit After completion of the format Mkfs-t EXT4/DEV/SDB4 or MKFS.EXT4/DEV/SDB4 can then be manually mounted or added to the/etc/fstab file as described above to automatically load the boot, of course we can also mount-t ext4/d Ev/sdb4/data write to the file loaded after the Boot/etc/rc.local command: echo "mount-t ext4/dev/sdb4/data" >>/etc/rc.local The advantage is that the server boot without loading Boot speed boot Complete load failure does not affect server startup disadvantage is: Unable to implement the daily backup of the group puppet

Linux about adding hard drives: Notes

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.