Sun Jun 27 01:46:55 2004 Replacing hard drive
Posted by Tony Lawrence
Search Keys: replace drive, remove hard drive
Referencing: http://groups.google.com/groups?selm=40DCD352.773C@kos.net
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.
More Articles by Tony Lawrence - Find me on Google+
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.
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.
Click here to add your comments
"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
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