swapping a hard drive, hot swap, raid, divvy, badtrk


What is this stuff?

If this isn't exactly what you wanted, please try our Search (there's a LOT of techy and non-techy stuff here about Linux, Unix, Mac OS X and just computers in general!):



From: Bela Lubkin <belal@caldera.com>
Subject: Re: Swapping a hd in 5.0.6
Date: Thu, 14 Nov 2002 09:12:16 GMT References: <20021108112935.A9421@egps.egps.com> <20021109164949.05596@tegan.com> <20021109193812.A24538@egps.egps.com> <20021109204029.17968@tegan.com> <20021110164846.A1171@egps.egps.com> <aqo428$h7i$1@pcls4.std.com>


Hate these ads?



Tony Lawrence wrote:



> Nachman Yaakov Ziskind wrote:














> > It showed precisely the same numbers as before the swap. Same tracks, same
> > filesystems, etc.
> > 
> > So, last night, while working from home, feeling dreary, pondering Tom's
> > admonition to make sure I was looking at the right drive (and darn it, I WAS
> > looking at the right drive), and then I saw it:
> > 
> > Current Hard Disk Drive: /dev/rdsk/3s0
> > 
> >         +-------------+----------+-----------+---------+---------+---------+
> >         | Partition   | Status   | Type      |   Start |     End |    Size |
> >         +-------------+----------+-----------+---------+---------+---------+
> >         | 1           | Active   | UNIX      |       1 |  281774 |  281774 |
> >         +-------------+----------+-----------+---------+---------+---------+
> > 
> > Total disk size: 2258025 tracks (256 reserved for masterboot and diagnostics)
> > 
> > At which point, I noticed the "Total disk size:" DUH! Perhaps the 'tracks' it
> > is counting is not the same as the Start/End figures? I did some feverish
> > reading on the fdisk man page and decided that, no, tracks are tracks, and
> > fdisk is only looking at 12% of the drive. I selected "Use Entire
> > Disk for UNIX", and (after a scary warning) got: 
> > 
> >         | 1           | Active   | UNIX      |       1 | 2257769 | 2257769 |
> > 
> > Which looked MUCH better. So, letting the dice roll, I ran divvy, and got the
> > same division table as before, with one small difference:
> > 
> > 71111722 1K blocks for divisions, 8001 1K blocks reserved for the system
> > 
> > Which I picked up on right away. :-) I thought I'd just expand the last block
> > of the first filesystem to 71111722, umount and mount, and away I'd go. 
> > 
> > But no, the filesystem stayed at 9gig in df -vk. After more head scratching, I
> > decided to remove all the first division entirely, and reinput the numbers.
> > Much happier! Divvy declared:
> > 
> > Making Filesystems
> > 
> > and mkfs sat there for a most satisfying five or ten minutes, and I was now up
> > to 73gig, Woo-hoo!
> > 
> > So, where was OpenServer getting its copies of the tables from? I refuse to
> > believe the the Compaq Proliant SCSI system is intelligent enough to store
> > stuff like that. Anyone?

> After reading this over and over, I think this is what happened:


> You unmounted your 9gig and, without shutting down, put in the 72gb drive.

> The partition table and the divvy info were (quite naturally) in cache, 
> so whem you ran "mkdev hd", the 9 GB data was picked up and then written 
> to the new disk at your request.  You then rebooted, but of course that 
> was too late.

> I suppose the controller cache could have added to this also- I don't 
> know if it is smart enough to flush when a drive is replaced.

> Morale: hot swap should ONLY be used for RAID systems.  For non-raid, 
> shut the darn thing off when replacing drives.



Sounds about right...



I would blame the OpenServer buffer cache entirely, on the theory that
the cache attached to a hot-swap-capable controller should _know_ about
hot swapping.  That is, if you pull one drive and stick in another, the
controller should already have invalidated every block it was holding in
cache which came from the old drive.  But the kernel knows nothing about
this unless the host adapter driver tells it (and even if it tries to
tell the kernel, the kernel isn't very hip to hot-swap -- a host adapter
driver could probably get things mostly invalidated, but it would have
to try hard.)


ad



From Nachman's description, it sounds like the disk parameter table,
fdisk table, divvy table, and at least a good part of the inode table
got flushed out of memory onto the new disk.  Otherwise, after the
reboot, it wouldn't have been able to get as far as fsck being annoyed.
I'm surprised to hear that so many parts of the chain were written back
to disk.  Some of those, especially the disk parameter, fdisk & divvy
tables, are quite static and wouldn't normally be written.  Perhaps they
were written _because_ Nachman was fiddling around with `mkdev hd`.



Bottom line: do not expect to be able to hot-swap drives in OpenServer
unless you are using a host adapter driver which is documented as
positively supporting this operation under OpenServer.  If it talks
about hot-swap under various OSes and doesn't specifically discuss OSR5,
be suspicious.  In general, I would expect hardware RAID implementations
to fully support hot-swap; non-RAID setups to not support it unless the
doc really clearly says so.



>Bela<





Enter your email address for automatic notification of new posts here
(be sure to whitelist 'feedburner.com' if you use spam filtering)

Or use any RSS reader

Delivered by FeedBurner


Views for this page
Today This Week This Month This Year  Overall
2514178 1,154

/Bofcusm/1734.html copyright 1997-2004 Bela Lubkin All Rights Reserved

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

More:
       - Bela




Unix/Linux Consultants

Your ad here - $48.00 yearly!

http://www.breakthru.com.au SCO (Openserver and Unixware), Unix, Solaris and Linux Consulting services including: Secure Networking Solutions; Linux based Firewalls; Backup Solutions; Secure Home to Office Network Setup; Phone, Remote and On-Site Support available - Satisfaction Guaranteed!


larryi@ccamedical.com SCO OS5, Debian Linux, RedHat Linux, MySQL, Apache, AJAX development using dXport/dL4/Unibasic, Windows Connectivity, Sharing Resouces, Automation, Shell Scripting


UBB Computer Services Support for Openserver, Unixware and Linux. Windows integration with Unix/Linux servers. Hardware, Backup and Networking issues. Located near Sacramento CA, we provide onsite support throughout Northern CA and Nationwide via remote access. We are a SCO Authorized Partner and a Microlite BackupEdge Certified Reseller.



Twitter
  • Nov 18 20:41
    I'll be out all day Wednesday the 19th, hard to reach even by phone. Leave a message and have patience.
  • Nov 18 10:07
    What am I doing? Not doing what I WANT to be doing! Oh, well, in every life a little work must fall..









Change Congress


Related Posts