APLawrence - Information and Resources for Unix and Linux Systems, Bloggers and the self-employed
RSS Feeds Get APLawrence.com by RSS











(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Home > News Posts > swapping a hard drive, hot swap, raid, divvy, badtrk––>Re: Swapping a hd in 5.0.6
Printer Friendly Version




News Group Posts

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

badtrk



From: Bela Lubkin <belal@sco.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> 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.)

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<
 

If this page was useful to you, please click to help others find it:  

Your +1's can help friends, contacts, and others on the web find the best stuff when they search.

Comments?



Click here to add your comments



Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar



LOD Communications, Inc.

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

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.

g_face.jpg

This post tagged:

       - Bela
       - RAID
       - SCO_OSR5




Unix/Linux Consultants

Skills Tests

Guest Post Here