summaryrefslogtreecommitdiffstats
path: root/storage
Commit message (Collapse)AuthorAgeFilesLines
...
* 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.
* Don't set unnecessary multipath defaults.Peter Jones2009-10-152-8/+498
| | | | | | Use "device" entries in the config file rather than specifying configuration parameters in the "multipath" section of the config file. This gets us more reasonable configuration.
* Set parted filesystemtype for swap partitionsHans de Goede2009-10-141-1/+2
| | | | | | | | | | Our patch for adding support for the swap flag to parted msdos label handling has been rejected upstream, upstream says we should use ped_partition_set_system() instead. So do that, as I would like to drop this patch from our parted package eventually. This will also cause us to assign the right type to swap partitions in GPT tables, so this patch should go to F-12 too.
* Use ID_SERIAL to write multipath.conf, but ID_SERIAL_SHORT for UI.Peter Jones2009-10-131-2/+3
| | | | | multipath and multipathd expect the leading "3" in wwids, but that's bad in the user interface. So use one for one and the other for the other.
* Missing volume_key shouldn't break LUKS support completely. (#526899)David Lehman2009-10-121-1/+7
| | | | | | Live images don't contain volume_key, which makes sense since key escrow is kickstart-only functionality. At any rate, failure to import volume_key should only break key escrow.
* Write multipathd.conf in anaconda so that dracut can find it.Peter Jones2009-10-123-0/+70
| | | | | | This writes a multipathd.conf that whitelists the devices we're using in our multipath devices. It's a fairly basic configuration, and it doesn't handle ALUA yet.
* Add MultipathDevice.getDMNode(), because .updateSysfsPath() needs it.Peter Jones2009-10-091-0/+8
| | | | This should have been part of the previous commit but wasn't.
* Add MultipathDevice.updateSysfsPath()Peter Jones2009-10-091-0/+13
| | | | | MultipathDevice needs its own .updateSysfsPath(), because self.name is "mpath0" but the sysfs directory is /sys/class/block/dm-0 .
* Use addUdevPartitionDevice() for adding dmraid / multipath partitions (#527785)Hans de Goede2009-10-081-16/+7
| | | | | | | | | | With a kickstart install, with "clearpart --label", we will end up scanning pre-existing partitions after clearing the label. This leads to the backtrace as seen in #527785 and #526517. addUdevPartitionDevice() has special handling for this case, instead of copy and pasting this, this patch modifies addUdevPartitionDevice() so that it can be used for dmraid and multipath partitions too.
* Set partedPartition system to the correct FS when creating an FSHans de Goede2009-10-083-0/+22
| | | | | | | | | | | | | | The playing around with partedPartition flags only allows us to determine the partition table entry for certain usuages which are deemed special by parted. For normal FS usuage, parted will default to the type for the FS it has detected (for pre-existing partitions) or to Linux (83) for new partitions. This means that for example reformatting a vfat partition as ext3, or a new partition as vfat will lead to incorrect partition type entries in the partition table. This patch fixes this. This patch is intended for both master and F-12.
* Reset parted flags in createFormat not destroyFormatHans de Goede2009-10-081-8/+10
| | | | | | | | | | | | | | | | We were resetting the parted flags for re-use of existing partitions in destroyFormat, but this assumes that the existing partition actually has a type in the partition table matching its current formatting, this has 2 problems: 1: If the partition has a type which needs to have flags reset to become the correct type for the new format (for example swap -> ext2), but it is not formatted, the flags wont get reset 2: If the partition has a type which does not match the formatting (for example type linux raid, formatting ext2), the flags won't get reset This patch moves the resetting of the flags to the creation of the new format, and resets all flags except for the one for the to be created format (and boot and lba which are special).
* Override fstabSpec in PartitionDevice for by-path DASD (#526364).David Cantrell2009-10-071-0/+9
| | | | | If the partition is on a DASD disk, write out the /dev/disk/by-path/... value to the /etc/fstab file rather than a UUID= line.
* Create DASDDevice objects for DASD devices when building devicetree.David Cantrell2009-10-071-0/+3
| | | | | When building the device tree, if the block device is a DASD, create a DASDDevice object rather than a DiskDevice object.
* Add udev_device_is_dasd() to detect DASD devices.David Cantrell2009-10-071-0/+8
| | | | | | The only thing I can tell is available for us from the udev db is to see if the DEVNAME starts with 'dasd'. We'll need this for the dracut changes for DASD later.
* Change existing call to deviceNameToDiskByPath().David Cantrell2009-10-071-1/+1
| | | | | | The only existing use of deviceNameToDiskByPath() expected the basename returned. Since the function returns the full /dev/disk/by-path/... path, take the basename of the returned value.
* Make storage.devices.deviceNameToDiskByPath() more robust.David Cantrell2009-10-071-2/+10
| | | | | | | | | Have deviceNameToDiskByPath() return the full device path rather than just the basename path. Have it check to see if the entry in /dev/disk/by-path is actually a symlink, then readlink that. Otherwise just take the basename of the entry. Also fix a problem where passing it a full device path would not match (e.g., '/dev/dasdb1'). Take the basename of deviceName and match that against the readlink() value.
* Don't copy _raidSet, but merely pass around a referenceHans de Goede2009-10-081-2/+5
| | | | | | | | block.dmraid.RaidSet keeps track of the state of the devicemaps and will try to add / remove maps when activating / deactivating the set depending on its internal state, shallow copying it copies this state, creating 2 copies of it, which can result in trying to bring the set up or down twice, which causes a backtrace.
* Action...Format setup device before modifying the partition tableHans de Goede2009-10-081-2/+4
|
* map() -> filter() in storage.writeEscrowPackets()David Cantrell2009-10-071-2/+3
| | | | | map() gives us a list of bool objects, filter() gives us the actual device objects we are expecting.
* Only initialize escrow packet code if there's devices that need it (#527668).Chris Lumens2009-10-071-5/+9
|
* On lookup of a PartedDevice also check for _ped.DeviceException (#527699)Hans de Goede2009-10-072-2/+2
| | | | | | | | The machine in #527699 has one seriously broken disk, this causes (py)parted to throw a different exception type when looking up the device this patch catches this exception too, which will result in the disk being handled as a removeable disk (ie cardreader) with no media present, causing us to ignore it.
* formatByDefault: Don't traceback when mountpoint is None (#522609)Hans de Goede2009-10-061-0/+3
| | | | | | Don't traceback in formatByDefault() when a device with a mountable format has a mountpoint of None. Instead simply assume that if we don't mount it anywhere it does not need to be formatted.
* Bring up network interface before trying to use it for FCoEHans de Goede2009-10-061-0/+4
| | | | | Note this patch deliberately does not use NetworkManager, all we need for FCoE is for the OSI layers 1 (PHY) and 2 (MAC) to be brought up.
* DMRaidArray: Don't report no media present when in teared down stateHans de Goede2009-10-061-0/+5
| | | | This patch is intended for both F-12 and the devel branch.
* Wait for udev to settle before trying to find dmraid sets in udev DBHans de Goede2009-10-061-0/+4
| | | | | | | I hit the race fixed by this during some local dmraid install testing while investigating bug 527035. This patch is intended for both F-12 and the devel branch.
* Add --label to anaconda-ks.cfg if needed (#526223).Chris Lumens2009-10-052-0/+6
|
* Fix existing size calculation for NTFS (#520627)David Cantrell2009-10-021-1/+2
| | | | Rounding errors when computing the existing size of NTFS volumes.
* Write label to filesystem if we have one set (#526226, #526242)David Cantrell2009-10-021-1/+5
| | | | | | If a label is set on a filesystem (e.g., the --label switch on a part command in a kickstart file), make sure it is set during the filesystem creation.