• lv resize


    # lvreduce -L -400G /dev/vg_atalinux001/lv_home

    # resize2fs   /dev/vg_atalinux001/lv_home

    resize2fs 1.41.12 (17-May-2010)

    Filesystem at /dev/vg_atalinux001/lv_home is mounted on /home; on-line resizing required

    On-line shrinking from 107852800 to 2995200 not supported.


    # umount /home

    # resize2fs   /dev/vg_atalinux001/lv_home

    resize2fs 1.41.12 (17-May-2010)

    Please run 'e2fsck -f /dev/vg_atalinux001/lv_home' first.

    # e2fsck -f /dev/vg_atalinux001/lv_home

    一通回车之后就挂了...

    # mount -a

    mount: wrong fs type, bad option, bad superblock on /dev/mapper/vg_atalinux001-lv_home,

           missing codepage or helper program, or other error

           In some cases useful info is found in syslog - try

           dmesg | tail  or so

    # tail /var/log/messages 

    Dec 12 11:09:54 ata-linux-001 kernel: dm-2: rw=1217, want=428081160, limit=23961600

    Dec 12 11:09:54 ata-linux-001 kernel: Buffer I/O error on device dm-2, logical block 53510144

    Dec 12 11:09:54 ata-linux-001 kernel: lost page write due to I/O error on dm-2

    Dec 12 11:09:54 ata-linux-001 kernel: JBD2: I/O error detected when updating journal superblock for dm-2-8.

    Dec 12 11:09:54 ata-linux-001 kernel: attempt to access beyond end of device

    Dec 12 11:09:54 ata-linux-001 kernel: dm-2: rw=1217, want=428081160, limit=23961600

    Dec 12 11:09:54 ata-linux-001 kernel: Buffer I/O error on device dm-2, logical block 53510144

    Dec 12 11:09:54 ata-linux-001 kernel: lost page write due to I/O error on dm-2

    Dec 12 11:09:54 ata-linux-001 kernel: JBD2: I/O error detected when updating journal superblock for dm-2-8.

    Dec 12 11:14:19 ata-linux-001 kernel: EXT4-fs (dm-2): bad geometry: block count 107852800 exceeds size of device (2995200 blocks)


    # mkfs.ext4 /dev/vg_atalinux001/lv_home

    之后好了。


     lvreduce 需谨慎使用呀,使用前把数据要全拷贝出来才安全。


  • 相关阅读:
    JavaScript数据结构——模仿ES6中定义的类似的Set类
    webpack简单的项目配置发生的错误
    三国
    把握中国经济的大局与动力
    人生道路
    C++
    https://计算机等级分类总结
    https://计算机四级
    https://计算机三级
    https://计算机二级
  • 原文地址:https://www.cnblogs.com/storymedia/p/4436084.html
Copyright © 2020-2023  润新知