background A new server was added in the company, and a 2T hard disk was mounted. After logging in through ssh, it was found that it was not mounted. What should I do? (I don’t want to go to Baidu every time to find out how to mount it, so I’ll sort it out) View Status # Check the disk status and find a new disk /dev/vdb fdisk -l Disk /dev/vda: 42.9 GB, 42949672960 bytes 255 heads, 63 sectors/track, 5221 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x0006b766 Device Boot Start End Blocks Id System /dev/vda1 * 1 5222 41942016 83 Linux Disk /dev/vdb: 2147.5 GB, 2147483648000 bytes 16 heads, 63 sectors/track, 4161015 cylinders Units = cylinders of 1008 * 512 = 516096 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xb9876eee # Use lsblk to view [root@ecs-9054 tmp]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT vda 252:0 0 40G 0 disk └─vda1 252:1 0 40G 0 part / vdb 252:16 0 2T 0 disk # View the format [root@ecs-9054 tmp]# lsblk -f NAME FSTYPE LABEL UUID MOUNTPOINT vd └─vda1 ext4 e10f3c70-e806-4633-a7cb-3d5aa3d9df5e / vdb Partitioning and formatting # Partition the data disk. Follow the prompts and enter: n, p, 1, press Enter twice, wq # Enter n to add a new partition # Enter p to create a new primary partition # Specify the partition number, just enter 1 # Specify the starting sector, the default is fine, it is not recommended to change # Specify the ending sector, which represents the partition size. You can use K, M, G to specify the partition size. By default, all are allocated fdisk /dev/vdb # Now find the newly added /dev/vdb1 fdisk -l # Format the specified partition mkfs.ext4 /dev/vdb1 Mount # Temporarily mount the partition, which will become invalid after reboot # Mount it in the /data directory mount /dev/vdb1 /data # Unmount /data # Permanent mount: Write new partition information # The first partition to be mounted, such as /dev/sdb1 # The mount point of the second partition, for example, mount it to /root/RepositoryDisk# The format of the third partition should be the same as the format specified when you formatted the partition yourself# For the fourth partition, just defaults and keep it consistent with the system# For the fifth partition, keep it consistent with the system, just enter 0# For the sixth partition, keep it consistent with the system, just enter 0# # Append the following text to the /etc/fstab file echo /dev/vdb1 /data ext4 defaults,noatime 0 0 >> /etc/fstab The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Mysql optimization techniques for querying dates based on time
>>: Detailed explanation of object literals in JS
The requirement is to pass in the rating data for...
First install the dependent packages to avoid pro...
<br />According to statistics, the average s...
Flash enabled designers and developers to deliver...
Overview The fundamental difference between async...
We simply need to open any text editor, copy the f...
Design Intentions When developing a page, you oft...
1. Command Introduction nl (Number of Lines) adds...
Application scenarios: One of the new requirement...
Effect screenshots: Implementation code: Copy code...
This article mainly introduces the sql serial num...
This article uses examples to explain the knowled...
Open the folder C:\web\mysql-8.0.11 that you just...
This database query statement is one of 50 databa...
Preface: Because many business tables use design ...