• Linux 命令【8】:ssm


    一、简介


    用于检查关于可用硬驱和LVM卷的信息。显示关于现有磁盘存储设备、存储池、LVM卷和存储快照的信息。

    二、命令详解


    安装

    yum -y install system-storage-manager
    
    • 1

    三、常用实例演示


    3.1 查看

    # 显示物理设备、存储池、存储池中的LVM卷的详细信息
    ssm list
    # 显示存储设备
    ssm list dev
    # 显示vg卷组
    ssm list pool
    # 显示lvm卷组
    ssm list vol
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8

    3.2 添加磁盘到VG中扩容

    [root@localhost ~]# ssm add -p vg00 /dev/sdd
     Physical volume "/dev/sdd" successfully created
     Volume group "vg00" successfully extended
    
    • 1
    • 2
    • 3

    3.3 LVM卷扩容

    [root@localhost ~]# ssm resize -s +10G /dev/vg00/lv00
    fsck,来自 util-linux 2.23.2
    /dev/mapper/vg00-lv00: 11/65536 files (0.0% non-contiguous), 4763/262144 blocks
     Extending logical volume lv00 to 11.00 GiB
     Logical volume lv00 successfully resized
    resize2fs 1.42.9 (28-Dec-2013)
    Resizing the filesystem on /dev/mapper/vg00-lv00 to 2883584 (4k) blocks.
    The filesystem on /dev/mapper/vg00-lv00 is now 2883584 blocks long.
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8

    3.4 创建新的VG

    [root@localhost ~]# mkdir /soft
    [root@localhost ~]# ssm create -s 1G -n soft --fstype xfs -p mysoft /dev/sde /soft 
    //create创建、-s 1G指定大小、-n soft文件名称、--fstype xfs文件系统、-p mysoft指定VG名称、/dev/sde /soft指定那块磁盘挂载哪个目录上
     Physical volume "/dev/sde" successfully created
     Volume group "mysoft" successfully created
     Logical volume "soft" created
    meta-data=/dev/mysoft/soft    isize=256  agcount=4, agsize=65536 blks
         =            sectsz=512  attr=2, projid32bit=1
         =            crc=0
    data   =            bsize=4096  blocks=262144, imaxpct=25
         =            sunit=0   swidth=0 blks
    naming  =version 2       bsize=4096  ascii-ci=0 ftype=0
    log   =internal log      bsize=4096  blocks=2560, version=2
         =            sectsz=512  sunit=0 blks, lazy-count=1
    realtime =none          extsz=4096  blocks=0, rtextents=0
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15

    3.5 删除LVM卷

    [root@localhost ~]# ssm remove /dev/mysoft/soft
    Device '/dev/mysoft/soft' is mounted on '/soft' Unmount (N/y/q) ? Y
    Do you really want to remove active logical volume snap20160531T120543? [y/n]: y
     Logical volume "snap20160531T120543" successfully removed
    Do you really want to remove active logical volume soft? [y/n]: y
     Logical volume "soft" successfully removed
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6

    3.6 删除VG

    [root@localhost ~]# ssm remove mysoft
     Volume group "mysoft" successfully removed
    
    • 1
    • 2
  • 相关阅读:
    CentOS7 —— yum安装mysql
    axios传递数组格式参数
    腾讯会议如何在Linux下的安装与使用
    ABP - 依赖注入(1)
    智能决策:数字孪生的商业洞察
    MATLAB中deg2rad和rad2deg函数的使用
    SpringBoot整合Redis - @Cacheable 和 RedisTemplate
    docker部署oracle 19c
    【Mac】鼠标控制\移动\调整窗口大小BBT|边缘触发调整音量\切换桌面
    测试.net开源敏感词检测库ToolGood.Words
  • 原文地址:https://blog.csdn.net/focus_lyh/article/details/126300701