Re: BUG: Reducing the lvm partition on ext4 filesystem " ( 2.6.27-rc1 )

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rishikesh K Rajak wrote:
> Hi All,
> 
> I have created the lvm partition on my machine and found there is some
> problem with reducing the size with resize2fs tool  on 2.6.27-rc1 kernel.
> 
> I am not sure this is an exact bug of ext4 filesystem or there is some
> problem with e2fsprogs/resize2fs tool.
> 
> here is the bug link which i raised :
> http://bugzilla.kernel.org/show_bug.cgi?id=11317
>

I added comments to the bug, but:

[root@e326 sbin]# mount
...
/dev/mapper/my_volg-vol01 on /mnt type ext4dev (rw)

[root@e326 sbin]# umount /mnt/tmpmount/

[root@e326 sbin]# df -h
(unfortunately current size of ext4 fs is not shown)

First you slice off the end of the block device:

[root@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

(bells should be going off here!)

*then* you try to shrink the fs:

[root@e326 sbin]# ./resize2fs /dev/mynew_vg/vol01
resize2fs 1.41-WIP (17-Jun-2008)
Please run 'e2fsck -f /dev/mynew_vg/vol01' first.

and it finds that your block device is smaller than your fs:

[root@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

You need to resize the fs, then resize the block device it's on.

This looks like user error to me.

-Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux