summaryrefslogtreecommitdiffstats
path: root/storage/devicelibs
Commit message (Collapse)AuthorAgeFilesLines
...
* 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