黑猫配置腾讯云服务器并且挂载2块云盘
#####磁盘ID信息
[root@VM_0_12_centos ~]# ls -l /dev/disk/by-id/
total 0
lrwxrwxrwx 1 root root 9 Nov 1 13:30 ata-QEMU_DVD-ROM_QM00002 -> ../../sr0
lrwxrwxrwx 1 root root 9 Nov 1 13:30 virtio-disk-92d7gzol -> ../../vdc
lrwxrwxrwx 1 root root 9 Nov 1 13:30 virtio-disk-e93joh2z -> ../../vdb
#####查看特殊属性
[root@VM_0_12_centos ~]# sudo file -s /dev/vdb
/dev/vdb: data
#####给vdb分区
[root@VM_0_12_centos ~]# fdisk /dev/vdb
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0xdb31b471.
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): p
Partition number (1-4, default 1):
First sector (2048-104857599, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-104857599, default 104857599):
Using default value 104857599
Partition 1 of type Linux and of size 50 GiB is set
Command (m for help): wq
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
#####查看磁盘
[root@VM_0_12_centos ~]# fdisk -l
Disk /dev/vda: 53.7 GB, 53687091200 bytes, 104857600 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: 0x0005fc9a
Device Boot Start End Blocks Id System
/dev/vda1 * 2048 104857566 52427759+ 83 Linux
Disk /dev/vdb: 53.7 GB, 53687091200 bytes, 104857600 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: 0xdb31b471
Device Boot Start End Blocks Id System
/dev/vdb1 2048 104857599 52427776 83 Linux
Disk /dev/vdc: 10.7 GB, 10737418240 bytes, 20971520 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
#############################################################################
[root@VM_0_12_centos ~]# ls -l /dev/disk/by-id
total 0
lrwxrwxrwx 1 root root 9 Nov 1 13:30 ata-QEMU_DVD-ROM_QM00002 -> ../../sr0
lrwxrwxrwx 1 root root 9 Nov 1 13:59 virtio-disk-92d7gzol -> ../../vdc
lrwxrwxrwx 1 root root 10 Nov 1 13:59 virtio-disk-92d7gzol-part1 -> ../../vdc1
lrwxrwxrwx 1 root root 9 Nov 1 13:56 virtio-disk-e93joh2z -> ../../vdb
lrwxrwxrwx 1 root root 10 Nov 1 13:56 virtio-disk-e93joh2z-part1 -> ../../vdb1
###################挂载实例#########################
[root@VM_0_12_centos ~]# ls -l /dev/disk/by-id/
total 0
lrwxrwxrwx 1 root root 9 Nov 1 14:04 ata-QEMU_DVD-ROM_QM00002 -> ../../sr0
lrwxrwxrwx 1 root root 9 Nov 1 14:04 virtio-disk-92d7gzol -> ../../vdc
lrwxrwxrwx 1 root root 10 Nov 1 14:04 virtio-disk-92d7gzol-part1 -> ../../vdc1
lrwxrwxrwx 1 root root 9 Nov 1 14:04 virtio-disk-e93joh2z -> ../../vdb
lrwxrwxrwx 1 root root 10 Nov 1 14:04 virtio-disk-e93joh2z-part1 -> ../../vdb1
/dev/disk/by-id/virtio-disk-e93joh2z-part1 /www ext4 defaults,nofail 0 2
/dev/disk/by-id/virtio-disk-92d7gzol-part1 /www/backup ext4 defaults,nofail 0 2
累计1,371家企业选择我们,赣州本地最溜的建站公司,建站首选赣州黑猫建站!
閱讀更多 黑貓之家 的文章