Uploaded image for project: 'OpenVZ'
  1. OpenVZ
  2. OVZ-4052

vzsplit ignores effective blocksize when calculating ds_pve (DISKSPACE)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Fix Version/s: OpenVZ-legacy
    • Component/s: Containers::Userspace
    • Security Level: Public
    • Environment:
      Operating System: All
      Platform: All

      Description

      vzsplit calculates the wrong DISKSPACE parameter for a VE if the blocksize of the underlying filesystem does not match (the recommended) 1024 bytes block size.

      On many Linux distros the default block size for ext2/ext3 filesystems is 4096 bytes. If you stick to the default, the DISKSPACE parameter vzsplit issues is 4 times too small.

      The attached patch fixes this in a quick and dirty way (assuming DISKSPACE is always measured in 1 Kb blocks in the vps.conf).
      1. vzsplit.c.diff
        0.3 kB
        Thomas Werschlein

        Activity

        Hide
        thomas.werschlein@geo.uzh.ch Thomas Werschlein added a comment -

        Attachment vzsplit.c.diff has been added with description: patch to honour actual blocksize

        Show
        thomas.werschlein@geo.uzh.ch Thomas Werschlein added a comment - Attachment vzsplit.c.diff has been added with description: patch to honour actual blocksize
        Hide
        kir Kir Kolyshkin added a comment -

        Thanks for the bug report and the fix!

        Fixed in GIT:
        http://git.openvz.org/?p=vzctl;a=commit;h=f61d42f522bdab3369397108a5dc351cf5421eb2

        Will be available in vzctl >= 3.0.24

        Show
        kir Kir Kolyshkin added a comment - Thanks for the bug report and the fix! Fixed in GIT: http://git.openvz.org/?p=vzctl;a=commit;h=f61d42f522bdab3369397108a5dc351cf5421eb2 Will be available in vzctl >= 3.0.24
        Hide
        sergeyb Sergey Bronnikov added a comment -

        Bug was fixed more than one year ago and there were no complains from reporter after fix. We believe bug fix helped and mark bug as closed.

        Show
        sergeyb Sergey Bronnikov added a comment - Bug was fixed more than one year ago and there were no complains from reporter after fix. We believe bug fix helped and mark bug as closed.

          People

          • Assignee:
            igor Igor Sukhih
            Reporter:
            thomas.werschlein@geo.uzh.ch Thomas Werschlein
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: