4⽉份⽉考题

4⽉份⽉考题

1.恢复快照⾄最⼩化安装的系统,然后配置阿⾥云 yum源,包括基础源和epel源,请写出详细步骤。

[root@SYL4 ~]# cd /etc/yum.repos.d/
[root@SYL4 yum.repos.d]# ls
[root@SYL4 yum.repos.d]# curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-100  2495  100  2495    0     0   6012      0 --:--:-- --:--:-- --:--:--  6026
[root@SYL4 yum.repos.d]# sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo
[root@SYL4 yum.repos.d]# 
yum install -y https://mirrors.aliyun.com/epel/epel-release-latest-8.noarch.rpm
[root@SYL4 yum.repos.d]# sed -i 's|^#baseurl=https://download.example/pub|baseurl=https://mirrors.aliyun.com|' /etc/yum.repos.d/epel*
[root@SYL4 yum.repos.d]# sed -i 's|^metalink|#metalink|' /etc/yum.repos.d/epel*
[root@SYL4 yum.repos.d]# yum clean all
Failed to set locale, defaulting to C.UTF-8
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

18 files removed
[root@SYL4 yum.repos.d]# 
[root@SYL4 yum.repos.d]# yum makecache
[root@SYL4 yum.repos.d]# yum makecache
Failed to set locale, defaulting to C.UTF-8
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

CentOS-8.5.2111 - Base - mirr 1.4 MB/s | 4.6 MB     00:03    
CentOS-8.5.2111 - Extras - mi  57 kB/s |  10 kB     00:00    
CentOS-8.5.2111 - AppStream - 2.3 MB/s | 8.4 MB     00:03    
Extra Packages for Enterprise 1.8 MB/s |  11 MB     00:06    
Extra Packages for Enterprise 658 kB/s | 1.0 MB     00:01    
Metadata cache created.
[root@SYL4 yum.repos.d]# yum list all
[root@SYL4 yum.repos.d]# ls
CentOS-Base.repo   epel-testing-modular.repo  epel.repo
epel-modular.repo  epel-testing.repo          redhat.repo
[root@SYL4 yum.repos.d]# cd

2.编译安装apache,设置开机⾃动启动,并配置2个 虚拟主机,分别为www.example.com和blog.example.com ,www.example.com的主⻚内容 为“www test page”, blog.example.com的主⻚内容 为"blog test page",要求能够使⽤域名访问,请写出 详细步骤。

2.1 下载httpd

[root@SYL4 ~]# wget https://downloads.apache.org/httpd/httpd-2.4.53.tar.gz https://downloads.apache.org/apr/apr-1.7.0.tar.gz https://downloads.apache.org/apr/apr-util-1.6.1.tar.gz
[root@SYL4 ~]# ls
anaconda-ks.cfg   apr-util-1.6.1.tar.gz
apr-1.7.0.tar.gz  httpd-2.4.53.tar.gz
[root@SYL4 ~]# tar xf apr-1.7.0.tar.gz 
[root@SYL4 ~]# tar xf apr-util-1.6.1.tar.gz 
[root@SYL4 ~]# tar xf httpd-2.4.53.tar.gz 
[root@SYL4 ~]# 

2.2 创建Apache的组

[root@SYL4 ~]# useradd -r -M -s /sbin/nologin apache
[root@SYL4 ~]# id apache
uid=995(apache) gid=992(apache) groups=992(apache)
[root@SYL4 ~]# 

2.3 安装开发工具包

[root@SYL4 ~]# yum groups mark install "Development Tools"
Failed to set locale, defaulting to C.UTF-8
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

Last metadata expiration check: 0:04:19 ago on Mon Apr 25 20:33:51 2022.
Dependencies resolved.
==============================================================
 Package       Architecture Version       Repository     Size
==============================================================
Installing Groups:
 Development Tools
                                                             

Transaction Summary
==============================================================

Is this ok [y/N]: y
Complete!
[root@SYL4 ~]# 

2.4 安装所需要的包

[root@SYL4 ~]# yum -y install openssl-devel pcre-devel expat-devel libtool make gcc-c++ gcc

2.5 预编译apr apr-util

[root@SYL4 ~]# cd apr-1.7.0
[root@SYL4 apr-1.7.0]# vim configure
[root@SYL4 apr-1.7.0]# cat configure|grep cfgfile
    cfgfile=${ofile}T
    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
#    $RM "$cfgfile"
    cat <<_LT_EOF >> "$cfgfile"
    cat <<'_LT_EOF' >> "$cfgfile"
    cat <<\_LT_EOF >> "$cfgfile"
  sed '$q' "$ltmain" >> "$cfgfile" \
     || (rm -f "$cfgfile"; exit 1)
   mv -f "$cfgfile" "$ofile" ||
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
[root@SYL4 apr-1.7.0]# 
[root@SYL4 apr-1.7.0]# ./configure --prefix=/usr/local/apr
[root@SYL4 apr-1.7.0]# make -j 4
[root@SYL4 apr-1.7.0]# make install


[root@SYL4 ~]# cd apr-util-1.6.1
[root@SYL4 apr-util-1.6.1]# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
[root@SYL4 apr-util-1.6.1]# make install
root@SYL4 apr-util-1.6.1]# make -j 4

2.6 编译安装httpd

[root@SYL4 ~]# cd httpd-2.4.53
[root@SYL4 httpd-2.4.53]# ./configure --prefix=/usr/local/apache \
> --enable-so \
> --enable-ssl \
> --enable-cgi \
> --enable-rewrite \
> --with-zlib \
> --with-pcre \
> --with-apr=/usr/local/apr \
> --with-apr-util=/usr/local/apr-util/ \
> --enable-modules=most \
> --enable-mpms-shared=all \
> --with-mpm=prefork

[root@SYL4 httpd-2.4.53]# make -j 4
[root@SYL4 httpd-2.4.53]# make install

2.7 设置头文件,环境变量,man文档

[root@SYL4 ~]# echo 'export PATH=/usr/local/apache/bin:$PATH' > /etc/profile.d/apache.sh
[root@SYL4 ~]# source /etc/profile.d/apache.sh
[root@SYL4 ~]# which apache
/usr/bin/which: no apache in (/usr/local/apache/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)
[root@SYL4 ~]# which httpd
/usr/local/apache/bin/httpd
[root@SYL4 ~]# ln -s /usr/local/apache/include /usr/include/apache
[root@SYL4 ~]# cd /usr/local/apache/
[root@SYL4 apache]# ls
bin    cgi-bin  error   icons    logs  manual
build  conf     htdocs  include  man   modules
[root@SYL4 apache]# vim /etc/man_db.conf 
[root@SYL4 apache]# cat /etc/man_db.conf |grep apache
MANDATORY_MANPATH                       /usr/local/apache/man
[root@SYL4 apache]# 

2.8 配置文件并且设置开机自启

[root@SYL4 ~]# systemctl disable --now firewalld
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@SYL4 ~]# cd /usr/lib/systemd/system
[root@SYL4 system]# cp sshd.service httpd.service 
[root@SYL4 system]# vim httpd.service 
[root@SYL4 system]# systemctl daemon-reload
[root@SYL4 system]# cd
[root@SYL4 ~]# systemctl enable --now httpd
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.
[root@SYL4 ~]# systemctl status httpd
● httpd.service - httpd server daemon
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; ena>
   Active: active (running) since Mon 2022-04-25 21:05:33 CST>
  Process: 186993 ExecStart=/usr/local/apache/bin/apachectl s>
 Main PID: 188037 (httpd)
    Tasks: 6 (limit: 11216)
   Memory: 4.3M
   CGroup: /system.slice/httpd.service
           ├─188037 /usr/local/apache/bin/httpd -k start
           ├─188680 /usr/local/apache/bin/httpd -k start
           ├─188681 /usr/local/apache/bin/httpd -k start
           ├─188682 /usr/local/apache/bin/httpd -k start
           ├─188683 /usr/local/apache/bin/httpd -k start
           └─188684 /usr/local/apache/bin/httpd -k start

Apr 25 21:05:17 SYL4 systemd[1]: Starting httpd server daemon>
Apr 25 21:05:33 SYL4 apachectl[186993]: AH00558: httpd: Could>
Apr 25 21:05:33 SYL4 systemd[1]: Started httpd server daemon.
[root@SYL4 ~]# 

2.9 创建文件内容

[root@SYL4 ~]# cd /usr/local/apache/htdocs/
[root@SYL4 htdocs]# ls
index.html
[root@SYL4 htdocs]# mkdir www.example.com
[root@SYL4 htdocs]# mkdir blop.example.com
[root@SYL4 htdocs]# cd www.example.com
[root@SYL4 www.example.com]# ls
[root@SYL4 www.example.com]# echo 'www test page' > index.html
[root@SYL4 www.example.com]# cd
[root@SYL4 ~]# cd /usr/local/apache/htdocs/
[root@SYL4 htdocs]# ls
blop.example.com  index.html  www.example.com
[root@SYL4 htdocs]# rm -rf blop.example.com
[root@SYL4 htdocs]# mkdir blog.example.com
[root@SYL4 htdocs]# cd blog.example.com
[root@SYL4 blog.example.com]# echo 'blog test page' > index.html
[root@SYL4 blog.example.com]# cd
[root@SYL4 ~]# 

2.9.1 配置虚拟主机

[root@SYL4 conf]# cd extra/
[root@SYL4 extra]# ls
httpd-autoindex.conf  httpd-mpm.conf
httpd-dav.conf        httpd-multilang-errordoc.conf
httpd-default.conf    httpd-ssl.conf
httpd-info.conf       httpd-userdir.conf
httpd-languages.conf  httpd-vhosts.conf
httpd-manual.conf     proxy-html.conf
[root@SYL4 extra]# vim httpd-vhosts.conf 
[root@SYL4 extra]# cat httpd-vhosts.conf 
<VirtualHost *:80>
    DocumentRoot "/usr/local/apache/htdocs/www.example.com"
    ServerName www.example.com
    ErrorLog "logs/www.example.com-error_log"
    CustomLog "logs/www.example.com-access_log" common
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "/usr/local/apache/htdocs/blog.example.com"
    ServerName blog.example.com
    ErrorLog "logs/blog.example.com-error_log"
    CustomLog "logs/blog.example.com-access_log" common
</VirtualHost>

[root@SYL4 extra]# 

2.9.2 重启服务

[root@SYL4 ~]# systemctl restart httpd
[root@SYL4 ~]# systemctl status httpd
● httpd.service - httpd server daemon
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; ena>
   Active: active (running) since Mon 2022-04-25 21:22:40 CST>
  Process: 256862 ExecStop=/usr/local/apache/bin/apachectl st>
  Process: 257892 ExecStart=/usr/local/apache/bin/apachectl s>
 Main PID: 258966 (httpd)
    Tasks: 6 (limit: 11216)
   Memory: 4.3M
   CGroup: /system.slice/httpd.service
           ├─258966 /usr/local/apache/bin/httpd -k start
           ├─259650 /usr/local/apache/bin/httpd -k start
           ├─259651 /usr/local/apache/bin/httpd -k start
           ├─259652 /usr/local/apache/bin/httpd -k start
           ├─259653 /usr/local/apache/bin/httpd -k start
           └─259654 /usr/local/apache/bin/httpd -k start

Apr 25 21:22:25 SYL4 systemd[1]: Starting httpd server daemon>
Apr 25 21:22:40 SYL4 apachectl[257892]: AH00558: httpd: Could>
Apr 25 21:22:40 SYL4 systemd[1]: Started httpd server daemon.
[root@SYL4 ~]# ss -antl
State  Recv-Q Send-Q   Local Address:Port   Peer Address:Port Process                                                       
LISTEN 0      128            0.0.0.0:22          0.0.0.0:*                                                                  
LISTEN 0      128                  *:80                *:*                                                                  
LISTEN 0      128               [::]:22             [::]:*                                                                  
[root@SYL4 ~]# 

2.9.3 做映射关系

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-ZQgwXX55-1681433245444)(C:/Users/Administrator/AppData/Roaming/Typora/typora-user-images/image-20220425212814296.png)]

2.9.4 配置主配置文件取消注释让他包含你所配置的文件

[root@SYL4 ~]# cd /usr/local/apache/conf/
[root@SYL4 conf]# ls
extra  httpd.conf  magic  mime.types  original
[root@SYL4 conf]# vim httpd.conf 
[root@SYL4 conf]# cat httpd.conf |grep vhosta
[root@SYL4 conf]# cat httpd.conf |grep vhosts
Include conf/extra/httpd-vhosts.conf
[root@SYL4 conf]# 
[root@SYL4 ~]# systemctl restart httpd
[root@SYL4 ~]# ss -antl
State  Recv-Q Send-Q   Local Address:Port   Peer Address:Port Process                                                       
LISTEN 0      128            0.0.0.0:22          0.0.0.0:*                                                                  
LISTEN 0      128                  *:80                *:*                                                                  
LISTEN 0      128               [::]:22             [::]:*                                                                  
[root@SYL4 ~]# 

2.9.5 访问

1. www

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-sW5fRW43-1681433245445)(C:/Users/Administrator/AppData/Roaming/Typora/typora-user-images/image-20220425213625738.png)]

2. blog

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-dLVJ4OEF-1681433245445)(C:/Users/Administrator/AppData/Roaming/Typora/typora-user-images/image-20220425213656358.png)]

3.根据下列要求创建⽤户及组账号:

  • 1)名为admins的组
  • 2)⽤户harry,其附属组为admins
  • 3)⽤户natasha,其附属组还属于admins
  • 4)⽤户alice,没有可交互的登录Shell,且不属于admins组 5) harry 、natasha 、alice的密码都应该是redhat
[root@SYL4 ~]# groupadd admins
[root@SYL4 ~]# useradd -G admins harry
[root@SYL4 ~]# useradd -G admins natasha
[root@SYL4 ~]# useradd -s /sbin/nologin alice
[root@SYL4 ~]# echo 'redhat' |passwd --stdin harry
Changing password for user harry.
passwd: all authentication tokens updated successfully.
[root@SYL4 ~]# echo 'redhat' |passwd --stdin natasha
Changing password for user natasha.
passwd: all authentication tokens updated successfully.
[root@SYL4 ~]# echo 'redhat' |passwd --stdin alice
Changing password for user alice.
passwd: all authentication tokens updated successfully.
[root@SYL4 ~]# 

4.配置计划任务,以⽤户harry的身份每5分钟执⾏⼀ 次命令 echo wangqing 。

[root@SYL4 ~]# which echo
/usr/bin/echo
[root@SYL4 ~]# 
[root@SYL4 ~]# su - harry
[harry@SYL4 ~]$ crontab -e
no crontab for harry - using an empty one
crontab: installing new crontab
[harry@SYL4 ~]$ crontab -l
*/5 * * * * /usr/bin/echo wangqing
[harry@SYL4 ~]$ 

5.创建具有以下特点的共⽤⽬录:

  1. /home/tools的所有组是admins 2)此⽬录能被admins组的成员读取、写⼊和访问,除root外其他⽤户没 有这些权限 3)在此⽬录下创建的⽂件,其组的所有权⾃动设置为admins组
[root@SYL4 ~]# mkdir /home/tools
[root@SYL4 ~]# chown .admins /home/tools
[root@SYL4 ~]# chmod 770 /home/tools
[root@SYL4 ~]# ll /home/tools/
total 0
[root@SYL4 ~]# cd /home/tools/
[root@SYL4 tools]# ll
total 0
[root@SYL4 tools]# ll -d
drwxrwx---. 2 root admins 6 Apr 25 21:39 .
[root@SYL4 tools]# cd
[root@SYL4 ~]# chmod g+s /home/tools
[root@SYL4 ~]# ll -d /home/tools/
drwxrws---. 2 root admins 6 Apr 25 21:39 /home/tools/
[root@SYL4 ~]# 

6.将⽂件/etc/fstab复制到/var/tmp/,并按要求配 置/var/tmp/fstab的权限:

  • 1)⽂件/var/tmp/fstab属于root⽤户
  • 2)⽂件/var/tmp/fstab属于root组
  • 3)任何⽤户对/var/tmp/fstab都没有可执⾏权限
  • 4)⽤户harry能够读取和写⼊/var/tmp/fstab⽂件
  • 5)⽤户natasha⽆法读取或写⼊/var/tmp/fstab⽂件
  • 6)所有其他⽤户(包括未来创建的⽤户)能够读取/var/tmp/fstab⽂件
[root@SYL4 ~]# cp /etc/fstab /var/tmp/
[root@SYL4 ~]# chown root:root /var/tmp/fstab 
[root@SYL4 ~]# 
[root@SYL4 ~]# ll /var/tmp/fstab 
-rw-r--r--. 1 root root 579 Apr 25 21:44 /var/tmp/fstab
[root@SYL4 ~]# 
[root@SYL4 ~]# setfacl -m u:harry:rw /var/tmp/fstab 
[root@SYL4 ~]# setfacl -m u:natasha:--- /var/tmp/fstab 
[root@SYL4 ~]# setfacl -m u::r /var/tmp/fstab 
[root@SYL4 ~]# getfacl /var/tmp/fstab 
getfacl: Removing leading '/' from absolute path names
# file: var/tmp/fstab
# owner: root
# group: root
user::r--
user:harry:rw-
user:natasha:---
group::r--
mask::rw-
other::r--

[root@SYL4 ~]# 

7.创建⽤户wangqing,其⽤户ID为2020,此⽤户的 密码应当是redhat 。

[root@SYL4 ~]# useradd -u 2020 wangqing
[root@SYL4 ~]# echo 'redhat'|passwd --stdin wangqing
Changing password for user wangqing.
passwd: all authentication tokens updated successfully.
[root@SYL4 ~]# id wangqing
uid=2020(wangqing) gid=2020(wangqing) groups=2020(wangqing)
[root@SYL4 ~]# 

8.找出/etc/⽬录下⼤⼩超过5MB的⽂件,并将其复制 到/root/findfiles⽬录下。

[root@SYL4 ~]# mkdir /root/findfiles 
[root@SYL4 ~]# find /etc -size +5M
/etc/udev/hwdb.bin
/etc/selinux/targeted/policy/policy.31
[root@SYL4 ~]# cp /etc/udev/hwdb.bin /root/findfiles
[root@SYL4 ~]# cp /etc/selinux/targeted/policy/policy.31 /root/findfiles
[root@SYL4 ~]# 

9.创建⼀个名为/root/backup.tar.bz2的tar归档,其应 该包含/usr/local/的内容。此归档⽂件必须使⽤bzip2 进⾏压缩。

[root@SYL4 ~]# yum -y install bzip2
[root@SYL4 ~]# tar -jcf /root/backup.tar.bz2 /usr/local/
tar: Removing leading `/' from member names
[root@SYL4 ~]# ls
anaconda-ks.cfg   apr-util-1.6.1         findfiles
apr-1.7.0         apr-util-1.6.1.tar.gz  httpd-2.4.53
apr-1.7.0.tar.gz  backup.tar.bz2         httpd-2.4.53.tar.gz
[root@SYL4 ~]# file backup.tar.bz2 
backup.tar.bz2: bzip2 compressed data, block size = 900k
[root@SYL4 ~]# 

10.配置lvm逻辑卷,要求如下:

  • 1)预先创建2GiB的分区/dev/sdb1,并⽤于创建卷组testvg

  • 2)创建⼤⼩为200MiB的逻辑卷/dev/testvg/vo,格式化为xfs⽂件系统, 并挂载在/mnt/vo上

  • 3)将逻辑卷/dev/testvg/vo及其⽂件系统⼤⼩调整300MiB,确保⽂件系统内容保持不变。

[root@SYL4 ~]# fdisk /dev/sdb

Welcome to fdisk (util-linux 2.32.1).
Changes will remain in memory only, until you decide to write [root@SYL4 ~]# fdisk /dev/sdb

Welcome to fdisk (util-linux 2.32.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0xefe73080.

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): 

Using default response p.
Partition number (1-4, default 1): 
First sector (2048-41943039, default 2048): 
Last sector, +sectors or +size{K,M,G,T,P} (2048-41943039, default 41943039): +2G

Created a new partition 1 of type 'Linux' and of size 2 GiB.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

[root@SYL4 ~]# vgcreate testvg /dev/sdb1
  Physical volume "/dev/sdb1" successfully created.
  Volume group "testvg" successfully created
[root@SYL4 ~]# 
[root@SYL4 ~]# mkdir /mnt/vo
[root@SYL4 ~]# lvcreate -n vo -L 200M teatvg
  Volume group "teatvg" not found
  Cannot process volume group teatvg
[root@SYL4 ~]# lvcreate -n vo -L 200M testvg
  Logical volume "vo" created.
[root@SYL4 ~]# lvs
  LV   VG     Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root rhel   -wi-ao---- <17.00g                                                    
  swap rhel   -wi-ao----   2.00g                                                    
  vo   testvg -wi-a----- 200.00m[root@SYL4 ~]# mkfs.xfs /dev/testvg/vo
[root@SYL4 ~]# mkfs.xfs /dev/testvg/vo
[root@SYL4 ~]# blkid /dev/testvg/vo
/dev/testvg/vo: UUID="def02c3f-d2c3-4f66-bd69-5971df6dceed" BLOCK_SIZE="512" TYPE="xfs"
[root@SYL4 ~]#  
[root@SYL4 ~]# vim /etc/fstab 
[root@SYL4 ~]# cat /etc/fstab |grep xfs
/dev/mapper/rhel-root   /                       xfs     defaults        0 0
UUID="def02c3f-d2c3-4f66-bd69-5971df6dceed" /mnt xfs  defaults        0 0
UUID=607eef03-8945-4759-8d33-45d3e47f7dfc /boot                   xfs     defaults        0 0
[root@SYL4 ~]# mount -a
[root@SYL4 ~]# 

[root@SYL4 ~]# lvextend -L 300 /dev/testvg/vo
  Size of logical volume testvg/vo changed from 200.00 MiB (50 extents) to 300.00 MiB (75 extents).
  Logical volume testvg/vo successfully resized.
[root@SYL4 ~]# lvs
  LV   VG     Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root rhel   -wi-ao---- <17.00g                                                    
  swap rhel   -wi-ao----   2.00g                                                    
  vo   testvg -wi-a----- 300.00m                                                    
[root@SYL4 ~]# 

-L 300 /dev/testvg/vo
Size of logical volume testvg/vo changed from 200.00 MiB (50 extents) to 300.00 MiB (75 extents).
Logical volume testvg/vo successfully resized.
[root@SYL4 ~]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root rhel -wi-ao---- <17.00g
swap rhel -wi-ao---- 2.00g
vo testvg -wi-a----- 300.00m
[root@SYL4 ~]#


你可能感兴趣的:(centos,运维,linux)