summaryrefslogtreecommitdiffstats
path: root/storage/formats
Commit message (Collapse)AuthorAgeFilesLines
* DiskLabel.status can't be determined so return False. (#563526,#561074)David Lehman2010-02-221-4/+1
|
* Show the correct device path when formatting as swap or luks.David Lehman2010-02-162-2/+4
|
* Fix ordering of arguments to xfs_admin for writing fs label. (#556546)David Lehman2010-02-161-0/+6
| | | | xfs_admin expects -L <label> <device>.
* Don't return the passphrase from hasKey. Should return a boolean.David Lehman2010-02-051-1/+1
|
* Fixup partition aligning (#560586)Hans de Goede2010-02-011-0/+10
| | | | | | | | | | | | | | | | | | 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.
* MDRaidMember.__str__ add biosraid attribute to the returned stringHans de Goede2010-01-221-1/+2
|
* iutil.execWithRedirect() hasn't used searchPath= since 2006. Take it out.Peter Jones2010-01-151-7/+4
| | | | | iutil.execWithRedirect() stopped doing anything with searchPath in 2006 when clumens committed d0dec24. Remove these silly vestigal bits.
* Fixup various errors detected by pylintHans de Goede2010-01-141-3/+4
| | | | | | | | | | | | | | | | | | 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
* Make sure to clear partitions before destroying a disklabel.David Lehman2010-01-131-0/+3
| | | | | | | | | 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.
* NTFS filesystems are not really modifiable in any real sense. Admit it.David Lehman2010-01-131-1/+1
|
* Add a "dict" attribute to Device and DeviceFormat classes.David Lehman2009-12-227-0/+55
| | | | | | | 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.
* Put fsprofile support back in.David Lehman2009-12-221-1/+5
|
* Add __str__ methods to the DeviceFormat classes.David Lehman2009-12-169-0/+84
|
* Hide biosraid member devices that contain MDRaidMember formats.David Lehman2009-12-161-0/+5
| | | | This brings the behavior in line with other (dmraid) biosraid members.
* Add an alignment property to DiskLabel.David Lehman2009-12-151-0/+32
|
* Change btrfs command line optionJosef Bacik2009-12-091-1/+1
| | | | | | | | | | | 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>
* Improve disklabel's name attr so we don't have to hide them anymore.David Lehman2009-12-091-2/+10
|
* Hide devices with certain formatting in the main partitioning UI.David Lehman2009-12-094-0/+9
| | | | We don't want to show biosraid, multipath, &c disks in the GUI.
* Use selinux python module for file context operations.David Lehman2009-12-081-4/+6
|
* Whenever storage code tries to log a method call, do so into the ↵Ales Kozumplik2009-12-039-11/+11
| | | | | | | '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.
* Display progress or wait window when formatting devices.David Lehman2009-11-304-26/+67
| | | | | | 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.
* Don't attempt to get the size of a filesystem unless it's supported (#540598).Chris Lumens2009-11-241-1/+1
| | | | | | | 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.
* Log calls to DiskLabel's commit and commitToDisk methods.David Lehman2009-11-121-0/+4
|
* Fix DiskLabel.status so it returns True, not self.partedDisk, when active.David Lehman2009-11-121-1/+2
|
* Fix "resize failed: 1" errors for ext2/ext3/ext4 (#517491).David Cantrell2009-10-291-3/+25
| | | | | | | | | | | | | | | | 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.
* When doing initlabel on a dasd disk create a dasd disklabel (#531209)Hans de Goede2009-10-281-1/+2
| | | | | | | 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.diskLabelTypeHans de Goede2009-10-281-1/+1
| | | | | Rename platform.diskType to platform.diskLabelType, as diskType is confusing (we usally use it to refer to is the disk dasd, iscsi, zfcp, etc.).
* Allow /boot to be on a variety of filesystems during kickstart (#529846).Chris Lumens2009-10-211-1/+1
| | | | | | 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.
* Improve message given to user for fsck failures (#527626).David Cantrell2009-10-191-2/+64
| | | | | | | | 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.
* Set parted filesystemtype for swap partitionsHans de Goede2009-10-141-1/+2
| | | | | | | | | | 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.
* Missing volume_key shouldn't break LUKS support completely. (#526899)David Lehman2009-10-121-1/+7
| | | | | | 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.
* Set partedPartition system to the correct FS when creating an FSHans de Goede2009-10-082-0/+19
| | | | | | | | | | | | | | 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.
* On lookup of a PartedDevice also check for _ped.DeviceException (#527699)Hans de Goede2009-10-071-1/+1
| | | | | | | | 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.
* Add --label to anaconda-ks.cfg if needed (#526223).Chris Lumens2009-10-052-0/+6
|
* Fix existing size calculation for NTFS (#520627)David Cantrell2009-10-021-1/+2
| | | | Rounding errors when computing the existing size of NTFS volumes.
* Write label to filesystem if we have one set (#526226, #526242)David Cantrell2009-10-021-1/+5
| | | | | | 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.
* Create and use DiskLabelCommitError for failure to commit.David Lehman2009-10-011-2/+2
|
* Don't retry commiting partition table to diskHans de Goede2009-10-011-17/+6
| | | | | | 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.
* Make iswmd the defaultHans de Goede2009-09-152-2/+3
| | | | | | 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 escrow supportMiloslav Trmač2009-09-141-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Support a force=True argument on SwapSpace.create()David Cantrell2009-09-041-2/+6
| | | | | force=True will tear down the device, unmount if necessary, and then reformat it.
* Do not traceback on an usb cardreader with no card presentHans de Goede2009-09-021-2/+9
| | | | | | | | 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
* clobber is a method of PartedDevice not PartedDiskHans de Goede2009-09-011-1/+1
|
* Remove unused fsFromConfig methodHans de Goede2009-09-011-17/+0
| | | | Remove unused fsFromConfig method, it is not used and has syntax errors in it.
* pylint does not like @foo.setterHans de Goede2009-09-012-8/+10
| | | | | | | 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.
* Don't hardcode path to tune2fs.David Lehman2009-08-311-1/+2
|
* Update PartitionDevice's partedPartition when the PartedDisks get resetHans de Goede2009-08-281-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Do not try to commit disks changes to the os while partitions are in useHans de Goede2009-08-261-0/+7
| | | | | | | | | | | | | | | 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!).
* disklabel.commit(): DeviceError -> DeviceFormatErrorHans de Goede2009-08-261-1/+1
| | | | | | | | | | | 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)
* Use the Platform's idea of what filesystem /boot can be on.Chris Lumens2009-08-201-2/+3
|