[root@localhost ~]# yum -y install kmod-kvdo vdo
[root@localhost ~]# vdo create --name=storage --device=/dev/sdc --vdoLogicalSize=300G
Creating VDO storage
The VDO volume can address 26 GB in 13 data slabs, each 2 GB.
It can grow to address at most 16 TB of physical storage in 8192 slabs.
If a larger maximum size might be needed, use bigger slabs.
Starting VDO storage
Starting compression on VDO storage
VDO instance 0 volume is ready at /dev/mapper/storage
//--name:vdo卷的名字
//--device:由哪块磁盘进行制作
//--vdoLogicalSize:制作后的设备大小
//查看vdo的详细信息
[root@localhost ~]# vdo status --name=storage
VDO status:
Date: '2023-06-12 09:38:09+08:00'
Node: localhost.localdomain
Kernel module:
Loaded: true
Name: kvdo
Version information:
kvdo version: 6.2.5.72
Configuration:
File: /etc/vdoconf.yml
Last modified: '2023-06-12 09:36:39'
//初始化vdo卷
[root@localhost ~]# mkfs.xfs /dev/mapper/storage
meta-data=/dev/mapper/storage isize=512 agcount=4, agsize=19660800 blks
= sectsz=4096 attr=2, projid32bit=1
= crc=1 finobt=1, sparse=1, rmapbt=0
= reflink=1
data = bsize=4096 blocks=78643200, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0, ftype=1
log =internal log bsize=4096 blocks=38400, version=2
= sectsz=4096 sunit=1 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
//新建挂载目录
[root@localhost ~]# mkdir /storage
//进行挂载
[root@localhost ~]# mount /dev/mapper/storage /storage
//查看设备的使用情况,使用vdostats即可。--human-readable将存储容量自动进位
[root@localhost ~]# vdostats --human-readable
Device Size Used Available Use% Space saving%
/dev/mapper/storage 30.0G 4.0G 26.0G 13% 99%
//查看逻辑存储空间
[root@localhost ~]# df -h | grep storage
/dev/mapper/storage 300G 2.2G 298G 1% /storage
//查看UUID
[root@localhost ~]# blkid /dev/mapper/storage
/dev/mapper/storage: UUID="2b1796c5-40f0-479d-ab38-25f70bce8c79" TYPE="xfs"
[root@localhost ~]# vim /etc/fstab
#
# /etc/fstab
# Created by anaconda on Wed May 31 08:10:50 2023
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
/dev/mapper/rhel-root / xfs defaults 0 0
UUID=bae932c6-13d6-48aa-bff1-0ec581a8ee3c /boot xfs defaults,uquota 0 0
UUID=946E-3D1B /boot/efi vfat umask=0077,shortname=winnt 0 2
/dev/mapper/rhel-home /home xfs defaults 0 0
/dev/mapper/rhel-swap swap swap defaults 0 0
/dev/sdb1 /newFS xfs defaults 0 0
UUID=2b1796c5-40f0-479d-ab38-25f70bce8c79
1280

被折叠的 条评论
为什么被折叠?



