Revision 1dc10972 lib/bdev.py

b/lib/bdev.py
828 828
    bytes = sectors * 512
829 829
    if bytes < 128 * 1024 * 1024: # less than 128MiB
830 830
      _ThrowError("Meta device too small (%.2fMib)", (bytes / 1024 / 1024))
831
    if bytes > (128 + 32) * 1024 * 1024: # account for an extra (big) PE on LVM
831
    # the maximum *valid* size of the meta device when living on top
832
    # of LVM is hard to compute: it depends on the number of stripes
833
    # and the PE size; e.g. a 2-stripe, 64MB PE will result in a 128MB
834
    # (normal size), but an eight-stripe 128MB PE will result in a 1GB
835
    # size meta device; as such, we restrict it to 1GB (a little bit
836
    # too generous, but making assumptions about PE size is hard)
837
    if bytes > 1024 * 1024 * 1024:
832 838
      _ThrowError("Meta device too big (%.2fMiB)", (bytes / 1024 / 1024))
833 839

  
834 840
  def Rename(self, new_id):

Also available in: Unified diff