LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 03-09-2007, 03:05 PM   #1
gdevaucorbeil
LQ Newbie
 
Registered: Mar 2007
Posts: 4

Rep: Reputation: 0
Post system disk moves from /dev/sda to /dev/sdm


Hardware: IBM x3950 with 2 SAS drives configured as hardware raid and an exp3000 filled with 12 disks.

Linux: Redhat Enterprise 4 Update 4

Here is what I did:

I plugged a SAS controler from LSI in a PciX slot.

I installed Linux and used the box for a while without any problems.

Then I shutdown the server and plugged a exp3000 into the server and turned the exp3000 on, then turn the server on.

The server does not boot anymore now. It complains about fsck.ext2 not finding the device.

It seems the system disk is now /dev/sdm instead of /dev/sda.

I tried installing redhat again as a test, and the redhat install sees the system disk as /dev/sdm too (I see it easily because it is the only device that is 36GB, the data disks are 300GB).

both the system disks and data disks are SAS. Is this why the disk device of the system disk changes?

How can I fix this so I can add or remove data disks and Linux still boots?
 
Old 03-09-2007, 03:21 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 328Reputation: 328Reputation: 328Reputation: 328
You want to use disk labels for booting, not device addresses, which can change as you discovered.

For example, in /etc/grub.conf:

kernel /vmlinuz-x.y.z ro root=LABEL=/ quiet

You can label drives with tune2fs for EXT2/EXT3 (from 'man tune2fs'):

Quote:
-L volume-label
Set the volume label of the filesystem. Ext2 filesystem labels
can be at most 16 characters long; if volume-label is longer
than 16 characters, tune2fs will truncate it and print a warn-
ing. The volume label can be used by mount(8), fsck(8), and
/etc/fstab(5) (and possibly others) by specifying LABEL=vol-
ume_label instead of a block special device name like /dev/hda5.
 
Old 03-10-2007, 09:55 AM   #3
gdevaucorbeil
LQ Newbie
 
Registered: Mar 2007
Posts: 4

Original Poster
Rep: Reputation: 0
Question

Thanks macemoneta. It almost works. I don't know how it will work for my swap partition.

I tried tune2fs on my ext2 and ext3 partitions.
I modified /etc/fstab accordingly.
And that worked. So I suppose it will work on the real server

But how do I do for the swap partition. This is not a ext2 or ext3 partition of course!

Any good idea for this?
 
Old 03-10-2007, 10:17 AM   #4
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 328Reputation: 328Reputation: 328Reputation: 328
Similarly, in /etc/fstab, for example:

Code:
LABEL=SWAP-SDA3  swap swap defaults    0 0
You label swap when you initialize it. From 'man mkswap':

Quote:
-L label
Specify a label, to allow swapon by label. (Only for new style
swap areas.)
So on your server, either:

- If swap is critical to operation: boot to run level 1, reinitialize and label the swap areas, and update /etc/fstab, then reboot.
- If you can run without swap for a while: swapoff -a, reinitialize and label the swap areas, and update /etc/fstab, swapon -a
 
Old 03-10-2007, 10:30 AM   #5
gdevaucorbeil
LQ Newbie
 
Registered: Mar 2007
Posts: 4

Original Poster
Rep: Reputation: 0
Thumbs up

Looks clear. Thanks for the prompt answer.
I'll try this on the server.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
USB drive... /dev/sda1 doesn't show unless I try mounting /dev/sda as vfat finite Linux - Hardware 8 03-10-2009 01:52 AM
forcing the order of /dev/sda /dev/sdb etc.. jdaniel Linux - Software 5 05-23-2006 08:41 AM
where did my SATA drive go? not /dev/hde or /dev/sda edman007 Linux - Hardware 1 01-16-2005 11:23 PM
Sandisk USB card Reader not linking /dev/sg0 to /dev/sda acidraven Linux - Hardware 1 06-19-2004 04:56 PM
USB Compact flash card reader hotplug creates /dev/sda but no /dev/sda1 -Mandrake 9.1 bibinono Linux - Hardware 2 08-11-2003 10:37 AM


All times are GMT -5. The time now is 11:13 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration