fix remote degraded gmirror
olli at lurza.secnetix.de
Mon Oct 5 09:43:13 UTC 2009
Robin Becker <robin at reportlab.com> wrote:
> mojo fms wrote:
> > What about shrinking the old mirror drive a few megs so its smaller than
> > the new one?
> The original problem has gone away for the moment as my hoter found an AAJS
> drive with the same number of sectors and the mirror synchronized fine.
> I looked around for ways to shrink the slice, but didn't discover anything very
> authoritative or easy. Is there a slice reduction beast?
You can shrink slices and partitions, but you cannot shrink
file systems. In theory you could write a shrinkfs tool,
but it's more complicated than growfs(8) so nobody has
bitten the bullet yet, given the fact that disk sizes tend
to grow most of the time, but rarely ever shrink.
Apart from that, there is no way to shrink a gmirror, as
far as I know.
The best way to resolve the problem is to create a new mirror
on the new (smaller) drive, copy all data over to the new
mirror, boot from the new drive, destroy the old mirror and
insert the old disk into the new mirror. I've done that
procedure several times; it takes some time and involves
a short downtime (for reboot), but it works fine.
You can do that remotely without single user mode, but it's
always better to be prepared to have access to the console.
And of course, you should always have good backups. A RAID
is never a substitute for a backup.
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"I learned Java 3 years before Python. It was my language of
choice. It took me two weekends with Python before I was more
productive with it than with Java." -- Anthony Roberts
More information about the freebsd-questions