I have recently received a bug report about a possible new ISW offset for disk metadata. The reporter attached a patch that he is using to use dmraid temporarily. Yes its hard coded, but it works for him atm, and it has the location of the metadata in it. He is using a pair of 1TB drives in RAID level 1. The offset is in exactly the same location on both drives, so I am not 100% sure its a host protected area issue, but this hasn't been confirmed either way yet. Attached is the patch, and the metadata dump. Luke
Index: dmraid/1.0.0.rc15/lib/format/ataraid/isw.c =================================================================== --- dmraid.orig/1.0.0.rc15/lib/format/ataraid/isw.c 2009-05-05 12:13:24.197979374 +0000 +++ dmraid/1.0.0.rc15/lib/format/ataraid/isw.c 2009-05-05 12:13:24.209979407 +0000 @@ -503,13 +503,16 @@ } static void * -isw_read_metadata(struct lib_context *lc, struct dev_info *di, - size_t * sz, uint64_t * offset, union read_info *info) +isw_try_sboffset(struct lib_context *lc, struct dev_info *di, + size_t * sz, uint64_t * offset, union read_info *info, + uint64_t const isw_sboffset) { + size_t size = ISW_DISK_BLOCK_SIZE; - uint64_t isw_sboffset = ISW_CONFIGOFFSET(di); struct isw *isw; + printf("isw metadata found at %ld\n", isw_sboffset); + if (!(isw = alloc_private_and_read(lc, handler, size, di->path, isw_sboffset))) goto out; @@ -545,6 +548,21 @@ return (void *) isw; } +static void * +isw_read_metadata(struct lib_context *lc, struct dev_info *di, + size_t * sz, uint64_t * offset, union read_info *info) +{ + uint64_t isw_sboffset = ISW_CONFIGOFFSET(di); + void *result; + if ((result = isw_try_sboffset( + lc, di, sz, offset, info, ISW_CONFIGOFFSET(di)))) + return result; + if ((result = isw_try_sboffset( + lc, di, sz, offset, info, 1000203803136L))) + return result; + return NULL; +} + static int setup_rd(struct lib_context *lc, struct raid_dev *rd, struct dev_info *di, void *meta, union read_info *info); static struct raid_dev *
Attachment:
dmraid.isw.tar.bz2
Description: Binary data
Attachment:
signature.asc
Description: Digital signature
_______________________________________________ Ataraid-list mailing list Ataraid-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/ataraid-list