Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora/Linux Management Tools (http://www.linux-archive.org/fedora-linux-management-tools/)
-   -   Don't use disk.maximizePartition anymore. (http://www.linux-archive.org/fedora-linux-management-tools/264560-dont-use-disk-maximizepartition-anymore.html)

David Lehman 03-17-2009 01:52 AM

Don't use disk.maximizePartition anymore.
 
We are doing a fine job of maximizing things on our own, and
maximizePartitions is actually shrinking our partitions in an
effort to make sure they are cylinder-aligned. Bottom line,
it's not doing anything useful. If we decide to start making
all partitions cylinder-aligned, we will want to do it in
another way besides calling maximizePartitions, and presumably
our current accuracy will be preserved. If not, we can always
bring it back.
---
storage/partitioning.py | 23 -----------------------
1 files changed, 0 insertions(+), 23 deletions(-)

diff --git a/storage/partitioning.py b/storage/partitioning.py
index c10a3d2..8243080 100644
--- a/storage/partitioning.py
+++ b/storage/partitioning.py
@@ -932,29 +932,6 @@ def growPartitions(disks, partitions):
except PartitioningError, e:
raise PartitioningError("failed to grow partitions")

- # Maximize partitions, we do this after growing all partitions
- # as some partitions may grow unlimited, and we don't want them
- # eating up the entire disk when we still need to grow others
- for part in growable:
- constraint = parted.Constraint(device=disk.partedDisk.device)
-
- # don't grow beyond the request's maximum size
- if part.req_max_size:
- max_sect = (part.req_max_size * (1024 * 1024)) / sectorSize
- if constraint.maxSize > max_sect:
- constraint.maxSize = max_sect
-
- # don't grow beyond the resident filesystem's max size
- if part.format.maxSize > 0:
- max_sect = (part.format.maxSize * (1024 * 1024)) / sectorSize
- if constraint.maxSize > max_sect:
- constraint.maxSize = max_sect
-
- disk.partedDisk.maximizePartition(part.partedParti tion, constraint)
- log.debug("grew partition %s to %dMB" % (part.name,
- part.partedPartition.getSize()))
- log.debug("the disk's copy is %dMB" % disk.partedDisk.getPartitionByPath(part.path).getS ize())
-
# reset all requests to their original requested size
for part in partitions:
if part.exists:
--
1.6.0.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

David Cantrell 03-17-2009 01:59 AM

Don't use disk.maximizePartition anymore.
 
I'm ok with this. We should keep an eye on things to see if it affects
other operating systems for dual boot scenarios.


On 03/16/2009 04:52 PM, David Lehman wrote:

We are doing a fine job of maximizing things on our own, and
maximizePartitions is actually shrinking our partitions in an
effort to make sure they are cylinder-aligned. Bottom line,
it's not doing anything useful. If we decide to start making
all partitions cylinder-aligned, we will want to do it in
another way besides calling maximizePartitions, and presumably
our current accuracy will be preserved. If not, we can always
bring it back.
---
storage/partitioning.py | 23 -----------------------
1 files changed, 0 insertions(+), 23 deletions(-)

diff --git a/storage/partitioning.py b/storage/partitioning.py
index c10a3d2..8243080 100644
--- a/storage/partitioning.py
+++ b/storage/partitioning.py
@@ -932,29 +932,6 @@ def growPartitions(disks, partitions):
except PartitioningError, e:
raise PartitioningError("failed to grow partitions")

- # Maximize partitions, we do this after growing all partitions
- # as some partitions may grow unlimited, and we don't want them
- # eating up the entire disk when we still need to grow others
- for part in growable:
- constraint = parted.Constraint(device=disk.partedDisk.device)
-
- # don't grow beyond the request's maximum size
- if part.req_max_size:
- max_sect = (part.req_max_size * (1024 * 1024)) / sectorSize
- if constraint.maxSize> max_sect:
- constraint.maxSize = max_sect
-
- # don't grow beyond the resident filesystem's max size
- if part.format.maxSize> 0:
- max_sect = (part.format.maxSize * (1024 * 1024)) / sectorSize
- if constraint.maxSize> max_sect:
- constraint.maxSize = max_sect
-
- disk.partedDisk.maximizePartition(part.partedParti tion, constraint)
- log.debug("grew partition %s to %dMB" % (part.name,
- part.partedPartition.getSize()))
- log.debug("the disk's copy is %dMB" % disk.partedDisk.getPartitionByPath(part.path).getS ize())
-
# reset all requests to their original requested size
for part in partitions:
if part.exists:



--
David Cantrell <dcantrell@redhat.com>
Red Hat / Honolulu, HI

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


All times are GMT. The time now is 12:05 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.