Bug 652961
Summary: | handling of ex-dmraid drives is getting worse | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Ray Todd Stevens <raytodd> |
Component: | anaconda | Assignee: | David Lehman <dlehman> |
Status: | CLOSED NEXTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 14 | CC: | jonathan, vanmeeuwen+fedora |
Target Milestone: | --- | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | anaconda-15.0-1 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-05-18 16:40:36 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Ray Todd Stevens
2010-11-13 19:51:35 UTC
Ignoring the metadata by passing nodmraid is really just avoiding the issue of having stale/invalid metadata on your disks. The correct approach for you, since you are in the habit of re-purposing firmware-raid disks, is to take matters into your own hands and make removal of stale metadata part of your re-purposing procedure. If you want to make sure there is no such metadata, here is how: 1. To remove all old firmware raid signatures, run this: dmraid -E <device> 2. To remove most other signatures of any kind, run this: dd if=/dev/zero of=<device> bs=1M count=32 Note: In most cases, a count of 1 would be more than sufficient to clear all metadata, including firmware raid signatures. Note: This may leave behind some older md metadata, which is located at the end of the device. If you want to be sure it is gone as well, you can use awk/cut, dd, and /proc/partitions to zero out the last MB or so of each device. Here's an untested snippet of python (based on some fairly heavily tested code in anaconda) that writes zeros the first and last MB of a device: #!/usr/bin/python import sys import os try: device = sys.argv[1] except IndexError: print >> sys.stderr, "Usage: %s <device>" % sys.argv[0] sys.exit(1) try: fd = os.open(device, os.O_RDWR) buf = '\0' * 1024 * 1024 os.write(fd, buf) os.lseek(fd, -1024 * 1024, 2) os.write(fd, buf) except Exception as e: if getattr(e, "errno", None) == 28: # No space left in device pass else: print >> sys.stderr, "error zeroing out %s: %s" % (device, e.message) finally: if fd: os.close(fd) Then there IS a bug in anaconda. Reference to: 1. To remove all old firmware raid signatures, run this: dmraid -E <device> This only works if you are using the same board and have the complete set on the system. Or at least dbraid detects that you don't have a dmraid mother board and doesn't even try. It also detects of the drive set is no complete and exits. Referencing Already had this recommended to me. dd if=/dev/zero of=<device> bs=1M count=32 Note: In most cases, a count of 1 would be more than sufficient to clear all metadata, including firmware raid signatures. Note: This may leave behind some older md metadata, which is located at the end of the device. If you want to be sure it is gone as well, you can use awk/cut, dd, and /proc/partitions to zero out the last MB or so of each device. This does say it works, but anaconda still finds that it is a dmraid drive. I think a big clue may be that we also have a lot of identical drives. When I try and use an ex-dmraid drive with the nodmraid parameter on the kernel it still give some kind of a message about detecting the dmraid on the drive during the bootup. A dmraid drive I have run the above on also is of a slightly (very slightly, but slightly) smaller size than an identical drive with the identical firmware on the drive which has never been used as a dmraid drive. I am suspecting that somehow the kernel is setting aside the meta area and making it nonaccessable even if the nodmraid parameter is used. I just learned of a utility called wipefs that might help you. It is part of the util-linux-ng package, which is a good thing since that implies that it uses the same methods to find the signatures as blkid, which can identify dmraid member devices. wipefs -a <device> Let me know how it works. The nodmraid handling should be fixed as of anaconda-15.0-1, or F15. |