summaryrefslogtreecommitdiffstats
path: root/storage
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Pass anaconda.rootPath to FSSet()David Cantrell2009-09-021-3/+4
| | | | | The FSSet objects needs to see anaconda.rootPath for a number of methods.
* Recheck if a partition should be ignored after getting its disk (#518971)Hans de Goede2009-09-021-0/+8
| | | | | | | | Recheck if a partition should be ignored after getting its disk (if its disk was not scanned yet). Once we've the disk, we need to recheck if the partition should be ignored again, as this catches cases when we scan the partition before the disk and we have for example a disk which is part of a BIOS raid set (and thus we should ignore the raw partitions).
* Do not traceback on an usb cardreader with no card presentHans de Goede2009-09-022-3/+10
| | | | | | | | 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
* Don't identify multi lun usb card readers as multipath (#517603)Hans de Goede2009-09-021-0/+14
| | | | | | | | | Some usb cardreaders use multiple lun's (for different slots) and report a fake disk serial which is the same for all the lun's (#517603) So if we have multiple disks with all the same serial, if they are all using the usb-storage driver, assume they are single path instead of multipath.
* Device class does not have a format memberHans de Goede2009-09-021-8/+18
| | | | | | | | The packages property in the Device class references format.packages, but format is not a member of Device (only of StorageDevice and derived classes). This patch fixes this by moving the format-related bits of the packages property into StorageDevice.packages .
* Device class does not have a path memberHans de Goede2009-09-023-68/+68
| | | | | | Our base Device class does not have a path member, so the make the second argument passed to DeviceError exceptions thrown by the base class the device name, not the path, and do the same in other places for consistency.
* 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.
* allocatePartitions: PartitionCount is a member of PartedDisk not DiskDeviceHans de Goede2009-09-011-1/+2
| | | | Courtesy of pylint (sort of).
* Fix storage/__init__.py:1857: non-keyword arg after keyword argHans de Goede2009-09-011-2/+2
| | | | Courtesy of pylint
* 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.
* Fix 55:udev_resolve_devspec: Using possibly undefined loop variable 'dev'Hans de Goede2009-09-011-1/+1
| | | | | | | Fix pylint warning: 55:udev_resolve_devspec: Using possibly undefined loop variable 'dev' Notice that the code makes more sense once fixed.
* MDRaidArrayDevice.totalDevices is a read only property so don't write itHans de Goede2009-09-011-1/+1
| | | | | MDRaidArrayDevice.totalDevices is a read only property so don't write it, set MDRaidArrayDevice._totalDevices instead.
* storage/__init__.py:471:Storage.exceptionDisks: Undefined variable 'udev'Hans de Goede2009-09-011-1/+1
| | | | | | | We do "import * from udev", so we should not call udev_trigger() as udev.udev_trigger(), but just as udev_trigger() Courtesy of pylint
* Save duplicates from /etc/fstab and don't traceback (#517498).Chris Lumens2009-08-311-1/+5
|
* Update fstab header to reference blkid instead of vol_id.David Lehman2009-08-311-1/+1
|
* Sort fstab entries by mountpoint. (#498354)David Lehman2009-08-311-1/+3
|
* Don't hardcode path to tune2fs.David Lehman2009-08-311-1/+2
|
* On kickstart installs, you can't select a different parttype (#519137, #520058).Chris Lumens2009-08-281-4/+12
| | | | | | | This is a particular problem on text kickstart installs, where there is no partitioning UI to go back to. Everywhere else in the partitioning code, we just tell the user that it's going to reboot instead of offering some choice. So, do the same thing in this case.
* Don't try to create a primary partition if all slots are taken. (#519784)David Lehman2009-08-281-7/+9
| | | | | This only gets hit if there are four preexisting primary partitions on a disk. Also cleaned up the conditionals a bit to improve clarity.
* Ignore partitions belonging to disks we've reinitialized.David Lehman2009-08-281-0/+6
|
* Handle newly initialized disklabels whether via ks or prompt. (#519235)David Lehman2009-08-281-20/+20
|