zoukankan      html  css  js  c++  java
  • centos 多路径下挂载磁盘目录

    环境:

    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

  • 相关阅读:
    华为OD机试 :找终点
    华为OD机试 :磁盘容量排序
    剑指Offer-从上到下打印二叉树
    GO语言学习笔记3-int与byte类型转换
    剑指Offer-树的子结构
    LeetCode :21.合并两个有序链表
    LeetCode :206.反转链表
    剑指Offer-删除链表的结点
    剑指Offer-调整数组顺序使奇数位于偶数前面
    如何创建ts+react项目
  • 原文地址:https://www.cnblogs.com/hxlasky/p/15015349.html
Copyright © 2011-2022 走看看