• lvm合并调整分区大小


    [root@sfzwapp2 /]# umount -f /app
    umount2: Device or resource busy
    umount: /app: device is busy.
            (In some cases useful info about processes that use
             the device is found by lsof(8) or fuser(1))
    umount2: Device or resource busy

     [root@sfzwapp2 /]# fuser -c /app

    /app:                18822ce
    [root@sfzwapp2 /]# ps -ef|grep 18822
    root     18822     1  0 00:00 ?        00:00:07 ./nmon_x86_64_rhel6 -f -T -s 120 -c 720
    root     21559 21427  0 14:55 pts/2    00:00:00 grep 18822
    [root@sfzwapp2 /]# kill -9 18822
    [root@sfzwapp2 /]# umount -f /app
    [root@sfzwapp2 /]# lvremove /dev/vg_sfzwapp2/LogVapp 
    Do you really want to remove active logical volume LogVapp? [y/n]: y
      Logical volume "LogVapp" successfully removed
     [root@sfzwapp2 /]# lvextend -L +100G /dev/vg_sfzwapp2/LogVhome 
      Size of logical volume vg_sfzwapp2/LogVhome changed from 10.00 GiB (2560 extents) to 110.00 GiB (28160 extents).
      Logical volume LogVhome successfully resized
    [root@sfzwapp2 /]# resize2fs    /dev/vg_sfzwapp2/LogVhome
    resize2fs 1.41.12 (17-May-2010)
    Filesystem at /dev/vg_sfzwapp2/LogVhome is mounted on /home; on-line resizing required
    old desc_blocks = 1, new_desc_blocks = 7
    Performing an on-line resize of /dev/vg_sfzwapp2/LogVhome to 28835840 (4k) blocks.
    The filesystem on /dev/vg_sfzwapp2/LogVhome is now 28835840 blocks long.
     
    [root@sfzwapp2 /]# df -h
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/mapper/vg_sfzwapp2-LogVroot
                           35G  2.2G   31G   7% /
    tmpfs                  16G  224K   16G   1% /dev/shm
    /dev/sda1             477M   42M  410M  10% /boot
    /dev/mapper/vg_sfzwapp2-LogVhome
                          109G   38M  103G   1% /home
    /dev/mapper/vg_sfzwapp2-LogVtmp
                          9.8G   23M  9.2G   1% /tmp
    /dev/mapper/vg_sfzwapp2-LogVusr
                          9.8G  2.9G  6.5G  31% /usr
    /dev/mapper/vg_sfzwapp2-LogVvar
                          9.8G  145M  9.1G   2% /var
     
  • 相关阅读:
    centos 编程环境
    git 安装 使用
    nodejs 笔记
    微信开发
    composer 使用笔记
    一:安装centos 7最小编程环境 xfce桌面
    二: 安装centos服务环境软件mysql httpd php
    我的通用程序规范及说明
    常用js代码集
    三 , lnmp 一键包安装使用
  • 原文地址:https://www.cnblogs.com/vzhangxk/p/15303883.html
Copyright © 2020-2023  润新知