Linux 挂载磁盘
2018-08-28T09:45:47
首先你要确定需要挂在的磁盘分区
如下命令查看所有磁盘信息
[root@ecs-d6e1-0005 sbin]# fdisk -lfdisk -lDisk /dev/vda: 42.9 GB, 42949672960 bytes, 83886080 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x0008efe4
Device Boot Start End Blocks Id System /dev/vda1 * 2048 83886079 41942016 83 Linux
Disk /dev/vdb: 536.9 GB, 536870912000 bytes, 1048576000 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x8675bd5d
Device Boot Start End Blocks Id System /dev/vdb1 2048 1048575999 524286976 83 Linux
#查看实用信息
df -TH
[root@ecs-d6e1-0005 sbin]# df -TH Filesystem Type Size Used Avail Use% Mounted on /dev/vda1 ext4 43G 2.1G 38G 6% / devtmpfs devtmpfs 4.1G 0 4.1G 0% /dev tmpfs tmpfs 4.2G 0 4.2G 0% /dev/shm tmpfs tmpfs 4.2G 9.0M 4.1G 1% /run tmpfs tmpfs 4.2G 0 4.2G 0% /sys/fs/cgroup /dev/vdb1 ext4 529G 83M 502G 1% /www tmpfs tmpfs 821M 0 821M 0% /run/user/0这里我们看到 vda1 是系统盘
vdb1 是数据盘用来储存数据或其他用途
我们这里已经挂在了
如果你没有挂在则使用
mount /dev/你要挂在的分区 /你要挂在的目录
这里要保证你要挂在的目录存在并且为空