1. view the current hard disk usage:
[[Email protected] _ node1 ~] # DF-H
File System ???? Capacity in use available % mount point
/Dev/sda3 14g 2.4g 11g 19%/
Tmpfs 3.9g 0 3.9g 0%/dev/SHM
/Dev/sda1 504 m 43 m 436 m 9%/boot
2. Check the new hard disk?
??? # Fdisk-l?
?
??? The number of the newly added hard disk is/dev/SDB?
?
3. Hard Disk Partition?
??? 1) In fdisk mode?
??? #/Sbin/fdisk/dev/SDB?
??? 2) Input n to partition?
?
??? 3) Select the partition type?
?
??? There are two options :?
??? P: What is the maximum number of primary partitions in Linux?
??? E: in Linux, only one extended partition can be created. After the extended partition is created, it cannot be used directly. You also need to create a logical partition on the extended partition .?
Here I select P .?
??? 4) How many partitions are selected?
?
Can I select four partitions?
??? 5) set the cylinder. Can I select the default value here?
?
? 6) Input W, write to the partition table, and partition?
?
4. format the partition?
Format the new partition to ex43 file system?
??? 1) What if the primary partition is created?
??? # Mkfs-T ext4? /Dev/sdb1?
5 .?? Attach a hard disk?
??? 1) create a mount point?
??? Create a storage directory under the root directory?
??? # Mkdir/storage?
??? 2) Mount/dev/sdb1 to/storage?
??? # Mount/dev/sdb1? /Storage?
? 6. Set automatic mounting upon startup?
??? The newly created partition cannot be automatically mounted upon startup. It must be manually mounted every time the machine is restarted .?
??? Need to modify the/etc/fstab file to set automatic mounting upon startup?
??? # Vi/etc/fstab?
??? Add a line at the end of the file?
??? /Dev/sdb1/storage ext4 defaults 1 2?