RHEL7 method of using SSM command to manage LVM _linux

Source: Internet
Author: User

1. Install SSM

[root@localhost ~]# yum-y Install System-storage-manager.noarch

2. Check hard drive and LVM information

[root@localhost ~]# sudo SSM list---------------------------------------------------------//physical device Device free Used Total Pool Mount point---------------------------------------------------------/dev/sda 50.00 GB PARTITION     
ED/DEV/SDA1 500.00 mb/boot/dev/sda2 2.02 GB Swap/dev/sda3 47.50 GB/         
/DEV/SDB 4.00 GB 1.00 GB 5.00 GB VG00/DEV/SDC 5.00 GB 0.00 KB 5.00 GB VG00/DEV/SDD 5.00 GB /DEV/SDE 5.00 GB----------------------------------------------------------------------------- --------------------------//Storage pool Type Devices free Used total----------------------------------------------vg0 0 LVM 2 8.99 GB 1.00 GB 9.99 GB------------------------------------------------------------------------------------ 
LVM volumes in the--------------------------------------------//Storage pool Volume pool Volume size FS fs size free Type Mount point ----------------------------------------------------------------------------------/dev/vg00/lv00 vg00 1.00 GB ext2 1.00 GB 957.62 MB Linear /DEV/SDA1 500.00 MB XFS 496.67 MB 406.23 MB part/boot/dev/sda3 47.50 GB XFS 47.47 GB 43.87 GB part/----------------------------------------------------------------------------------

3. Add physical disks to the LVM pool

[Root@localhost ~]# SSM add-p vg00/dev/sdd Physical volume '/DEV/SDD ' successfully created ' volume
 Group "vg00" s Uccessfully Extended

4. View current Storage Pool

[root@localhost ~]# SSM list---------------------------------------------------------Device free Used Total Pool Mount Point---------------------------------------------------------/dev/sda 50.00 GB PARTITIONED/DEV/SDA 1 500.00 mb/boot/dev/sda2 2.02 GB Swap/dev/sda3 47.50 GB//dev/sdb 4      
GB 1.00 GB 5.00 GB VG00/DEV/SDC 5.00 GB 0.00 KB 5.00 GB VG00/DEV/SDD 5.00 GB 0.00 KB 5.00 GB vg00 /DEV/SDE 5.00 GB------------------------------------------------------------------------------- --------------------------Pool Type Devices free Used total------------------------------------------------vg00 LVM 3 13.99 GB 1.00 GB 14.99 GB------------------------------------------------------------------------------------ ----------------------------------------------Volume Pool Volume size FS fs size free Type Mount point-------- --------------------------------------------------------------------------/dev/vg00/lv00 vg00 1.00 GB ext2 1.00 GB 957.62 MB Linear/dev     
/SDA1 500.00 MB XFS 496.67 MB 406.23 MB part/boot/dev/sda3 47.50 GB XFS 47.47 GB 43.87 GB Part/ ----------------------------------------------------------------------------------

5. Expand LVM Volume

[Root@localhost ~]# SSM resize-s +10g/dev/vg00/lv00
fsck from 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
 cessfully 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.

6. View Results

[root@localhost ~]# SSM list---------------------------------------------------------Device free Used Total Pool Mount Point---------------------------------------------------------/dev/sda 50.00 GB PARTITIONED/DEV/SDA 1 500.00 mb/boot/dev/sda2 2.02 GB Swap/dev/sda3 47.50 GB//dev/sdb 0      
KB 5.00 GB 5.00 GB VG00/DEV/SDC 0.00 KB 5.00 GB 5.00 GB VG00/DEV/SDD 3.99 GB 1.01 GB 5.00 GB vg00 /DEV/SDE 5.00 GB------------------------------------------------------------------------------- --------------------------Pool Type Devices free Used total------------------------------------------------vg00 LVM 3 3.99 GB 11.00 GB 14.99 GB------------------------------------------------------------------------------------ ----------------------------------------------Volume Pool Volume size FS fs size free Type Mount point-------- --------------------------------------------------------------------------/dev/vg00/lv00 vg00 11.00 GB ext2 11.00 GB 10.31 GB linear/d      
EV/SDA1 500.00 MB XFS 496.67 MB 406.23 MB part/boot/dev/sda3 47.50 GB XFS 47.47 GB 43.87 GB Part/ ----------------------------------------------------------------------------------

7. Update the file system

[Root@localhost ~]# mke2fs/dev/vg00/lv00

8. Mounting results

[root@localhost ~]# df-ht
file system       type   capacity used available% mount point
/dev/sda3       xfs    48G 3.6G  44G  8%/< C13/>devtmpfs       Devtmpfs 906M   0 906M  0%
/dev tmpfs         tmpfs   914M  80K 914M  1%/ Dev/shm
tmpfs         tmpfs   914M 8.9M 905M  1%/run
tmpfs         tmpfs   914M   0 914M  0% /sys/fs/cgroup
/dev/sda1       xfs    497M 116M 382M  24%/boot
/dev/mapper/vg00-lv00 ext2    11G 5.0M  11G  1%/mnt

9. Create a new LVM pool

[Root@localhost ~]# mkdir/soft
[root@localhost ~]# SSM create-s 1g-n soft--fstype xfs-p] mysoft/dev/sde/soft
   
    //create creation,-s 1G specified size,-n soft file name 、--fstype xfs file System,-p Mysoft Specify the storage pool name,/dev/sde/soft specify which directory on which to Mount
 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
Log   = Internal log      bsize=4096  blocks=2560, version=2
     =            sectsz=512 sunit=0  , Blks
Realtime =none          extsz=4096  blocks=0, rtextents=0
   

10. View Results

[root@localhost ~]# SSM list-----------------------------------------------------------Device free Used Total Po OL Mount Point-----------------------------------------------------------/dev/sda 50.00 GB partitioned/d EV/SDA1 500.00 mb/boot/dev/sda2 2.02 GB Swap/dev/sda3 47.50 GB/d EV/SDB 0.00 KB 5.00 GB 5.00 GB VG00/DEV/SDC 0.00 KB 5.00 GB 5.00 GB VG00/DEV/SDD 3.99 GB 1.01 GB 5.0 0 GB VG00/DEV/SDE 4.00 GB 1.00 GB 5.00 GB Mysoft--------------------------------------------------------- ----------------------------------------------------Pool Type Devices free Used Total-------------------------- ------------------------mysoft LVM 1 4.00 GB 1.00 GB 5.00 GB vg00 LVM 3 3.99 GB 11.00 GB 14.99 GB---------- ----------------------------------------
----------------------------------------------------------------------- -----------------Volume Pool  Volume size FS fs size free Type Mount point-------------------------------------------------------------------- --------------------/dev/vg00/lv00 vg00 11.00 GB ext2 11.00 GB 10.31 GB linear/mnt/dev/mysoft/soft mysoft 1. GB xfs 1014.00 mb 1013.88 MB linear/soft/dev/sda1 500.00 MB XFS 496.67 MB 406.23 MB part/boot/de V/sda3 47.50 GB XFS 47.47 GB 43.87 GB part/----------------------------------------------------------- -----------------------------

11. For LVM Volume snapshots

[Root@localhost ~]# SSM Snapshot/dev/mysoft/soft
 rounding up size to full physical extent 208.00 MiB
 Logical Me "snap20160531t120543" created
[root@localhost ~]# SSM list Snapshots
------------------------------------ ------------------------------------------
Snapshot             Origin Pool  Volume size   size Type 
----- -------------------------------------------------------------------------
/dev/mysoft/snap20160531t120543 Soft  mysoft  208.00 MB 21.30 KB linear
------------------------------------------------------------- -----------------

12. Remove LVM volumes

[Root@localhost ~]# SSM remove/dev/mysoft/soft
Device '/dev/mysoft/soft ' is mounted on '/soft ' Unmount (n/y/q)? Y
do your really want to remove active logical volume snap20160531t120543? [y/n]: y
 Logical Volume "snap20160531t120543" successfully removed do your really
want to remove active Logical Vol. Ume soft? [y/n]: y
 Logical Volume "soft" successfully removed

13. View Results

[root@localhost ~]# SSM list-----------------------------------------------------------Device free Used Total Po OL Mount Point-----------------------------------------------------------/dev/sda 50.00 GB partitioned/d EV/SDA1 500.00 mb/boot/dev/sda2 2.02 GB Swap/dev/sda3 47.50 GB/d EV/SDB 0.00 KB 5.00 GB 5.00 GB VG00/DEV/SDC 0.00 KB 5.00 GB 5.00 GB VG00/DEV/SDD 3.99 GB 1.01 GB 5.0 0 GB VG00/DEV/SDE 5.00 GB 0.00 KB 5.00 GB Mysoft--------------------------------------------------------- ----------------------------------------------------Pool Type Devices free Used Total-------------------------- ------------------------mysoft LVM 1 5.00 GB 0.00 KB 5.00 GB vg00 LVM 3 3.99 GB 11.00 GB 14.99 GB---------- ----------------------------------------
----------------------------------------------------------------------- -----------Volume Pool Volume Size FS FS size free Type Mount point----------------------------------------------------------------------------- -----/dev/vg00/lv00 vg00 11.00 GB ext2 11.00 GB 10.31 GB linear/mnt/dev/sda1 500.00 MB XFS 496.67 MB 406 MB Part/boot/dev/sda3 47.50 GB XFS 47.47 GB 43.87 GB part/------------------------------------- ---------------------------------------------

14. Delete Storage Pool

[Root@localhost ~]# SSM remove Mysoft
 Volume Group "Mysoft" successfully removed

15. View Results

[root@localhost ~]# SSM list---------------------------------------------------------Device free Used Total Pool Mount Point---------------------------------------------------------/dev/sda 50.00 GB PARTITIONED/DEV/SDA 1 500.00 mb/boot/dev/sda2 2.02 GB Swap/dev/sda3 47.50 GB//dev/sdb 0      
KB 5.00 GB 5.00 GB VG00/DEV/SDC 0.00 KB 5.00 GB 5.00 GB VG00/DEV/SDD 3.99 GB 1.01 GB 5.00 GB vg00 /DEV/SDE 5.00 GB------------------------------------------------------------------------------- --------------------------Pool Type Devices free Used total------------------------------------------------vg00 LVM 3 3.99 GB 11.00 GB 14.99 GB------------------------------------------------------------------------------------ ----------------------------------------------Volume Pool Volume size FS fs size free Type Mount point-------- --------------------------------------------------------------------------/dev/vg00/lv00 vg00 11.00 GB ext2 11.00 GB 10.31 GB LINEAR/MNT  /DEV/SDA1 500.00 MB XFS 496.67 MB 406.23 MB part/boot/dev/sda3 47.50 GB XFS 47.47 GB 43.87 GB part /     
----------------------------------------------------------------------------------

The above is a small series for you to bring the RHEL7 use the SSM command to manage the LVM method of all content, I hope that we support the cloud-Habitat Community ~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.