summaryrefslogtreecommitdiffstats
path: root/storage
Commit message (Collapse)AuthorAgeFilesLines
* Add a function that determines which devices match a given shell glob.Chris Lumens2009-11-201-0/+19
| | | | | | | | | | | | | | This is handy for large configurations so you can specify: clearpart --drives=sda? Instead of: clearpart --drives=sdaa,sdab,sdac,sdad,sdae,sdaf,... All shell globs are supported here, and all the DEVLINKS are checked against the glob. This means you can use /dev/disk/by-path paths without knowing the whole big thing.
* Extend udev_resolve_devspec to allow specifying devices in more ways.Chris Lumens2009-11-201-3/+7
| | | | | | | This allows specifying by anything that could be in DEVLINKS, which includes stuff like UUID a second way, physical device path on the system, serial number, and perhaps other methods depending on what kinds of devices are installed. The next step is making this work throughout kickstart.
* 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
|
* Write /etc/dasd.conf to target system on s390 (#533833).David Cantrell2009-11-124-3/+31
| | | | | | | Similar to what we have to do for zFCP, write /etc/dasd.conf to the target system for all DASD devices that have been used during installation. The device address as well as flags that can be set via sysfs.
* Latest dracut has new syntax for rd_DASD.David Cantrell2009-11-121-23/+5
| | | | | | | | | | | | Upstream accepted my patch to change rd_DASD to specify a single device. If multiple devices need to be brought up at boot time, just give multiple rd_DASD arguments. Syntax is (from dracut.8): rd_DASD=<CCW address>[,readonly=X][,use_diag=X][,erplog=X][,failfast=X] The old rd_DASD has been renamed rd_DASD_MOD and is the same syntax as the dasd kernel module parameter. However, you can only specify a single rd_DASD_MOD parameter at boot time.
* Handle case of not enough space in VG more gracefully. (#533797)David Lehman2009-11-121-1/+5
|
* Make sure partitioning-related drive lists are sorted properly. (#534065)David Lehman2009-11-122-1/+3
|
* Leave one free logical block before each logical partition.David Lehman2009-11-111-0/+6
|
* Use Chunk's geometry attr to access the parted Geometry.David Lehman2009-11-111-1/+2
|
* Fix sorting of requests by mountpoint. It was backwards.David Lehman2009-11-111-1/+1
|
* Align logical partitions' start sector up one logical block for metadata.David Lehman2009-11-111-18/+4
|
* Use parted.Device's sectorSize attr instead of physicalSectorSize.David Lehman2009-11-111-6/+6
|
* Select partition layout based on potential for growth.David Lehman2009-11-111-19/+99
| | | | | | For each partition, choose the free space region that provides the greatest amount of combined growth for the partitions allocated up to that point.
* Reimplement partition growing.David Lehman2009-11-111-180/+411
| | | | | Use Request and Chunk instances to calculate growth for all partitions, then recreates and add the partitions to disk with new geometries.
* Create and use a function to obtain a parted alignment for a disk.David Lehman2009-11-111-0/+19
| | | | | Once the bits are in pyparted this function can be made to actually retrieve a meaningful alignment.
* Create and use a new function to create and add new partitions to disk.David Lehman2009-11-111-29/+38
|
* Make and use a new function to remove non-existent partitions.David Lehman2009-11-111-19/+35
|
* Disable parted's cylinder alignment code.David Lehman2009-11-111-13/+5
| | | | | This also eliminates the need for the min/max constraint when adding a new partition.
* Use new functions for conversion between size and sector count.David Lehman2009-11-111-11/+28
|
* Consider whether a partition is growable when choosing free space.David Lehman2009-11-111-8/+22
| | | | | | For fixed-size requests, choose the smallest suitable region. For growable requests, choose the largest suitable region. For bootable requests, as before, choose the first suitable region.
* Allocate fixed-size requests before growable requests.David Lehman2009-11-111-4/+9
| | | | Also give a little bump based on mountpoint.
* Set boot flag for /boot on mdraid 1 array too (#533533).Radek Vykydal2009-11-111-5/+11
|
* Report no media present for cpqarray controllers with no disks attachedHans de Goede2009-11-111-1/+7
| | | | | | Some drivers (cpqarray <blegh>) make block device nodes for controllers with no disks attached and then report a 0 size, treat this as no media present.
* When creating a new md array check we have enough members (#533027)Hans de Goede2009-11-101-0/+6
| | | | | | | | | Make MDRaidArrayDevice.__init__ raise a value exception when creating a new (so non existing) raid set and there are not enough members for the requested raid level. And catch this value exception in the GUI raid dialog and kickstart raid commands.
* Don't activate / de-activate dmraid sets on setup / teardownHans de Goede2009-11-091-19/+4
| | | | | | | | | | | | | | | | | Since BIOS RAID sets never change there is no need to deactivate them and later activate them again. This also fixes problems in case the followng happens: 1) raid sets get activated, pyblock creates device-mappings for partitions on the set. 2) The partition table changes while exectuing actions 3) the raid sets gets de-activated, because of devicetree.processActions() tearing down everything in response to a disklabel commit error caused by lvm or mdraid using a partiton 4) pyblock tries to remove the partition mappings as it has created them, but the partition table has changed, and when parted commits partition table changes of a dmraid set to disk, it also modifies the partitions device-mappings. pyblock tries to remove a non existing mapping -> backtrace.
* Remove previous mdadm bug 523334 workaorundHans de Goede2009-11-091-12/+1
| | | | | | Since we are no longer stopping / re-starting mdraid container arrays, we no longer need the workaround for the mdadm --stop on containers bug in the MDRaidArrayDevice teardown method.
* Don't stop mdraid containers or their arrays (#532971)Hans de Goede2009-11-091-0/+6
| | | | | | | Since BIOS RAID sets (containers in mdraid terminology) never change there is no need to stop them and later restart them. Not stopping (and thus also not starting) them also works around bug 523334, which is the cause of bug 532971.
* Take the spec's requiredSpace into account when creating LVs.Chris Lumens2009-11-041-0/+5
| | | | | This allows us to disregard certain requests when there's not enough space in the VG for the request to make any sense.
* Add the PartSpec.__str__ method for debugging.Chris Lumens2009-11-041-1/+36
|
* Trim the inital / off the mountpoint before making an LV name from it.Chris Lumens2009-11-041-1/+5
| | | | This prevents LVs from being named things like "lv__home".
* Fix status for and consolidate handling of '-' in vg/lv names. (#527302)David Lehman2009-11-031-11/+22
|
* In execWithCallback(), support disabling stdout echo (#528386)David Cantrell2009-11-021-1/+1
| | | | | stdout echo is on by default, add a parameter that lets us turn that off if we want to.
* Call udev_trigger with a "change" action and don't filter out dm devices.David Lehman2009-10-301-3/+4
|
* 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.
* Log why we're exiting the installer in storage.DASD.startup()David Cantrell2009-10-291-0/+1
| | | | | If the user selects Exit Installer, log a message indicating as much and then exit.
* Use 'zerombr' kickstart command for DASDs needing dasdfmt (#528386).David Cantrell2009-10-292-8/+19
| | | | | | | | | If performing a kickstart install on s390, dasdfmt is only run if: a) There is a UI available to prompt the user. b) 'zerombr' is specified in the kickstart file. The zerombr command will also skip the UI if there is one. The UI prompt is a fallback.
* Find and format any unformatted DASD devices (#528386).David Cantrell2009-10-282-0/+175
| | | | | | | | | | | | | | | | | | | | | | Before the device tree is built in the storage code, run through the DASD devices on the system and format any with a status of 'unformatted'. We have to run dasdfmt on these devices before we can partition them. Under RHEL-5, this process was serial and the user had to click Yes for each unformatted DASD found, which could take a really long time if you had thousands of DASDs. The idea now is that if the DASD is seen by anaconda, we want to use it for installation. The stage 1 device initialization routines as well as the CMS conf file provided at boot time allow the user to restrict the range of devices we see during installation. If any of the devices we see are unformatted, run dasdfmt before building the devicetree. This process is implemented in a DASD class that works similar to the iscsi and zfcp classes. That is, devices may need to be started or brought in to a working state before the anaconda storage code can use them.
* 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.).
* Fix DASD and zFCP device discovery (#530287).David Cantrell2009-10-262-10/+9
| | | | | | | | | | | Syntax error with kwargs in DASDDevice. Use kwargs.pop() in both DASDDevice and ZFCPDiskDevice so DASD or zFCP specific kwargs are not passed to DiskDevice.__init__(). Remove the incorrect name variable setting in ZFCPDiskDevice. Change 'devices' to 'device' in udev_device_get_zfcp_attribute() so that zFCP attributes can be read.
* max_logical -> max_logicals (#530786).Chris Lumens2009-10-261-1/+1
|
* Filter out device-mapper devices when doing a udev_trigger.David Lehman2009-10-221-2/+2
| | | | | As of now, a udev "add" event on an existing dm device causes the device node to be removed from the /dev directory, which is bad.
* 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.
* Mark live device as protected instead of ignoring it. (#517260)David Lehman2009-10-202-12/+11
|
* Don't force logical with a free primary slot and an extended. (#527952)David Lehman2009-10-201-15/+21
| | | | | Also rewrite getNextPartitionType for clarity so that bugs like this will be easier to identify and fix in the future.
* 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.
* Add dracutSetupData() method to DASDDevice (#526354).David Cantrell2009-10-151-0/+25
| | | | | | | Return kernel parameter information for the DASD. NOTE: This is using the current rd_DASD parameter in dracut, which is just a copy of the dasd= kernel parameter. Will change this once dracut gets a better rd_DASD parameter.
* Collect DASD kernel parameter information during device tree scan (#526354).David Cantrell2009-10-153-5/+25
| | | | | | | Expand the DASDDevice class to hold the device bus ID and flags that are passed at boot time. Add udev functions to return the bus ID and flag values for DASD devices. When building the device tree, read the DASD information and pass that to the DASDDevice object.
* Add dracutSetupString() method to ZFCPDiskDevice (#526354).David Cantrell2009-10-153-12/+62
| | | | | | | | | Collect CCW bus ID, WWPN, and FCP LUN values for zFCP devices when building the device tree. Store these in the ZFCPDiskDevice object and use them to generate the rd_ZFCP= string for dracut. Expand storage/udev.py with functions to determine if a device is zFCP and to get arbitrary attribute values.