| Summary: | unable to online resize a filesystem containing a snapshot | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Corey Marthaler <cmarthal> |
| Component: | lvm2 | Assignee: | Zdenek Kabelac <zkabelac> |
| Status: | CLOSED WONTFIX | QA Contact: | Corey Marthaler <cmarthal> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.0 | CC: | agk, cww, dwysocha, heinzm, jbrassow, joe.thornber, loberman, prockai, rrajaram |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-05-08 18:46:57 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
Since RHEL 6.1 External Beta has begun, and this bug remains unresolved, it has been rejected as it is not proposed as exception or blocker. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux. fsadm should probably ask if it can deactivate LV, then resize it, activate again and resize fs. I think we should extend fsadm for this but definitely it is not urgent thing, moving to 6.3 for now. This is more complicated issue - and since we don't have even upstream solution yet, postponing past 6.3 release now. For resizing we need active device - since we don't have user-space implementation of kernel drivers to know mapping of inactive device. Eventually the problem might be solved by switching to newer kind of snapshots via thinp target - but this is not yet upstream supported. This request was not resolved in time for the current release. Red Hat invites you to ask your support representative to propose this request, if still desired, for consideration in the next release of Red Hat Enterprise Linux. This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development. This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4. This request was not resolved in time for the current release. Red Hat invites you to ask your support representative to propose this request, if still desired, for consideration in the next release of Red Hat Enterprise Linux. |
Description of problem: There's a chicken and egg issue here. You can't resize an LV containing a snap unless it's deactivated, but then you obviously can't do an online resize if it's not active. [root@grant-01 ~]# lvs -a -o +devices LV VG Attr LSize Origin Snap% Devices origin grant -wi-a- 100.00m /dev/sdb1(0) [root@grant-01 ~]# mkfs.ext4 /dev/grant/origin mke2fs 1.41.12 (17-May-2010) Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) Stride=0 blocks, Stripe width=0 blocks 25688 inodes, 102400 blocks 5120 blocks (5.00%) reserved for the super user First data block=1 Maximum filesystem blocks=67371008 13 block groups 8192 blocks per group, 8192 fragments per group 1976 inodes per group Superblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729 Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 33 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. [root@grant-01 ~]# mount /dev/grant/origin /mnt/ext/ [root@grant-01 ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/grant-origin 97M 5.6M 87M 7% /mnt/ext [root@grant-01 ~]# lvcreate -s grant/origin -n snap1 -L 50M Rounding up size to full physical extent 52.00 MiB Logical volume "snap1" created [root@grant-01 ~]# lvextend -L +200M -r /dev/grant/origin Snapshot origin volumes can be resized only while inactive: try lvchange -an [root@grant-01 ~]# umount /mnt/* [root@grant-01 ~]# vgchange -an grant 0 logical volume(s) in volume group "grant" now active [root@grant-01 ~]# lvextend -L +200M -r /dev/grant/origin Logical volume origin must be activated before resizing filesystem Version-Release number of selected component (if applicable): 2.6.32-71.el6.x86_64 lvm2-2.02.72-8.el6_0.4 BUILT: Thu Dec 9 09:46:33 CST 2010 lvm2-libs-2.02.72-8.el6_0.4 BUILT: Thu Dec 9 09:46:33 CST 2010 lvm2-cluster-2.02.72-8.el6_0.4 BUILT: Thu Dec 9 09:46:33 CST 2010 udev-147-2.29.el6 BUILT: Tue Aug 31 16:44:10 CDT 2010 device-mapper-1.02.53-8.el6_0.4 BUILT: Thu Dec 9 09:46:33 CST 2010 device-mapper-libs-1.02.53-8.el6_0.4 BUILT: Thu Dec 9 09:46:33 CST 2010 device-mapper-event-1.02.53-8.el6_0.4 BUILT: Thu Dec 9 09:46:33 CST 2010 device-mapper-event-libs-1.02.53-8.el6_0.4 BUILT: Thu Dec 9 09:46:33 CST 2010 cmirror-2.02.72-8.el6_0.4 BUILT: Thu Dec 9 09:46:33 CST 2010