| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
xfs_admin expects -L <label> <device>.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our partitioning code was assuming that having a partition from
sector 0 - 512 means the partition stops at sector 512, iow that
it goes from sector 0 till 511, but that is not how parted geometries
work, the range includes the end sector. So 0 - 512 will get you
a 513 sectors partition.
This patch adds an endAligment property to disklabel which can be used
to properly align end sectors (which must be aligned to the disklabel's
alignment with the offset decreased by 1), patches partitioning.py to
use this to align end sectors and fixes up end sector calculations in
partitioning.py to be start + length - 1.
On DASD's (s390), the wrong end sector was causing a traceback (#560586),
as DASD's disklabels need partitions to be cylinder aligned, and the wrong
end sector violated this.
|
| |
|
|
|
|
|
| |
iutil.execWithRedirect() stopped doing anything with searchPath in 2006
when clumens committed d0dec24. Remove these silly vestigal bits.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I've been running pylint on a subset of anaconda:
booty storage iw/*.py platform.py
And it has found various errors this commit fixes:
- Restore line accidently dropped from iscsi.py
- execWithPulseProgress should propagate the return value of
execWithCallback
- storage.formats.fs:535 (FS.doCheck): self.intf should be just intf
- storage.formats.fs: add missing "import sys" (for sys.exit)
- advanced_config.py add missing import for NetworkConfigurator
- lvm_dialog_gui.py: VolumeGroupEditor.editLogicalVolume dev was renamed to d
- partition_gui.py: remove an unneeded semicolon
- partition_gui.py: PartitionWindow.createCB rc should be dialog_rc
- storage.FSSet.write: put docstring in the proper place
- platform.Sparc.minimumSector: sectors should be sector
|
|
|
|
|
|
|
|
|
| |
This becomes important when removing a disklabel from a device
which has a disklabel and partitions but which is not something
we support partitioning (eg: lvm lv). In normal cases the
partitions will already have been removed, but in the case of
an unsupported partitioned device we ignore the partitions when
scanning and so have to remove them this way.
|
| |
|
|
|
|
|
|
|
| |
This attribute is a dict that describes the device or format instance
with considerable detail. It is intended that the dict will be
pickled using the shelve module, so values should be picklable objects.
Keys should be descriptive strings.
|
| |
|
| |
|
|
|
|
| |
This brings the behavior in line with other (dmraid) biosraid members.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
In F11 and F12 the command line option to enable btrfs during the installer was
"icantbelieveitsnotbtr". Unfortunately I can't spell believe the first time
every time, and btrfs has come quite a ways since F11 and is stable enough to
start being tested on a larger scale. So change the command line option to
"btrfs" in keeping with tradition and to make it a bit simpler for those who
want to take it for a test spin in F13. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
|
| |
|
|
|
|
| |
We don't want to show biosraid, multipath, &c disks in the GUI.
|
| |
|
|
|
|
|
|
|
| |
'tmp/storage.log' file. (a part of #524980)
Previously, the method call was logged into 'tmp/anaconda.log' which made the
file harder to do anything useful with.
|
|
|
|
|
|
| |
If we are using an external utility to create the format we can use
iutil.execWithPulseProgress. For formats we create using a python
module we can only put up a waitWindow.
|
|
|
|
|
|
|
| |
We're not guaranteed to have the _infofs program on every platform, so we
need to make sure the filesystem is supported before making an attempt. For
now this is only showing up on NTFS volumes on ppc, but it's possible to
come up in other places.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following install test case has been failing:
https://fedoraproject.org/wiki/QA:Testcase_Anaconda_autopart_%28shrink%29_install
The problem was with the minSize property in Ext2FS. We use resize2fs
to get the minSize for ext2/3/4 filesystems, which is good because
resize2fs accounts for additional things an extX volume may need. The
problem is the value it reports is in blocks. We have to convert those
blocks to bytes, then to megabytes, then round up to account for any
fractional megabytes. Use dumpe2fs to get the block size and use
resize2fs as we have been, but modify the calculation of size.
Also the _setTargetSize() method in FS needed a change. minSize can be
less than or equal to newsize, not just less than.
|
|
|
|
|
|
|
| |
As discussed on IRC this changes the platform.diskType property
into a platform.diskLabelType method that takes a disk/device type argument
and uses this argument to check for dasd disks and in that cases returns
dasd as diskLabelType.
|
|
|
|
|
| |
Rename platform.diskType to platform.diskLabelType, as diskType is confusing
(we usally use it to refer to is the disk dasd, iscsi, zfcp, etc.).
|
|
|
|
|
|
| |
This fixes an inconsistency where /boot could be on various filesystems
during interactive installs, but not during kickstart. What filesystems
are valid is controlled by the Platform module.
|
|
|
|
|
|
|
|
| |
If fsck fails with a return code indicating errors we can't
automatically fix, give the user a more descriptive error dialog before
exiting. There's not much we can do if the filesystem is beyond
automatic repair, so tell the user to repair the filesystem under rescue
mode or something similar.
|
|
|
|
|
|
|
|
|
|
| |
Our patch for adding support for the swap flag to parted msdos label handling
has been rejected upstream, upstream says we should use
ped_partition_set_system() instead. So do that, as I would like to drop this
patch from our parted package eventually.
This will also cause us to assign the right type to swap partitions in
GPT tables, so this patch should go to F-12 too.
|
|
|
|
|
|
| |
Live images don't contain volume_key, which makes sense since key
escrow is kickstart-only functionality. At any rate, failure to
import volume_key should only break key escrow.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The playing around with partedPartition flags only allows us to determine
the partition table entry for certain usuages which are deemed special
by parted. For normal FS usuage, parted will default to the type for the FS
it has detected (for pre-existing partitions) or to Linux (83) for new
partitions.
This means that for example reformatting a vfat partition as ext3, or a new
partition as vfat will lead to incorrect partition type entries in the
partition table. This patch fixes this.
This patch is intended for both master and F-12.
|
|
|
|
|
|
|
|
| |
The machine in #527699 has one seriously broken disk, this causes
(py)parted to throw a different exception type when looking up the device
this patch catches this exception too, which will result in the disk
being handled as a removeable disk (ie cardreader) with no media present,
causing us to ignore it.
|
| |
|
|
|
|
| |
Rounding errors when computing the existing size of NTFS volumes.
|
|
|
|
|
|
| |
If a label is set on a filesystem (e.g., the --label switch on a part
command in a kickstart file), make sure it is set during the filesystem
creation.
|
| |
|
|
|
|
|
|
| |
Since the parted ebusy errors due to unnecessary udev event generation on the
partition nodes bug has been nailed, we no longer need the retry loop around
committing to disk.
|
|
|
|
|
|
| |
Now that we've moved to dracut for the initrd in rawhide, which supports
using mdraid for isw metadata raid sets (and uses this by default), make
using mdraid for isw metadata raid sets the default.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for storing an X.509 certificate used to encrypt the escrow
data, and a "create backup passphrase" flag, to storage.formats.LUKS,
and support for storing the same options of "autopart" globally to
storage.Storage.
While parsing kickstart directives, download the X.509 certificates
specified in thekickstart file (if any), enabling network access if
necessary, then store the data in the above-described storage objects.
While autopartitioning, copy the "autopart" escrow options into each
created LUKS volume.
Finally, as a part of doPostInstall, find all LUKS volumes with escrow
configured, create the escrow files and store them in /mnt/sysimage/root.
Changes since the previous version:
- Drop unused .encryptedDevice assignments
- Move writeEscrowPackets inside doPostInstall
- Fix bugs introduced while moving code to storage.formats.LUKS
Further changes:
- Don't pass escrow args to lvmpv format constructor.
- Move backup passphrase generation into storage.devicelibs.crypto.
- Use newer, clearer except syntax in storage.writeEscrowPackets.
|
|
|
|
|
| |
force=True will tear down the device, unmount if necessary, and then
reformat it.
|
|
|
|
|
|
|
|
| |
This patch fixes 2 things, which together fix
tracebacks on an usb cardreader with no card present
1) Add a check to format.disklabel() for no media being present
2) _ped.DeviceException was changed to _ped.IOException for no media present
errors in current pyparted
|
| |
|
|
|
|
| |
Remove unused fsFromConfig method, it is not used and has syntax errors in it.
|
|
|
|
|
|
|
| |
pylint does not like @foo.setter, so use the
foo = property(setter, getter)
Notation instead. Note that we already use this notation everywhere except
for these 2 places, so doing things this way is more consistent anyways.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We use 2 in memory copies of the partition table (2 PartedDisk instances),
one which we manipulate while auto / manual partitioning, and one
copy on which we reply the changes done by the auto / manual partitioning
step by step (committing each step to the disk) as we process our
actions.
For pre-existing partitions the PartitionDevice's partedPartition member
would point to the manipulated table's partitions, even though we had
already switched over and where actually executing actions. This causes
issues (segfaults!) with the flag clearing in ActionDestroyFormat.execute(),
as this was now calling unsetFlag on a partition which is no longer part of
a disk (as it was removed by clearParts).
This patch fixes this by making PartitionDevice's partedPartition property
switch over to the partitions in the new PartedDisk after we've
switched over to it.
p.s.
For some reason in my case, the segfault kept getting caught be some handler
and retriggered, so I had to scp in strace to find out it was segfaulting,
this showed up as the installer hanging after
"executing action: Destroy Format None on .... (partition)"
So this patch might fix some bug reports with these symptoms
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In storage.doIt() we set the bootable flag for the /boot or / (or
special platform boot) partition. And then we call bootdev.format.commit(),
however this will lead to parted trying to tell the kernel to rescan the
partition table which will usually fail, as usually we have some VolGroup
active at this point.
All we really need todo is make sure the bootable flag gets written to the
disk, so this patch adds a commitToDisk() method to formats.disklabel and uses
that.
We were not bitten by this before because uptil now parted was silently
ignoring ebusy errors for us (BAD parted, BAD!).
|
|
|
|
|
|
|
|
|
|
|
| |
While running anaconda with a patched libparted, which will actually return
an error upon commiting to a busy disk I got a traceback as the packages.py
exception handling tried to unpack the disklabel.commit() exception into
a message and a device, as disklabel.commit() was throwing a DeviceError
which normal has a message and a device. Since disklabel is a format now
commit() should throw a DeviceFormatError instead.
(And now to find out why the commit is failing)
|
| |
|