linux下使用ssm存储管理器管理lvm教程
作者:快盘下载 人气:147LVM:将多个硬盘和硬盘分区作为一个逻辑卷,并把这个逻辑卷作为一个整体来统一管理,动态对分区进行扩缩空间大小,安全快捷方便管理。一般都是扩大,很少用到缩小的。
小编建议你使用ssm存储管理器。system-storage-manager,管理起来非常方便。ssm存储管理器的安装使用
ssm命令管理LVM
1.安装ssm | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||
2.检查硬盘和LVM信息 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||
3.将物理磁盘添加到LVM池中 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||
4.查看当前存储池 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||
5.扩大LVM卷 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||
6.查看结果 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||
7.更新文件系统 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||
8.挂载结果 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||
9.创建新的LVM池 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||
10.查看结果 | ||||||||||||||||||||||||||||||||||||||||||||||||||
[root@localhost ~]# ssm list ----------------------------------------------------------- Device Free Used Total Pool Mount point ----------------------------------------------------------- /dev/sda 50.00 GB PARTITIONED /dev/sda1 500.00 MB /boot /dev/sda2 2.02 GB SWAP /dev/sda3 47.50 GB / /dev/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.00 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.00 GB xfs 1014.00 MB 1013.88 MB linear /soft /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 / ---------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||||||||||
11.对LVM卷快照 | ||||||||||||||||||||||||||||||||||||||||||||||||||
[root@localhost ~]# ssm snapshot /dev/mysoft/soft Rounding up size to full physical extent 208.00 MiB Logical volume "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.删除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 | ||||||||||||||||||||||||||||||||||||||||||||||||||
13.查看结果 | ||||||||||||||||||||||||||||||||||||||||||||||||||
[root@localhost ~]# ssm list ----------------------------------------------------------- Device Free Used Total Pool Mount point ----------------------------------------------------------- /dev/sda 50.00 GB PARTITIONED /dev/sda1 500.00 MB /boot /dev/sda2 2.02 GB SWAP /dev/sda3 47.50 GB / /dev/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.00 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.23 MB part /boot /dev/sda3 47.50 GB xfs 47.47 GB 43.87 GB part / ---------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||||||||||
14.删除存储池 | ||||||||||||||||||||||||||||||||||||||||||||||||||
[root@localhost ~]# ssm remove mysoft Volume group "mysoft" successfully removed | ||||||||||||||||||||||||||||||||||||||||||||||||||
15.查看结果 | ||||||||||||||||||||||||||||||||||||||||||||||||||
[root@localhost ~]# ssm list --------------------------------------------------------- Device Free Used Total Pool Mount point --------------------------------------------------------- /dev/sda 50.00 GB PARTITIONED /dev/sda1 500.00 MB /boot /dev/sda2 2.02 GB SWAP /dev/sda3 47.50 GB / /dev/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.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 / ---------------------------------------------------------------------------------- |
加载全部内容