[Bugme-new] [Bug 11317] New: Shrinking of size is failing while trying to reduce the disk size with LVM

bugme-daemon at bugzilla.kernel.org bugme-daemon at bugzilla.kernel.org
Wed Aug 13 00:24:52 PDT 2008


http://bugzilla.kernel.org/show_bug.cgi?id=11317

           Summary: Shrinking of size is failing while trying to reduce the
                    disk size with LVM
           Product: File System
           Version: 2.5
     KernelVersion: 2.6.27-rc1
          Platform: All
        OS/Version: Linux
              Tree: Mainline
            Status: NEW
          Severity: high
          Priority: P1
         Component: ext4
        AssignedTo: fs_ext4 at kernel-bugs.osdl.org
        ReportedBy: risrajak at in.ibm.com
                CC: iranna.ankad at in.ibm.com


Latest working kernel version: 2.6.27-rc1


Steps to reproduce:
 - pvcreate /dev/sdb1
 - pvdisplay
 - vgcreate my_volg /dev/sdb1
 - vgdisplay
 - lvcreate -L 8G -n vol01 my_volg
 - lvdisplay
 - lvreduce -r -L 2G /dev/my_volg/vol01
 - lvdisplay
 - ./resize2fs /dev/my_volg/vol01
 - ./e2fsck -fnv /dev/my_volg/vol01

Note: Please let me know if i am executing wrong steps :(

==================================================
Error:
[root at e326 sbin]# ./e2fsck -f /dev/mynew_vg/vol01
e2fsck 1.41-WIP (17-Jun-2008)
The filesystem size (according to the superblock) is 11304960 blocks
The physical size of the device is 4194304 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? no

Pass 1: Checking inodes, blocks, and sizes
Error reading block 4194307 (Invalid argument) while getting next inode from
scan.  Ignore error<y>? no

Error while scanning inodes (262144): Can't read next inode
e2fsck: aborted
[root at e326 sbin]#
=============================================================

Additional info:

[root at e326 sbin]# lvreduce
[root at e326 sbin]# mount
/dev/sda2 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext2 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/mapper/my_volg-vol01 on /mnt type ext4dev (rw)
[root at e326 sbin]# umount /mnt/tmpmount/
[root at e326 sbin]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2              15G   14G   62M 100% /
/dev/sda1             487M   36M  426M   8% /boot
tmpfs                 948M     0  948M   0% /dev/shm
[root at e326 sbin]# lvdisplay
  --- Logical volume ---
  LV Name                /dev/my_volg/vol01
  VG Name                my_volg
  LV UUID                strpPN-Lwvo-eHTZ-Skrs-iEHE-RdOO-bPM0eE
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                10.78 GB
  Current LE             2760
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

[root at e326 sbin]# lvreduce -L 4G /dev/mynew_vg/vol01
  WARNING: Reducing active logical volume to 4.00 GB
  THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce vol01? [y/n]: y
  Reducing logical volume vol01 to 4.00 GB
  Logical volume vol01 successfully resized
[root at e326 sbin]# lvdisplay
  --- Logical volume ---
  LV Name                /dev/my_volg/vol01
  VG Name                my_volg
  LV UUID                strpPN-Lwvo-eHTZ-Skrs-iEHE-RdOO-bPM0eE
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                4.00 GB
  Current LE             1024
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

[root at e326 sbin]# mount -t ext4dev -o extents /dev/my_volg/vol01 /mnt
[root at e326 sbin]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2              15G   14G   62M 100% /
/dev/sda1             487M   36M  426M   8% /boot
tmpfs                 948M     0  948M   0% /dev/shm
/dev/mapper/mynew_vg-vol01
                       11G   36M   11G   1% /mnt
[root at e326 sbin]# umount /mnt/tmpmount/
[root at e326 sbin]# ./resize2fs /dev/mynew_vg/vol01
resize2fs 1.41-WIP (17-Jun-2008)
Please run 'e2fsck -f /dev/mynew_vg/vol01' first.

[root at e326 sbin]# ./e2fsck -f /dev/mynew_vg/vol01
e2fsck 1.41-WIP (17-Jun-2008)
The filesystem size (according to the superblock) is 11304960 blocks
The physical size of the device is 4194304 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? no

Pass 1: Checking inodes, blocks, and sizes
Error reading block 4194307 (Invalid argument) while getting next inode from
scan.  Ignore error<y>? no

Error while scanning inodes (262144): Can't read next inode
e2fsck: aborted
[root at e326 sbin]#


-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


More information about the Bugme-new mailing list