summaryrefslogtreecommitdiffstats
path: root/partitions.py
Commit message (Collapse)AuthorAgeFilesLines
* Replace old storage modules.David Lehman2009-02-231-1899/+0
|
* Ensure request.drive is always a list (#485622)David Cantrell2009-02-201-1/+1
| | | | | | | | | | | | | | | | | The main problem here is that get_partition_by_name() has been removed from partedUtils.py. The functionality is now provided by the getPartitionByPath() method on a parted.Disk object. The old function in partedUtils would iterate over the PedDisk collection and each partition manually, whereas now we have to call getPartitionByPath() for each parted.Disk we have. request.drive has been used inconsistently throughout the existing storage code and only started to show up when I was moving things from anaconda to pyparted. What this patch does is ensure that request.drive on RequestSpec objects is always a list or None. There are a few other changes in the storage code to handle the request.drive variable always being a list, but I think it should be pretty straightforward.
* Skip METADATA, FREESPACE, and PROTECTED partitions.David Cantrell2009-02-121-4/+4
|
* Iterate over partitions to see free space.David Cantrell2009-02-121-1/+5
| | | | | | Use the getFirstPartition() and nextPartition() method to iterate over partitions so we can see the free space as represented by libparted.
* Iterate over partitions using disk.partitionsDavid Cantrell2009-02-121-8/+3
| | | | | | | Rather than calling disk.nextPartition() over and over, we can get a hash table of all partitions on a disk via disk.partitions. Iterate over the values() of this hash (the keys correspond to the partition number).
* Use device property on Disk and Geometry objects.David Cantrell2009-02-121-4/+5
| | | | | The property name for Device objects on a Disk or Geometry is 'device', not 'dev'.
* Syntax changes for the new pyparted.David Cantrell2009-02-121-13/+8
| | | | | | | | | | | | | | | 1) Iterate over partitions with a for loop over disk.partitions.values() rather than calling next_partition() 2) Call getFlag() rather than get_flag() 3) Call setFlag() to enable a flag, call unsetFlag() to disable a flag. 4) Reference the active property rather than calling the is_active() method. And other fixes.
* Remove partedUtils.getMaxAvailPartSizeMB()David Cantrell2009-02-121-1/+1
| | | | | This function is now provided as a method on parted.Partition objects.
* Removed partedUtils.get_lvm_partitions()David Cantrell2009-02-121-1/+1
| | | | Now provided by parted.Disk.getLVMPartitions()
* Removed partedUtils.getRaidPartitions()David Cantrell2009-02-121-1/+1
| | | | Now provided by parted.Disk.getRaidPartitions()
* Remove partedUtils.get_logical_partitions()David Cantrell2009-02-121-1/+1
| | | | Now provided by parted.Disk.getLogicalPartitions()
* Removed partedUtils.get_partition_name()David Cantrell2009-02-121-7/+7
| | | | Now provided by parted.Partition.getDeviceNodeName()
* Removed partedUtils.getPartSizeMB()David Cantrell2009-02-121-3/+3
| | | | | The parted.Partition object provides getSize() to return the size of the partition in a human-readable format.
* Remove partedUtils.sniffFilesystemType()David Cantrell2009-02-121-6/+5
| | | | This function is just a pass-through for isys.readFSType().
* Rewrite iscsi code using libiscsiHans de Goede2009-02-111-0/+3
| | | | | | | | | | | | | | | | | | | This patch replaces the iscsi.py code with new code using libiscsi, getting rid of the awefull configfile mangling to set auth info hack, and in general making it much cleaner. Fixes: -Report error when we cannot add a disk instead of silently failing (461830) -Report error when trying to use iscsi from kickstart without having an iscsiname directive first (463156) -Better feedback while scanning iscsi disks -Make ibft work with chap and 2-way chap -Make ibft configured disks available for upgrades and in rescue mode -Make ibft boot work even when iscsi-initiator-utils is installed after the kernel in the transaction Note: libiscsi is available in Fedora now
* In addSnap(), check snapshots for data key before continuing (#433824)David Cantrell2008-12-021-0/+2
| | | | | data may not exist in the snapshots hash. If it isn't there, return to caller.
* Use hasPassphrase() instead of directly accessing passphrase member.David Lehman2008-11-121-1/+1
| | | | | Also, make LUKSDevice's passphrase member into __passphrase so it doesn't end up in anacdump.txt.
* Do not stop and restart iscsid when rescanning disks/partitions (#470223)Hans de Goede2008-11-081-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | anaconda kills and restarts iscsid each time an iscsi / zfcp disk gets added, resulting in messages like these on tty4: <28> Nov 6 11:30:06 iscsid: connection1:0 is operational now <28> Nov 6 11:30:07 iscsid: iscsid shutting down. <28> Nov 6 11:30:08 iscsid: iscsid with pid=1359 started <28> Nov 6 11:30:09 iscsid: session [iqn.2005-03.com.max:testdisk,192.168.1.100:3260] already running <28> Nov 6 11:30:09 iscsid: connection1:0 is operational after recovery (1 attempts) Esp. the "connection1:0 is operational after recovery (1 attempts)" clearly indicates that this is not a good thing todo. iscsid is designed as a kernel helper daemon, which when iscsi is used should be started and never stopped again. Note that this means iscsi.startup() also will not get called during the partitionobjinit step, this is a no-op the first time as then the initiator name has not been set yet, and if we go back and forth over this step we do not want to start / stop iscsid, just as we don't want to do that for each iscsi target added.
* The function getEncryptedDevice gets called correctly expect when we are inJoel Granados Moreno2008-11-071-0/+2
| | | | | kickstart and upgrading. This patch correct that behavior by calling it when we search for devices.
* Check for required space for / on live installs (#468867)Jeremy Katz2008-11-031-0/+9
| | | | | | We can actually check earlier on the live image how much space is needed and so we can pass that along. This reuses a string from later in the file so that we don't break the string freeze
* Make sure we differentiate locked luks devs from deleted ones.David Lehman2008-10-311-3/+8
| | | | | | | There was a regression in the patch for bug 465240 (commit 9c55aab9) that caused us to not only filter out locked PVs, but also newly created unencrypted PVs whose device name matched that of a just- deleted unlocked encrypted PV. Confused yet?
* Fix a typo that breaks kickstart with encryption. (#469318)David Lehman2008-10-311-1/+1
|
* Don't treat encrypted PVs as available if we don't have the key. (#465240)David Lehman2008-10-271-0/+6
| | | | | | | | This arises from the fact that we determine whether or not a device is a PV by looking at the partition type instead of probing the device's contents like with other filesystems/ptypes. So, if we have a PV that the user chose not to provide a passphrase for, we should not include it in the list of available PVs.
* Fix ext4 detection on existing partitions (#467047)Radek Vykydal2008-10-231-0/+10
| | | | | ext4 was detected only on lvm or raid or encrypted partitions. Fw port of rhel5's #466868 and #465248.
* Mark iscsi disks not used for / as autostart (rh461840)Hans de Goede2008-10-081-0/+40
| | | | | | | | | | | | | What is happening here is that with / on iscsi we do not want to try and start the node(s) corresponding to the raid / logvol / partition used to autostart because they are already started and the node database may even contain wrong info causing problems as described in bug 437891. However for /somedir on iscsi we do want to set the node to autostart, as there the node will not have been started from the initrd, so without starting it we won't have a connection to the disk for /somedir. Thus this commit sets node.startup to automatic for non / containing iscsi nodes only.
* Use one passphrase for all new LUKS devices and offer retrofit to old ones.David Lehman2008-09-151-35/+54
| | | | | | We only prompt for one passphrase for new devices. It gets used for all of them. If there are preexisting devices for which we have keys we also offer the option to add the new passphrase to the old devices.
* Handle preexisting swraid w/ encrypted member disks/partitions.David Lehman2008-08-261-1/+8
|
* Include "--encrypted" in anaconda-ks.cfg partitioning as needed. (#459430)David Lehman2008-08-191-0/+12
| | | | Do not, however, put the passphrase in there since it would be plaintext.
* Support establishing a global passphrase when creating encrypted devices.David Lehman2008-08-191-7/+26
|
* First crack at upgrade of systems with encrypted block devices. (#437604)David Lehman2008-08-131-1/+0
|
* In kickstart, prompt for new LUKS dev passphrase if not specified. (#446930)David Lehman2008-08-131-0/+33
|
* Consider clearpart and ignoredisk when scanning for encrypted partitions.David Lehman2008-08-131-0/+7
|
* Don't base mpath/dmraid/raid startup/stopping based on if lvm is activated yet,Peter Jones2008-08-131-6/+13
| | | | since they might be started before there are any LVs. (this fixes dmraid.)
* Fix a string typo.Chris Lumens2008-08-081-1/+1
|
* Use attributes to tell us whether filesystems are bootable (#457037).Chris Lumens2008-07-291-6/+2
|
* Move all the exceptions into a single file.Chris Lumens2008-06-091-1/+1
|
* 2008-06-04 Ján ONDREJ <ondrejj@salstar.sk> (via ondrejj@fedoraproject.org)Ján ONDREJ2008-06-041-5/+25
| | | | * po/sk.po: Typo fix.
* Don't use size to determine if a partition is an EFI system partition; instead,Peter Jones2008-04-251-3/+4
| | | | check that it's not our install image.
* Bootable requests can not be on logical volumes (#439270).Chris Lumens2008-04-011-1/+4
|
* Handle fstype munging in isys.readFSType instead of in various other places.David Lehman2008-03-281-7/+4
|
* Fix a typo in new encrypted LV code.David Lehman2008-03-281-1/+1
|
* Improve handling of logical volume device names when encrypted.David Lehman2008-03-281-2/+3
| | | | Use of the /dev/mapper/VolGroupXX-LogVolXX node allows us to rely on the basename being unique.
* Add support for discovery of preexisting LUKS encrypted devices.David Lehman2008-03-281-8/+83
| | | | Scan for encrypted devices while reading the initial partition layout from disk. Prompt for passphrases and include encryption information in the RequestSpec.
* Support reading the UUID from the disk like we do with labels.Chris Lumens2008-03-181-1/+1
| | | | | This fixes mounting disks by UUID in upgrades and probably rescue mode as well.
* Fix traceback with preexisting LUKS partitions in setFromDisk. (part of #437858)David Lehman2008-03-171-15/+16
|
* Do not strip leading or trailing whiltespace from passphrases. (#437499)David Lehman2008-03-141-1/+1
|
* Handle /boot/efi and /boot both as bootrequestsPeter Jones2008-03-141-7/+12
|
* Ignore LUKS headers on partitions containing RAID signatures. (#437051)David Lehman2008-03-131-0/+5
| | | | When scanning partitions for LUKS headers, we first check if libblkid says the partition has a RAID signature (we cannot rely on partition type). If it does, we assume that any LUKS header present is spurious.
* Use iutil.isEfi() instead of testing for ia64-ness.Peter Jones2008-03-041-29/+9
|
* Add a method to scan all disks for encrypted devices.David Lehman2008-02-051-0/+100
| | | | The user is prompted to enter a passphrase for each device as it is encountered.