NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: GPT missing after controller swap (wd to ld)



On 10/10/16 3:40 PM, John Nemeth wrote:
On Oct 10,  2:22am, Louis Guillaume wrote:
}
} On NetBSD 7.0_STABLE, i386, (from earlier this year) I had configured a
} couple of disks with GPTs and then switched controllers (wd1 now shows
} up as ld1) and now the GPT appears to have gone missing. However my
} wedges are still there...
}
} # gpt show ld1
} gpt: error: map entry doesn't fit media
} gpt: unable to open device 'rld1d': No such file or directory
}
} # dkctl ld1 listwedges
} /dev/rld1d: 2 wedges:
} dk0: boot0, 524288 blocks at 128, type: ffs
} dk1: disk0, 3906504704 blocks at 524416, type: raidframe
}
} The first wedge is intended to just hold a kernel and emergency root
} file system for booting. The root file system is on a raid array built
} with dk1 (and others). I'm currently booted off a separate disk because
} the bootmenu did not include the boot.cfg "installboot"-ed to ld1.
}
} Did something in the BIOS overwrite the GPT? How to recover?

     It is pretty obvious that the GPT is still there, otherwise
the kernel would not have found the partititions in order to create
the wedges when it attached the disk.

     What has happened is that for some reason it thinks the size
of your disk has changed.  In another message, you show that the
disks are now attached to a RAID controller (twa).  Somebody else
suggested that the RAID controller is using some blocks at the end
of the disk for its own purposes.  That is highly likely what
happened.  To fix this issue, run "gpt resizedisk ld1".  You may
need a newer version of gpt(8) to get the resizedisk function.

}-- End of excerpt from Louis Guillaume



Looks like "resizedisk" has the same complaint as "show". The first messages are from the gpt from HEAD and second group is from netbsd-7.


# ./gpt -vvv resizedisk ld1
/dev/rld1d: mediasize=1999988850688; sectorsize=512; blocks=3906228224
/dev/rld1d: MBR not found at sector 0
/dev/rld1d: Pri GPT at sector 1
/dev/rld1d: GPT partition: type=ffs, start=128, size=524288
/dev/rld1d: GPT partition: type=raid, start=524416, size=3906504704
gpt: /dev/rld1d: map entry doesn't fit media
#
#
# gpt -vvv resizedisk ld1
gpt: rld1d: mediasize=1999988850688; sectorsize=512; blocks=3906228224
gpt: rld1d: MBR not found at sector 0
gpt: rld1d: Pri GPT at sector 1
gpt: rld1d: GPT partition: type=ffs, start=128, size=524288
gpt: rld1d: GPT partition: type=raid, start=524416, size=3906504704
gpt: error: map entry doesn't fit media
gpt: unable to open device 'rld1d': No such file or directory


Home | Main Index | Thread Index | Old Index