日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關咨詢
選擇下列產品馬上在線溝通
服務時間:8:30-17:00
你可能遇到了下面的問題
關閉右側工具欄

新聞中心

這里有您想知道的互聯網營銷解決方案
創(chuàng)新互聯linux教程:7.2.3 縮小邏輯卷

相較于擴容邏輯卷,在對邏輯卷進行縮容操作時,其丟失數據的風險更大。所以在生產環(huán)境中執(zhí)行相應操作時,一定要提前備份好數據。另外Linux系統規(guī)定,在對LVM邏輯卷進行縮容操作之前,要先檢查文件系統的完整性(當然這也是為了保證我們的數據安全)。在執(zhí)行縮容操作前記得先把文件系統卸載掉。

    [root@linuxprobe ~]# umount /linuxprobe

第1步:檢查文件系統的完整性。

    [root@linuxprobe ~]# e2fsck -f /dev/storage/vo
    e2fsck 1.42.9 (28-Dec-2013)
    Pass 1: Checking inodes, blocks, and sizes
    Pass 2: Checking directory structure
    Pass 3: Checking directory connectivity
    Pass 4: Checking reference counts
    Pass 5: Checking group summary information
    /dev/storage/vo: 11/74000 files (0.0% non-contiguous), 15507/299008 blocks

第2步:把邏輯卷vo的容量減小到120MB。

    [root@linuxprobe ~]# resize2fs /dev/storage/vo 120M
    resize2fs 1.42.9 (28-Dec-2013)
    Resizing the filesystem on /dev/storage/vo to 122880 (1k) blocks.
    The filesystem on /dev/storage/vo is now 122880 blocks long.
    [root@linuxprobe ~]# lvreduce -L 120M /dev/storage/vo
     WARNING: Reducing active logical volume to 120.00 MiB
     THIS MAY DESTROY YOUR DATA (filesystem etc.)
    Do you really want to reduce vo? [y/n]: y
     Reducing logical volume vo to 120.00 MiB
     Logical volume vo successfully resized

第3步:重新掛載文件系統并查看系統狀態(tài)。

    [root@linuxprobe ~]# mount -a
    [root@linuxprobe ~]# df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/mapper/rhel-root 18G 3.0G 15G 17% /
    devtmpfs 985M 0 985M 0% /dev
    tmpfs 994M 80K 994M 1% /dev/shm
    tmpfs 994M 8.8M 986M 1% /run
    tmpfs 994M 0 994M 0% /sys/fs/cgroup
    /dev/sr0 3.5G 3.5G 0 100% /media/cdrom
    /dev/sda1 497M 119M 379M 24% /boot
    /dev/mapper/storage-vo 113M 1.6M 103M 2% /linuxprobe

本文標題:創(chuàng)新互聯linux教程:7.2.3 縮小邏輯卷
標題路徑:http://www.5511xx.com/article/cdicjpd.html