LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-21-2009, 04:50 AM   #1
artdent
LQ Newbie
 
Registered: Jan 2009
Posts: 5

Rep: Reputation: 0
cannot remove a sata hard drive from fedora 7


Hi

I need to remove one of the hard drives from my Fedora media server to make way for a 1Tb drive.(It does not contain system files just a few jpegs)

The system has 6 hard drives sda to sdf
sda contains the system files and has 3 partitions
sda1 system files, sda2 (swap), sda3 (mp3's)
sdb to sdf all have only one partition and contain media files (avi's mkv's etc)

My problem is that if I physically remove sdb from the box it fails to boot (early on) with the error message that the superblock is missing or corrupt and to replace it with one of the backups. What is strange about that is it seems to refer to sdf not the drive I removed sdb.

I have already removed any reference to sdb in fstab. So I don't know if I need to remove references to sdb anywhere else so that the system will boot. If I replace the drive it works just fine.

So my question is how do I remove the drive so that I can replace it (I need the space)

Linked to this I notive that sdb1 is mounted by something else when entering the GUI (or maybe earlier) it is not in fstab and I suspect HAL is doing it. I am not sure if this has any bearing on the matter.

I only know enough about Linux to run it as a smb server and gateway/firewall. This problem is out of my comfort zone so any help or suggestions will be gratefully received.

Thanks
 
Old 01-21-2009, 05:20 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
A) Do you use LVM which is the default for Fedora.
B) If not, use "sudo /dev/fdisk -l", "udevinfo -q env -n <device-node>" and "mount" to learn which device is which.

My guess is that you are mistaken about your devices.

If the drive is removed, you can boot to a live distro, explore your drives and fix /boot/grub/menu.lst and /etc/fstab.

It would be better to use UUID labels instead of device nodes in /etc/fstab. You can learn the UUID for each filesystem (partition) with the "udevinfo" program.

Instead of the first column being like "/dev/sda" it can be like "UUID=14D23645D2362AFE". Then the filesystem will be booted even if you repartition one of the drives or the device nodes change for another reason. For external drives, you always want to do this.

Last edited by jschiwal; 01-21-2009 at 05:24 AM.
 
Old 01-21-2009, 09:27 AM   #3
artdent
LQ Newbie
 
Registered: Jan 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for the reply

First off no I don't use LVM I know it is the default but I avoided it. Secondly just like you, I thought I had my drives mixed up but I have confirmed that each drive is correct by looking at the drive manufacturer and capacity and matching that to the info in partd (The partition program that is in the distro). sdb is definetley the one I am removing and then receiving the superblock error message.

To be honest I don't even know if it should be possible to remove a drive and not have fedora complain.

Thanks
 
Old 01-21-2009, 11:51 AM   #4
artdent
LQ Newbie
 
Registered: Jan 2009
Posts: 5

Original Poster
Rep: Reputation: 0
ok Home now

I can confirm that the drives are identified correctly. There are no references to the /dev/sdb in fstab, but linux still looks for it on the initial disk test in boot up. If sdb is unplugged then it errors saying superblock missing or corrupt on /dev/sdf. This makes me wonder if Fedora shifts the names of the devices when one is removed (please confirm if true)

So original disks are;
sda
sdb
sdc
sdd
sde
sdf

when you remove sdb they all shift up one ie sdc becomes sdb, sdd becomes sdc and so on until sdf stops existing (as it is now sde) and the boot up filecheck errors on it.

If so would the idea of using uuid in fstab solve this hypothetical problem

Thanks
 
Old 01-21-2009, 11:56 AM   #5
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by artdent View Post
ok Home now

I can confirm that the drives are identified correctly. There are no references to the /dev/sdb in fstab, but linux still looks for it on the initial disk test in boot up. If sdb is unplugged then it errors saying superblock missing or corrupt on /dev/sdf. This makes me wonder if Fedora shifts the names of the devices when one is removed (please confirm if true)

So original disks are;
sda
sdb
sdc
sdd
sde
sdf

when you remove sdb they all shift up one ie sdc becomes sdb, sdd becomes sdc and so on until sdf stops existing (as it is now sde) and the boot up filecheck errors on it.

If so would the idea of using uuid in fstab solve this hypothetical problem

Thanks
Yes, that is what is happening to you.

Remove the old drive and stick the new one in. The system may still fail to boot all the way if the new one is not properly formatted, but in this case it will drop you to the command shell where you can make repairs - which would consist of either formatting your new drive and installing a filesystem or modifying fstab to remove the mount entry.
 
Old 01-21-2009, 12:03 PM   #6
artdent
LQ Newbie
 
Registered: Jan 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Thank you jschiwal. I just changed all references of /dev/sde etc in fstab to uuid's and the drive could be removed.

Thank you so much that has been bugging me for weeks
 
Old 01-21-2009, 12:08 PM   #7
artdent
LQ Newbie
 
Registered: Jan 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Cheers as well jiml8 for posting. Nice to see that one of my ideas about how this os works turned out to be true;p
 
Old 01-21-2009, 12:29 PM   #8
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by artdent View Post
Thank you jschiwal. I just changed all references of /dev/sde etc in fstab to uuid's and the drive could be removed.

Thank you so much that has been bugging me for weeks
This is the exact reason that UUID mounts were instituted in Linux.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Clone a dual booting IDE hard drive to a SATA hard drive namida12 Linux - Distributions 1 07-14-2008 10:01 AM
adding sata hard drive with Fedora 8 already on it steved123 Linux - General 1 06-02-2008 07:13 AM
fedora core 3 cannot detect sata hard drive in intel motherboard S5000VSA ablanc Linux - Newbie 3 04-08-2008 06:15 AM
kernel accessing pata cd rom drive instead of sata OS hard drive for filesystem elaps2007 Linux - Kernel 0 03-19-2008 09:39 AM
cannot access SATA hard drive in Fedora Core 4 [42]Sanf0rd Linux - Hardware 7 01-26-2006 02:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 03:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration