summaryrefslogtreecommitdiffstats
path: root/storage/devicelibs
Commit message (Collapse)AuthorAgeFilesLines
* Bring luks_add_key and luks_remove_key back into devicelibs.crypto.David Lehman2009-04-241-4/+65
| | | | | | | | In order to include these in pycryptsetup we had to create yet another duplicate copy of execWithRedirect. This patch brings them back into anaconda so we can easily modify them if needed until the day when pycryptsetup has this functionality. It also allows us to redirect the output to someplace useful for debugging.
* Mdadm's incremental mode ignores the auto option, so don't use it.David Lehman2009-04-211-1/+0
|
* Reimplement mdexamine using a more easily parseable output format.David Lehman2009-04-211-41/+16
|
* Fix position of "--run" option to mdadm assemble.David Lehman2009-04-211-2/+2
| | | | | | Having run as the first argument sets the mode to miscellaneous, which is not what we want -- we want assembly mode since we are assembling an array.
* Fix editing of raid device (persistence of level choice) (#496159)Radek Vykydal2009-04-171-8/+24
| | | | | | I didn't want to add another 0/'0'/'RAID0' tweaking so I made mdraid.raid_levels and mdraid deviceclass level attribute to contain constants for levels defined in mdraid.py.
* Make sure we "insist" on mdadm commands. (491729)Joel Granados Moreno2009-04-171-1/+2
|
* Fix processing of --level and --device options of ks raid commands.Radek Vykydal2009-04-081-1/+1
| | | | | | | | | | * We get RAID1 from ks parser, mdadm accepts only lowercase level specifiers of this form. * We get int device number (e.g. 0) from ks option --device (e.g. md0). Though this might require rather changes in pykickstart, especially when mdadm 3.0 allows creating of arbitrary device names in /dev/md. * mdadm --create --level option is changed to comply strictly to documentation (e.g. "--level=raid0", though "--level raid0" works too)
* Make sure we have a clean lvm ignore list when we initialize.Joel Granados Moreno2009-04-071-0/+5
| | | | This is good for when we go back and have to reset the devicetree.
* Fixes of errors shown by pylint that didn't get into the beta build.Martin Gracik2009-03-313-4/+4
|
* Don't write out md member devices to a config file for assemble.David Lehman2009-03-301-21/+1
| | | | | This was either to work around a bug in mdadm or my bad usage, but either way it is no longer necessary.
* Remove unused getVG{Free,Used}Space methods.Chris Lumens2009-03-271-19/+0
|
* Code fixes of errors shown by pylint (mgracik).Chris Lumens2009-03-253-1/+5
| | | | | | This only fixes the serious errors that may affect F11 Beta. There's still a lot of patch left that fixes some more nitpicky stuff which can come in later.
* Use the same units (MB) for extent size that we do for everything else.David Lehman2009-03-241-1/+1
|
* Handle system crappyness.Joel Granados Moreno2009-03-191-7/+20
| | | | | | | | | | | | | | | | | | | | * storage/__init__.py (createSuggestedVGName): Take into account the new lvm black list. * storage/devicelibs/lvm.py (blacklistVG): New function, add a VG to a the black list. * storage/devicelibs/lvm.py (vgreduce): introduces a new argument to the function. rm means use the lvm --removemissing option. * storage/devices.py (LVMVolumeGroupDevice.complete): New function to evaluate if VG is consistent. * storage/devices.py (LVMLogicalVolumeDevice.complete): Likewise for LVs. * storage/devicetree.py (_handleInconsistencies): New function intended to catch all unwanted behavior from the system before continuing. * storage/devicetree.py (questionReinitILVM): New function intended to ask the user what to do in case we find inconsistent LVM metadata.
* Do not hang when creating raid array with member having filesystem detected ↵Radek Vykydal2009-03-181-1/+1
| | | | (#490891)
* Fixed the names of the variables for lvm.py functions.Martin Gracik2009-03-161-4/+4
| | | | | lv_name is passed to the function, not lv_path, which was used in the raise statements.
* Added test case for devicelib mdraid.py.Martin Gracik2009-03-131-38/+40
| | | | | | | | | | Rewrote the devicelibs unittest baseclass so we can create and remove another loop devices within the tests. Rewrote the isRaidXY(raidlevel) functions in mdraid.py into one function isRaid(XY, raidlevel). Rewrote the get_raid_min_members and get_raid_max_spares functions to use the new isRaid function, and not use many if-elif-else statements. Changed the minimum raid members for raid10 to 2.
* Add a list that lvm should ignore.Joel Granados Moreno2009-03-131-46/+140
| | | | | | | | | | | | | | | | | | | We use the --config argument from lvm to pass a list of devices from devicetree.ignoredDisks to lvm so those disks can be ignored in lvm commands. * storage/devicelibs/lvm.py (config_args): Add global variable that will contain the "--config" argument. The argument will be a list ["--config", STRING_ARGS] * storage/devicelibs/lvm.py (composeConfig): Add function to create the config_args argument. * storage/devicelibs/lvm.py (lvm_cc_addFilterRejectRegexp): New function to regenerate the config_args with a new regular expression. * storage/devicelibs/lvm.py (pv*, lv*, vg*): Use the global variable for each LVM command. * storage/devicetree.py (DeviceTree): Instead of doing a self.ignoredDisk.append(DISK), we create a new function that adds DISK to the devicetree list and to the lvm list and whatever else we need.
* Use the pyblock functions when possible.Joel Granados Moreno2009-03-101-0/+9
| | | | | | | | | | | * storage/devicelibs/dm.py : For each function that is used in the storage code, we try to use pyblock first. We fail to calling dmsetup. * storage/devices.py : Erased the commented line that had the pyblock call. We are doing all the pyblock calls from storage/devicelibs/dm.py. * storage/devicetree.py : likewise. * storage/formats/dmraid.py : likewise.
* Move the mdRaidBootArches logic into the platform module.Chris Lumens2009-03-091-2/+0
|
* Do not pass None values into nonmandatory arguments, you are screwing the ↵Martin Sivak2009-03-061-1/+9
| | | | default values..
* Implement Storage.sanityCheck, mostly from old partitions code.David Lehman2009-03-041-0/+2
| | | | | | Also catch exceptions thrown by platform.bootDevice() and add mdRaidBootArches from old raid.py to storage.devicelibs.mdraid for use by the sanityCheck code.
* Install storage/ with the rest, include it and booty in images.David Lehman2009-03-041-0/+33
|
* Add MAX_LV_SLOTS and to lvm.py and remove unused pesize from getMaxLVSize.David Lehman2009-03-041-5/+4
|
* Added unittests for devicelibs lvm.py and swap.py; Corrected errors in ↵Martin Gracik2009-03-042-15/+22
| | | | lvm.py and swap.py
* Fix some remaining errors and require higher version of pycryptsetupMartin Sivak2009-03-031-2/+2
|
* Integrate the python-cryptsetup packageMartin Sivak2009-03-031-123/+35
|
* Lots of minor fixes and cleanups. A non-exhaustive list follows.David Lehman2009-02-275-71/+72
| | | | | | | | | | | - Change minsize/maxsize to minSize/maxSize since that's the convention elsewhere throughout the code. - Redirect output from all external utilities to tty5, not /dev/null. - Don't waste calls to basename for debug log statements, especially when the device can be None. - Add lots of missing imports. - Fix lots of remnants of previous code usage.
* Clean up imports, add header blocks as needed.David Lehman2009-02-235-5/+71
|
* Replace old storage modules.David Lehman2009-02-236-0/+890