首页 > 其他 > 详细

centos 多路径下挂载磁盘目录

时间:2021-07-15 17:26:04      阅读:11      评论:0      收藏:0      [点我收藏+]

环境:

OS:Centos 7

 

1.添加磁盘
虚拟机添加磁盘设备,接口类型选择SATA

2.多路径查看磁盘设备
[root@localhost data]# multipath -ll
mpatha (VMware_Virtual_SATA_Hard_Drive_00000000000000000001) dm-0 ATA ,VMware Virtual S
size=5.0G features=‘0‘ hwhandler=‘0‘ wp=rw
`-+- policy=‘service-time 0‘ prio=1 status=active
`- 3:0:0:0 sdb 8:16 active ready running


[root@localhost data]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 40G 0 disk
├─sda1 8:1 0 300M 0 part /boot
├─sda2 8:2 0 2G 0 part [SWAP]
└─sda3 8:3 0 37.7G 0 part /
sdb 8:16 0 5G 0 disk
└─mpatha 253:0 0 5G 0 mpath /data
sr0 11:0 1 1024M 0 rom
sr1 11:1 1 1024M 0 rom


[root@localhost data]# fdisk -l

Disk /dev/sda: 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: 0x000e86af

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 616447 307200 83 Linux
/dev/sda2 616448 4812799 2098176 82 Linux swap / Solaris
/dev/sda3 4812800 83886079 39536640 83 Linux

Disk /dev/sdb: 5368 MB, 5368709120 bytes, 10485760 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 /dev/mapper/mpatha: 5368 MB, 5368709120 bytes, 10485760 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

3.格式化
mkfs.xfs /dev/mapper/mpatha

4.挂载
mount /dev/mapper/mpatha /data

 

centos 多路径下挂载磁盘目录

原文:https://www.cnblogs.com/hxlasky/p/15015349.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!