summaryrefslogtreecommitdiffstats
path: root/storage
Commit message (Collapse)AuthorAgeFilesLines
...
* Use named parameters for translatable strings with multiple params.David Cantrell2009-10-014-70/+102
| | | | | | | | | | | | | | | | This is a cleanup for the po files. xgettext displays the following messages for some Python files: warning: 'msgid' format string with unnamed arguments cannot be properly localized: The translator cannot reorder the arguments. Please consider using a format string with named arguments, and a mapping instead of a tuple for the arguments. This patch modifies the reported format strings to use named parameters per the warning message. We were already using these style format strings in users.py and possibly other files. Basically when there is more than one parameter in the format string, we should use a hash table with named parameters.
* Change 'support' to 'supported' in UnknownSwapError dialog (#526549)David Cantrell2009-10-011-1/+1
| | | | Not the actual bug fix, just cleaning up the dialog box messages.
* Try to include error messages in lvm/mdadm exceptions.David Lehman2009-10-012-131/+107
| | | | | This should reduce the dogpiling in bugzilla for overly-generic errors like "lvcreate failed for VolGroup/lv_root".
* New function to tell us if there is free space for a new partition.Joel Granados Moreno2009-10-011-0/+14
| | | | | | It is not implemented for now. Going to wait for the new doPartitioning code. * storage/partitioning.py (hasFreeDiskSpace): New function.
* Don't fail to commit partitions due to active lvm/md.David Lehman2009-10-011-1/+8
| | | | | | | | If we get a failure to commit a partitioning change to disk, the first thing to do is try shutting down all devices: In the case of lvm-on-md we implicitly activate the md device in order to wipe an lv that we're about to destroy. Subsequent attempts to commit to a disk containing any of the md device's members will fail because the md is still active.
* Create and use DiskLabelCommitError for failure to commit.David Lehman2009-10-012-2/+5
|
* Work around partition renumbering in processActions.David Lehman2009-10-011-6/+26
|
* Re-get preexisting partitions using their original path.David Lehman2009-10-011-2/+4
| | | | | | The path attribute may have changed due to parted renumbering things, so we need to grab the partition by its original path instead. Otherwise we may be grabbing the wrong partition.
* Don't store a copy of ActionDestroyFormat's device attr.David Lehman2009-10-011-18/+7
|
* 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.
* Stop /lib/udev/rules.d/65-md-incremental.rules from messing with mdraid setsHans de Goede2009-09-301-0/+4
| | | | | | | | | | Touch /dev/.in_sysinit, as that stops /lib/udev/rules.d/65-md-incremental.rules from messing with mdraid sets. This patch adds the touching twice, once to our own init, for when running as standalone installer, and once in python for when running from a livecd, to stop the udev trigger "block" we do will cause /lib/udev/rules.d/65-md-incremental.rules to trigger in the livecd case.
* Don't try to do format handling on drives without media (#523467)Hans de Goede2009-09-301-0/+4
|
* Make sure the disk holding /boot is setup before setting boot flag (#526063)Hans de Goede2009-09-291-0/+1
| | | | | | | | | When re-using existing partitions, without changing them other then formatting them, the disk for /boot may not be yet setup when writing the bootable flag to its partition table. This triggers an error like: Error opening /dev/mapper/jmicron_GRAID : No such file or directory When the disk in question is a dmraid set.
* Return None for next part type if all primary slots full. (#524859)David Lehman2009-09-251-6/+7
|
* Honor ignoredisk --only-use. (#514353)David Lehman2009-09-221-0/+6
|
* Add handling for snapshot and mirrored logical volumes to DeviceTree.David Lehman2009-09-211-2/+48
|
* Add attrs to LVMLogicalVolumeDevice class for snapshots and mirrored lvs.David Lehman2009-09-211-4/+24
|
* Add function lvorigin to determine the name of a snapshot's origin lv.David Lehman2009-09-211-0/+16
|
* Add function udev_device_get_lv_attr to retrieve lv attribute strings.David Lehman2009-09-211-0/+8
|
* Don't write an empty mdadm.confHans de Goede2009-09-181-2/+5
| | | | | | | | | | | | When we've got nothing to put in there don't write mdadm.conf, this means rc.sysinit won't call "mdadm -As --run" with an empty mdadm, this is important because: 1) It will speed up booting 2) With an empty mdadm.conf mdamd will scan all disks and try to bring up any raidsets it can find. Including sets which we may not want to be brought up, such as ddf metadata sets (should be handled by dmraid) and imsm metadata sets even when nodmraid or noiswmd is specified.
* Write mdraid arrays to mdadm.conf in sorted orderHans de Goede2009-09-181-0/+7
| | | | | | | | This not only looks nicer, but this will also put containers (which get md0, md1, etc.) before their members (which get md127, md126, etc.). and lame as it is mdadm will not assemble the whole stack in one go unless listed in the proper order mdadm.conf
* containers and their sets must only have a UUID= parameter in mdamd.confHans de Goede2009-09-181-3/+4
|
* Use pyblock for device-mapper devices' status.David Lehman2009-09-151-16/+10
|
* Try harder to stop mdraid arraysHans de Goede2009-09-151-1/+13
| | | | | | | | Sometimes mdadm --stop reports failure, but the array stops after a while never the less, this happens with container members, see bug rh523334 (this works around the first scenario mentioned in the bug, the second scenario will still cause anaconda to fail).
* Log when we are skipping disks without mediaHans de Goede2009-09-151-1/+4
|
* Don't scan stopped md devicesHans de Goede2009-09-151-0/+10
| | | | | | mdraid is really braindead, when a device is stopped it is no longer usefull in anyway (and we should not probe it) yet it still sticks around, see bug rh523387
* Make udev_get_block_device() return None on failureHans de Goede2009-09-151-1/+1
| | | | | udev_get_block_device() was returning a fake "empty" dict on failure, but all its callers expect it to return None on failure.
* Do not pass --update=super-minor to mdadm for containers and sets there inHans de Goede2009-09-152-3/+13
| | | | | | Passing --update=super-minor to mdadm for containers and sets there in leads to corrupt superblocks, see: bug rh523320, work around this for now by not passing --update=super-minor in these cases.
* Write mdadm.conf lines for mdraid container formats (imsm)Hans de Goede2009-09-154-9/+56
| | | | | | | | | | | | | | | Ok, so the purpose of this patch is too write mdadm.conf lines for mdraid container formats (imsm), but what it does is it cleans up handling of mdraid container formats in general, with the writing of mdadm.conf writing as a bonus effect really. We were adding mdraid container members (raidsets inside the container) to the device tree as DiskDevices. Which works, but is not completely correct. This patch introduce a PartitionableMDRaidArrayDevice and uses that for mdraid container members instead. This means we now also correctly tear them down / set them up when asked. In the future (mostly needs UI work to export the functionality) PartitionableMDRaidArrayDevice can be used to create partitionable normal (native metadata) mdraid sets too.
* Install dracut-network when using network storageHans de Goede2009-09-151-2/+3
| | | | | Install dracut-network when using network storage, so that we will be capable of booting of network storage.
* write netroot=fcoe:... to kernel cmdline in grub.conf for dracutHans de Goede2009-09-151-0/+3
|
* write iscsi initiator name to kernel cmdline in grub.conf for dracutHans de Goede2009-09-152-0/+4
|
* 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-144-1/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Remove partitions in reverse order when clearing disks.David Lehman2009-09-111-9/+5
| | | | | | | | This helps us to avoid parted's renumbering nonsense. This patch also streamlines clearPartitions so that it removes the partitions inside the loop instead of building a list and iterating over it separately to remove the partitions.
* Improve the info provided to DeviceAction.__str__.David Lehman2009-09-111-11/+8
| | | | | | | | - Move format property up to DeviceAction so it can be inherited - Use the format property in DeviceAction.__str__ - Include device id in DeviceAction.__str__ - Include migration target name in ActionMigrateFormat.__str__ - Reword from, eg: "sda2 (partition)" to "partition sda2 (id 4)"
* Include device id in log lines since partitions can get renumbered.David Lehman2009-09-112-12/+19
|
* Don't try to preserve old format attrs when reinitializing pvs.David Lehman2009-09-111-3/+1
|
* remove the no longer used initcb and initlabel DiskDevice.__init__ argumentsHans de Goede2009-09-111-13/+5
| | | | | Remove the no longer used initcb and initlabel arguments from DiskDevice and friends __init__.
* Get DMRaidArrayDevice's a DiskLabel format when they are added to the treeHans de Goede2009-09-101-0/+7
| | | | | | | We were waiting for DMRaidArrayDevice's to be scanned before giving them a DiskLabel format, however this causes backtraces if a partition on the raid array gets scanned before the array itself: AttributeError: 'DeviceFormat' object has no attribute 'partedDisk'
* Handle UnknownSwapError when turning on existing swap volumes.David Cantrell2009-09-071-0/+9
| | | | If we get UnknownSwapError, alert the user and offer some options.
* Check for a valid interface in swapErrorDialog, exit without one.David Cantrell2009-09-071-29/+30
| | | | | | | Move the test for anaconda.intf to the swapErrorDialog() function. If we don't have one, exit (consistent with existing behavior). Simplify the exception handlers that call swapErrorDialog() and remove the tests for anaconda.intf.
* On SuspendError, allow users to skip/format/exit like OldSwapError.David Cantrell2009-09-071-2/+2
| | | | | | | Before the storage rewrite, we let users force a reformat of a detected swap volume currently being used as a software suspend volume, skip it entirely, or exit the installer. Bring that functionality back rather than forcing an exit.
* Raise exception if detected swap volumes are not Linux v1 swap space.David Cantrell2009-09-072-0/+8
| | | | | | | Safety net for detected swap volumes. We trap v0 swap space and swap partitions currently in use for software suspend. After all that verify that the detected volume is v1 swap space. If not, raise UnknownSwapError.
* Handle OldSwapError (#510817)David Cantrell2009-09-041-38/+67
| | | | | | | | | Like before, offer users the ability to skip, format, or exit. Skip removes the device from the devicetree. Format will force a reformat. Exit is pretty self-explanatory. OldSwapError is raised when we find a swap partition with the SWAP-SPACE signature.
* 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 put device node path, but the fs UUID in fstab for mdraid: (#519337)Hans de Goede2009-09-041-4/+0
| | | | | mdraid device node minors aren't really stable, esp. not when using mdraid for (Intel) BIOS RAID.
* Expose common fsset methods and properties in class Storage.David Cantrell2009-09-032-10/+61
| | | | | | | | | | | | | | | | | | | | | | | | Add the following methods and properties to class Storage which map through to FSSet methods, modify existing calls to use the method on class Storage: turnOnSwap() mountFilesystems() umountFilesystems() parseFSTab() mkDevRoot() createSwapFile() fsFreeSpace() mtab mountpoints migratableDevices rootDevice Callers no longer need to pass the Anaconda object to the FSSet methods directly. The method on Storage takes care of that. The mtab() method on FSSet is exposed as a property on Storage. The same is true for fsFreeSpace().
* Handle rootPath referencing a chroot value or actual path (#519665)David Cantrell2009-09-021-12/+8
| | | | | | Still related to #519665, but account for anaconda.rootPath containing the chroot value passed to the mount() method on the format. But for install types as indicated in the bug, rootPath will be the actual path.
* Support rootpath overrides in fsset.rootDevice (#519665)David Cantrell2009-09-021-1/+6
| | | | | | If you override rootpath on the anaconda command line, the rootDevice property will return None because it's looking for a device with mount point "/" rather than the path you passed to --rootpath.