Re: fix remote degraded gmirror
Robin Becker 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. Best regards Oliver -- 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 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fix remote degraded gmirror
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? -- Robin Becker ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fix remote degraded gmirror
Adam Vande More wrote: . >> > > This has been answered already but you should be aware that when using > gmirror, your back disk should either be the same model or bigger as hard > drive capacities differ between manufacturers. As in Seagate 250GB ~= WD > 250GB. So this is not an uncommon problem. > > yes this is a fairly old WD original was Device Model: WDC WD1600JS-22MHB0 Firmware Version: 02.01C03 User Capacity: 160,041,885,696 bytes they replaced with Device Model: WDC WD1600JS-75NCB2 Firmware Version: 10.02E03 User Capacity: 160,000,000,000 bytes which looks quite strange as it looks like something got lopped off somehow. I didn't think bad blocking/sectoring was done any more. Anyhow they've removed this disk and are considering options (at least I hope they are). -- Robin Becker ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fix remote degraded gmirror
On Wed, Sep 30, 2009 at 4:37 AM, Robin Becker wrote: > . > >> >> a simple >> >> dd if=/dev/zero of=/dev/adX bs=1M count=1 >> >> would fix that if nothing else >> >> if there's was no existing label, there is nothing to do except gmirror >> man >> instructions. Gmirror is block level mirroring which why no other steps >> are >> needed. >> >> well now I really need advice, the data centre guy successfully inserted > another disk in the right place and it appears to be the same model. > However, smartctl -a /dev/ad4 seems to show a number of errors and many of > the indicators are prefail or old_age. > > In addition the disk doesn't have exactly the same length so when I tried > to insert gmirror complains that it is too small. > > What are my options? > -- > Robin Becker > This has been answered already but you should be aware that when using gmirror, your back disk should either be the same model or bigger as hard drive capacities differ between manufacturers. As in Seagate 250GB ~= WD 250GB. So this is not an uncommon problem. -- Adam Vande More ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fix remote degraded gmirror
2009/9/30 Robin Becker > . > >> >> a simple >> >> dd if=/dev/zero of=/dev/adX bs=1M count=1 >> >> would fix that if nothing else >> >> if there's was no existing label, there is nothing to do except gmirror >> man >> instructions. Gmirror is block level mirroring which why no other steps >> are >> needed. >> >> well now I really need advice, the data centre guy successfully inserted > another disk in the right place and it appears to be the same model. > However, smartctl -a /dev/ad4 seems to show a number of errors and many of > the indicators are prefail or old_age. > > In addition the disk doesn't have exactly the same length so when I tried > to insert gmirror complains that it is too small. > > What are my options? > -- > Robin Becker > > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscr...@freebsd.org" > 1st thing sure up what you have. create another mirror, partition, newfs it up and rsync the the contents of the active drive over to it. Keep the rsync every 10 minutes or so depeneding on how much data you have and what impact it has on system resources You then have two options boot off the new drive, destroy the gmirror on the old drive and add it to the new mirror on the old drive or buy another new drive, Make sure its bigger this time. Add it to the box and add it the the old gmirror you can then leave the 1st new drive in there potentially and have it as a hot back ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fix remote degraded gmirror
. a simple dd if=/dev/zero of=/dev/adX bs=1M count=1 would fix that if nothing else if there's was no existing label, there is nothing to do except gmirror man instructions. Gmirror is block level mirroring which why no other steps are needed. well now I really need advice, the data centre guy successfully inserted another disk in the right place and it appears to be the same model. However, smartctl -a /dev/ad4 seems to show a number of errors and many of the indicators are prefail or old_age. In addition the disk doesn't have exactly the same length so when I tried to insert gmirror complains that it is too small. What are my options? -- Robin Becker ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fix remote degraded gmirror
On Mon, Sep 28, 2009 at 10:44 AM, Robin Becker wrote: > Thanks for the information re reboot; I think I knew it was a sata already. > My one remaining question is what preparation does the hd need prior to > gmirror insert. I see various people recommending clearing out various > chunks of the disk (to make the disk unambiguously not in sync?), but that > doesn't seem to be required. I guess the whole idea is to be able to just > connect a new disk and start the system up and then insert back into the > mirror. > -- > Robin Becker > well, really only thing I can think of off hand is conflict gmirror labels ie inserting into gm0 from another gm0. a simple dd if=/dev/zero of=/dev/adX bs=1M count=1 would fix that if nothing else if there's was no existing label, there is nothing to do except gmirror man instructions. Gmirror is block level mirroring which why no other steps are needed. -- Adam Vande More ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fix remote degraded gmirror
Thanks for the information re reboot; I think I knew it was a sata already. My one remaining question is what preparation does the hd need prior to gmirror insert. I see various people recommending clearing out various chunks of the disk (to make the disk unambiguously not in sync?), but that doesn't seem to be required. I guess the whole idea is to be able to just connect a new disk and start the system up and then insert back into the mirror. -- Robin Becker ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fix remote degraded gmirror
On Mon, Sep 28, 2009 at 8:32 AM, Robin Becker wrote: > krad wrote: > ... > >> >>> >> probably not but possibly. What is the server you have is it a custom >> build >> one? Does it have a drive cage? Can you make the hd light blink? >> > > I've never seen the machinery. > > >> Is the remote hands going to go inside the case for you, as I think he >> might >> to have to trace the cables to work out what drive is the correct one? >> >> > I thought the serial number would help with that, > > >> Personally I would recommend that you or one of your trusted engineers >> goes >> down an replaces the drive yourself. Remote hands engineers in my >> experiance >> are a bit crude, and at the end of the day dont care about your box as >> much >> as you would. >> > > but you're probably right about the remote hands being uncaring :( > > >> While you or your guy is down there he could do a proper job and label up >> all the drives so in future you can get remote hands to do it all for you. >> >> it's still under discussion anyway whether we just abandon the machine; > the current colo company took over our freebsd machines from another and > they don't provide freebsd support anyway. The alternative ugh is to switch > to ubuntu. > > I suspect if we do go ahead it will come down to one of our guys going down > there to do the hands on. > > I'm still looking for good examples of exactly how to do the actual > recovery. I assume I can just do > > gmirror remove gm0 /dev/ad4 > > to eliminate the bad disk. > > However, will the system still reboot from the disk on /dev/ad6 or should > the good disk be swapped into the /dev/ad4 position. I don't know enough > about sata booting, but I suppose it can be configured through our serial > console. > It would boot fine from either assuming drive is good and mirror was consisent. > If the system does boot then the other disk can be inserted with gmirror > insert gm0 /dev/ad6, but I am not sure whether any partitioning/formatting > etc etc is required, Dru Lavigne was my guide when we installed this stuff, > but this is the first time it's failed and she doesn't mention the repair > process. > -- > Robin Becker > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscr...@freebsd.org" > -- Adam Vande More ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fix remote degraded gmirror
On Mon, Sep 28, 2009 at 4:14 AM, Robin Becker wrote: > I have a freebsd 6.1 system with a gmirror raid 1 which is degraded. > > Originally I had /dev/ad4 & /dev/ad6, but I'm getting a degraded status and > log messages reporting dergraded status and uncorrectable block for ad4. > > Obviously I need to remove the device and get it replaced and then insert > back into the mirror. > > However, this is a remote machine and I need to get the right disk fixed. > > Is there a way I can get the colocation engineer to replace the right disk? > > I guess I need to do 1) figure out what kind of disk this is and Looks like sata... > 2) figure out some information to allow them to identify. > Power down system and disconnect one drive. Note that the drive plugged into the lowest sata port is probably ad4. Watch dmesg and check hd detection. If you got the wrong one unplug and try again with other disk. Refer to man gmirror for replace procedure, it's quite simple. > > > I looked at the smartctl output and see this > > /dev/ad4 > Device Model: WDC WD1600JS-22MHB0 > Serial Number:WD-WCANM4438410 > > /dev/ad6 > Device Model: WDC WD1600JS-22MHB0 > Serial Number:WD-WCANM4434657 > > is this sufficient to enable a data centre engineer to fix my problem? > -- > Robin Becker > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscr...@freebsd.org" > -- Adam Vande More ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fix remote degraded gmirror
krad wrote: ... probably not but possibly. What is the server you have is it a custom build one? Does it have a drive cage? Can you make the hd light blink? I've never seen the machinery. Is the remote hands going to go inside the case for you, as I think he might to have to trace the cables to work out what drive is the correct one? I thought the serial number would help with that, Personally I would recommend that you or one of your trusted engineers goes down an replaces the drive yourself. Remote hands engineers in my experiance are a bit crude, and at the end of the day dont care about your box as much as you would. but you're probably right about the remote hands being uncaring :( While you or your guy is down there he could do a proper job and label up all the drives so in future you can get remote hands to do it all for you. it's still under discussion anyway whether we just abandon the machine; the current colo company took over our freebsd machines from another and they don't provide freebsd support anyway. The alternative ugh is to switch to ubuntu. I suspect if we do go ahead it will come down to one of our guys going down there to do the hands on. I'm still looking for good examples of exactly how to do the actual recovery. I assume I can just do gmirror remove gm0 /dev/ad4 to eliminate the bad disk. However, will the system still reboot from the disk on /dev/ad6 or should the good disk be swapped into the /dev/ad4 position. I don't know enough about sata booting, but I suppose it can be configured through our serial console. If the system does boot then the other disk can be inserted with gmirror insert gm0 /dev/ad6, but I am not sure whether any partitioning/formatting etc etc is required, Dru Lavigne was my guide when we installed this stuff, but this is the first time it's failed and she doesn't mention the repair process. -- Robin Becker ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fix remote degraded gmirror
2009/9/28 Robin Becker > I have a freebsd 6.1 system with a gmirror raid 1 which is degraded. > > Originally I had /dev/ad4 & /dev/ad6, but I'm getting a degraded status and > log messages reporting dergraded status and uncorrectable block for ad4. > > Obviously I need to remove the device and get it replaced and then insert > back into the mirror. > > However, this is a remote machine and I need to get the right disk fixed. > > Is there a way I can get the colocation engineer to replace the right disk? > > I guess I need to do 1) figure out what kind of disk this is and 2) figure > out some information to allow them to identify. > > > I looked at the smartctl output and see this > > /dev/ad4 > Device Model: WDC WD1600JS-22MHB0 > Serial Number:WD-WCANM4438410 > > /dev/ad6 > Device Model: WDC WD1600JS-22MHB0 > Serial Number:WD-WCANM4434657 > > is this sufficient to enable a data centre engineer to fix my problem? > -- > Robin Becker > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscr...@freebsd.org" > probably not but possibly. What is the server you have is it a custom build one? Does it have a drive cage? Can you make the hd light blink? Is the remote hands going to go inside the case for you, as I think he might to have to trace the cables to work out what drive is the correct one? Personally I would recommend that you or one of your trusted engineers goes down an replaces the drive yourself. Remote hands engineers in my experiance are a bit crude, and at the end of the day dont care about your box as much as you would. While you or your guy is down there he could do a proper job and label up all the drives so in future you can get remote hands to do it all for you. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
fix remote degraded gmirror
I have a freebsd 6.1 system with a gmirror raid 1 which is degraded. Originally I had /dev/ad4 & /dev/ad6, but I'm getting a degraded status and log messages reporting dergraded status and uncorrectable block for ad4. Obviously I need to remove the device and get it replaced and then insert back into the mirror. However, this is a remote machine and I need to get the right disk fixed. Is there a way I can get the colocation engineer to replace the right disk? I guess I need to do 1) figure out what kind of disk this is and 2) figure out some information to allow them to identify. I looked at the smartctl output and see this /dev/ad4 Device Model: WDC WD1600JS-22MHB0 Serial Number:WD-WCANM4438410 /dev/ad6 Device Model: WDC WD1600JS-22MHB0 Serial Number:WD-WCANM4434657 is this sufficient to enable a data centre engineer to fix my problem? -- Robin Becker ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"