Bug 509123
Summary: | lvextend: -r option doesn't work as expected? | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Gianluca Cecchi <gianluca.cecchi> |
Component: | lvm2 | Assignee: | Zdenek Kabelac <zkabelac> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 14 | CC: | agk, bmarzins, bmr, cmarthal, dwysocha, heinzm, lvm-team, msnitzer, prockai, zkabelac |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-08-16 22:24:21 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Gianluca Cecchi
2009-07-01 13:17:25 UTC
Add -n. Yes, the man page is out-of-date - let's use this bugzilla to get it updated. So are online resizes supposed to work, or does the man page need to be updated to say that they don't? [root@grant-02 ~]# lvextend -L 300M -r /dev/grant/mirror Extending 2 mirror images. fsadm: Can not fsck device "/dev/mapper/grant-mirror", filesystem mounted on /mnt/grant fsadm failed: 1 [root@grant-02 ~]# lvextend -L 300M -r -n /dev/grant/mirror Extending 2 mirror images. Extending logical volume mirror to 300.00 MB Logical volume mirror successfully resized resize2fs 1.39 (29-May-2006) Filesystem at /dev/mapper/grant-mirror is mounted on /mnt/grant; on-line resizing required resize2fs: Filesystem does not support online resizing fsadm: Resize ext2 failed fsadm failed: 1 # The fs size doesn't reflect the lv size: [root@grant-02 ~]# lvs -a -o +devices LV VG Attr LSize Origin Snap% Move Log Copy% Convert Devices LogVol00 VolGroup00 -wi-ao 64.56G /dev/sda2(0) LogVol01 VolGroup00 -wi-ao 9.81G /dev/sda2(2066) mirror grant mwi-ao 300.00M mirror_mlog 100.00 mirror_mimage_0(0),mirror_mimage_1(0) [mirror_mimage_0] grant iwi-ao 300.00M /dev/sdb1(0) [mirror_mimage_1] grant iwi-ao 300.00M /dev/sdb7(0) [mirror_mlog] grant lwi-ao 4.00M /dev/sdb8(0) [root@grant-02 ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 63G 1.9G 58G 4% / /dev/sda1 99M 13M 82M 13% /boot tmpfs 4.0G 0 4.0G 0% /dev/shm /dev/mapper/grant-mirror 97M 1.6M 91M 2% /mnt/grant It looks like the only way this will work, even if the ext2/3 fs is unmounted is to also use the -f flag, without it, it fails. [root@grant-02 ~]# lvextend -r -n -f -L 10G /dev/grant/mirror Extending 2 mirror images. Extending logical volume mirror to 10.00 GB Logical volume mirror successfully resized resize2fs 1.39 (29-May-2006) Resizing the filesystem on /dev/mapper/grant-mirror to 2621440 (4k) blocks. The filesystem on /dev/mapper/grant-mirror is now 2621440 blocks long. Actually this can appear to deadlock even with the -f flag. SCENARIO - [fsadm_resize] Create mirror, add fs, and then resize it while online grant-01: lvcreate -m 1 -n fsadm_resize -L 500M --nosync mirror_sanity WARNING: New mirror won't be synchronised. Don't read what you didn't write! Placing an ext on fsadm_resize volume mke2fs 1.39 (29-May-2006) Resize both the mirror and the fs with lvextend -r option on grant-01 grant-01: lvextend -r -n -f -L 1G /dev/mirror_sanity/fsadm_resize [...] read(6, "\340\266a& LVM2 x[5A%r0N*>\1\0\0\0\0\20\0\0\0\0\0\0"..., 512) = 512 lseek(6, 4096, SEEK_SET) = 4096 write(6, "T\307\341\v LVM2 x[5A%r0N*>\1\0\0\0\0\20\0\0\0\0\0\0"..., 512) = 512 lseek(7, 4096, SEEK_SET) = 4096 read(7, "\340\266a& LVM2 x[5A%r0N*>\1\0\0\0\0\20\0\0\0\0\0\0"..., 4096) = 4096 lseek(7, 8192, SEEK_SET) = 8192 read(7, "mirror_sanity {\nid = \"Wv44bU-F2j"..., 4096) = 4096 lseek(7, 4096, SEEK_SET) = 4096 read(7, "\340\266a& LVM2 x[5A%r0N*>\1\0\0\0\0\20\0\0\0\0\0\0"..., 4096) = 4096 lseek(7, 4096, SEEK_SET) = 4096 write(7, "T\307\341\v LVM2 x[5A%r0N*>\1\0\0\0\0\20\0\0\0\0\0\0"..., 4096) = 4096 lseek(8, 4096, SEEK_SET) = 4096 read(8, "\340\266a& LVM2 x[5A%r0N*>\1\0\0\0\0\20\0\0\0\0\0\0"..., 4096) = 4096 lseek(8, 8192, SEEK_SET) = 8192 read(8, "mirror_sanity {\nid = \"Wv44bU-F2j"..., 4096) = 4096 lseek(8, 4096, SEEK_SET) = 4096 read(8, "\340\266a& LVM2 x[5A%r0N*>\1\0\0\0\0\20\0\0\0\0\0\0"..., 4096) = 4096 lseek(8, 4096, SEEK_SET) = 4096 write(8, "T\307\341\v LVM2 x[5A%r0N*>\1\0\0\0\0\20\0\0\0\0\0\0"..., 4096) = 4096 write(3, "2\00064\0\0\0\0\0\0\0\0C\0\0\0\0\36\204Wv44bUF2jUV9N"..., 85) = 85 read(3, "\1\0\0\0\0\0\0\0\0\0\0\0+\0\0\0\0g", 18) = 18 read(3, "rant-03\0\0\0\0\0\0grant-02\0\0\0\0\0\0grant"..., 43) = 43 write(3, "3\0003\0\0\0\0\0\0\0\0\0\22\0\0\0\0\0\4P_mirror_sani"..., 36) = 36 read(3, "\1\0\325\2334\0\0\0\0\0\0\0+\0\0\0\0g", 18) = 18 read(3, "rant-03\0\0\0\0\0\0grant-02\0\0\0\0\0\0grant"..., 43) = 43 stat("/etc/lvm/backup", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0 access("/etc/lvm/backup", R_OK|W_OK|X_OK) = 0 uname({sys="Linux", node="grant-01", ...}) = 0 open("/etc/lvm/backup/.lvm_grant-01_10915_1217007811", O_WRONLY|O_CREAT|O_EXCL|O_APPEND, 0666) = 10 fcntl(10, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0 fcntl(10, F_GETFL) = 0x8401 (flags O_WRONLY|O_APPEND|O_LARGEFILE) fstat(10, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b95e2ea3000 lseek(10, 0, SEEK_CUR) = 0 fsync(10) = 0 write(10, "# Generated by LVM2 version 2.02"..., 3221) = 3221 close(10) = 0 munmap(0x2b95e2ea3000, 4096) = 0 rename("/etc/lvm/backup/.lvm_grant-01_10915_1217007811", "/etc/lvm/backup/mirror_sanity.tmp") = 0 rename("/etc/lvm/backup/mirror_sanity.tmp", "/etc/lvm/backup/mirror_sanity") = 0 stat("/etc/lvm/backup/mirror_sanity.tmp", 0x7fff9e2f7580) = -1 ENOENT (No such file or directory) open("/etc/lvm/backup", O_RDONLY) = 10 fsync(10) = 0 close(10) = 0 write(1, " Logical volume fsadm_resize su"..., 51 Logical volume fsadm_resize successfully resized ) = 51 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x2b95df8c5930) = 10964 wait4(10964, resize2fs 1.39 (29-May-2006) Resizing the filesystem on /dev/mapper/mirror_sanity-fsadm_resize to 1048576 (1k) blocks. [never finishes] This message is a reminder that Fedora 11 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 11. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '11'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 11's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 11 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping kabi, what's the current state of this? Man pages were updated to show --nofsck and --resizefs options. Problem with doing resize of the mirrored root partition is probably beyond the scope of original --resizefs bugzilla. This bug appears to have been reported against 'rawhide' during the Fedora 14 development cycle. Changing version to '14'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping This message is a notice that Fedora 14 is now at end of life. Fedora has stopped maintaining and issuing updates for Fedora 14. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At this time, all open bugs with a Fedora 'version' of '14' have been closed as WONTFIX. (Please note: Our normal process is to give advanced warning of this occurring, but we forgot to do that. A thousand apologies.) Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, feel free to reopen this bug and simply change the 'version' to a later Fedora version. Bug Reporter: Thank you for reporting this issue and we are sorry that we were unable to fix it before Fedora 14 reached end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged to click on "Clone This Bug" (top right of this page) and open it against that version of Fedora. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping |