APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

Replacing hard drive


Some material is very old and may be incorrect today

© June 2004 Tony Lawrence

Sun Jun 27 01:46:55 2004 Replacing hard drive

Referencing: http://groups.google.com/[email protected]

This poster wants to replace a SCO OSR5 secondary scsi drive with a larger version, and thought that the old drive needs to be removed first.

As long as the scsi id is the same, you can just replace it. You'd run "mkdev hd" to create partitions/filesystems, restore data, and that's all. No need to relink.

Users of more modern systems may find this puzzling: why would you need to relink to add a drive to the kernel anyway? Well, that's the way these systems work. I assume that the next release of OSR5, which will use the Unixware kernel, will scan for and automatically add drives.

Removing drives from OSR5 systems isn't a lot of fun either. As the thread notes, "mkdev .scsi" is the command, but really there's ordinarily no reason to bother: if you don't try to mount or otherwise access a "missing" drive, the kernel doesn't care.





Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> -> Replacing hard drive




More Articles by © Tony Lawrence



"Removing drives from OSR5 systems isn't a lot of fun either. As the thread notes, "mkdev .scsi" is the command, but really there's ordinarily no reason to bother: if you don't try to mount or otherwise access a "missing" drive, the kernel doesn't care."

If you're really worried about an accidental attempt to connect to a nonexistent drive you could manually edit /etc/conf/cf.d/mscsi to remove the corresponding entry, followed by a relink.

BTW, even if mscsi says the drive is there, it must have been logged by the host adapter BIOS at boot time in order for hardware level access to occur. Otherwise, the kernel's attempt to talk to the drive will fail and all sorts of nastigrams will pop up on the console.

--BigDumbDinosaur

No, you can't just remove a drive from mscsi (unless it is the last line). Your file system names will move to different drives if you do that. I have something here somewhere explaining that, but can't find it right now..

--
Tony Lawrence

I thought I had something longer with examples, but I guess not, so..

The problem is the assignment of minor device numbers - they don't relate to scsi id's, but to the order you added the drives. Therefor, if you remove one from the middle, the minor number for a filesystem link now points to the wrong drive.


Here's some relevant stuff:

/SCOFAQ/scotec1.html#mkdev_hd

http://aplawrence.com/cgi-bin/ta.pl?105864

http://aplawrence.com/cgi-bin/ta.pl?105052

--TonyLawrence


Have you tried Searching this site?

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.

Contact us