zoukankan      html  css  js  c++  java
  • 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 需谨慎使用呀,使用前把数据要全拷贝出来才安全。


  • 相关阅读:
    洛谷—— P3353 在你窗外闪耀的星星
    洛谷—— P1238 走迷宫
    洛谷—— P1262 间谍网络
    9.8——模拟赛
    洛谷—— P1189 SEARCH
    算法
    May 22nd 2017 Week 21st Monday
    May 21st 2017 Week 21st Sunday
    May 20th 2017 Week 20th Saturday
    May 19th 2017 Week 20th Friday
  • 原文地址:https://www.cnblogs.com/storymedia/p/4436084.html
Copyright © 2011-2022 走看看