OpenSuse 11.4 Hard drive order?

I have just installed OpenSuse 11.4 and in YAST partitioner hard drives order is a mess. I used OpenSuse 11.2 before where all drives were encrypted and appeared in a different order. Now when drives appeared differently from BIOS settings it makes it hard to figure out what hard drive is what. I installed OpenSUSE 11.4 on the first IDE drive that should be dev/sda but for some reason it is dev/sdf? ehm? This is total mess up. I know it could be so that it is mounted by device ID and system boots anyway, but I would reall like hard drives to appear in OS as they are connected to the IDE/SATA so that I can easily keep order of them. Is this possible to achieve and how? Here is the info

fdisk -l


Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0004b95b

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63  1953520064   976760001   83  Linux

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000eb48c

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63   976768064   488384001   83  Linux

Disk /dev/sdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x43c445cf

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1              63   976768064   488384001   83  Linux

Disk /dev/sdd: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x4038c4b5

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1              63   976768064   488384001   83  Linux

Disk /dev/sde: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d9d06

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1              63  1953520064   976760001   83  Linux

Disk /dev/sdf: 300.1 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders, total 586114704 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00072067

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1   *          63      417689      208813+  83  Linux
/dev/sdf2          417690   105273944    52428127+  83  Linux
/dev/sdf3       105273945   107956799     1341427+  82  Linux swap / Solaris
/dev/sdf4       107956800   586099394   239071297+  83  Linux

Disk /dev/sdh: 300.1 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders, total 586114704 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xeccebbe4

   Device Boot      Start         End      Blocks   Id  System
/dev/sdh1              63   586099394   293049666   83  Linux

Disk /dev/sdg: 163.9 GB, 163928604672 bytes
255 heads, 63 sectors/track, 19929 cylinders, total 320173056 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x8296ba09

   Device Boot      Start         End      Blocks   Id  System
/dev/sdg1              63   320159384   160079661   83  Linux

Disk /dev/sdi: 8029 MB, 8029470208 bytes
255 heads, 63 sectors/track, 976 cylinders, total 15682559 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdi1              44    15679439     7839698    b  W95 FAT32

lspci -v

00:00.0 Host bridge: Intel Corporation 82865G/PE/P DRAM Controller/Host-Hub Interface (rev 02)
    Subsystem: Hewlett-Packard Company d330 uT
    Flags: bus master, fast devsel, latency 0
    Memory at f8000000 (32-bit, prefetchable) [size=64]
    Capabilities: [e4] Vendor Specific Information: Len=06 <?>
    Capabilities: [a0] AGP version 3.0
    Kernel driver in use: agpgart-intel

00:01.0 PCI bridge: Intel Corporation 82865G/PE/P PCI to AGP Controller (rev 02) (prog-if 00 [Normal decode])
    Flags: bus master, 66MHz, fast devsel, latency 64
    Bus: primary=00, secondary=01, subordinate=01, sec-latency=32
    Memory behind bridge: fc800000-fd2fffff
    Prefetchable memory behind bridge: f5e00000-f7ffffff

00:06.0 System peripheral: Intel Corporation 82865G/PE/P Processor to I/O Memory Interface (rev 02)
    Flags: fast devsel
    Memory at fecf0000 (32-bit, non-prefetchable) [size=4]

00:1d.0 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1 (rev 02) (prog-if 00 [UHCI])
    Subsystem: Hewlett-Packard Company d530 CMT (DG746A)
    Flags: bus master, medium devsel, latency 0, IRQ 16
    I/O ports at 2440 [size=32]
    Kernel driver in use: uhci_hcd

00:1d.1 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2 (rev 02) (prog-if 00 [UHCI])
    Subsystem: Hewlett-Packard Company d530 CMT (DG746A)
    Flags: bus master, medium devsel, latency 0, IRQ 19
    I/O ports at 2460 [size=32]
    Kernel driver in use: uhci_hcd

00:1d.7 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02) (prog-if 20 [EHCI])
    Subsystem: Hewlett-Packard Company d530 CMT (DG746A)
    Flags: bus master, medium devsel, latency 0, IRQ 23
    Memory at fc500000 (32-bit, non-prefetchable) [size=1]
    Capabilities: [50] Power Management version 2
    Capabilities: [58] Debug port: BAR=1 offset=00a0
    Kernel driver in use: ehci_hcd

00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev c2) (prog-if 00 [Normal decode])
    Flags: bus master, fast devsel, latency 0
    Bus: primary=00, secondary=05, subordinate=05, sec-latency=64
    I/O behind bridge: 00001000-00001fff
    Memory behind bridge: fc200000-fc4fffff
    Prefetchable memory behind bridge: 50100000-501fffff

00:1f.0 ISA bridge: Intel Corporation 82801EB/ER (ICH5/ICH5R) LPC Interface Bridge (rev 02)
    Flags: bus master, medium devsel, latency 0

00:1f.1 IDE interface: Intel Corporation 82801EB/ER (ICH5/ICH5R) IDE Controller (rev 02) (prog-if 8a [Master SecP PriP])
    Subsystem: Hewlett-Packard Company d530 CMT (DG746A)
    Flags: bus master, medium devsel, latency 0, IRQ 18
    I/O ports at 01f0 [size=8]
    I/O ports at 03f4 [size=1]
    I/O ports at 0170 [size=8]
    I/O ports at 0374 [size=1]
    I/O ports at 24a0 [size=16]
    Memory at 50200000 (32-bit, non-prefetchable) [size=1]
    Kernel driver in use: ata_piix

00:1f.2 IDE interface: Intel Corporation 82801EB (ICH5) SATA Controller (rev 02) (prog-if 8f [Master SecP SecO PriP PriO])
    Subsystem: Hewlett-Packard Company d530 CMT (DG746A)
    Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 18
    I/O ports at 2490 [size=8]
    I/O ports at 24b0 [size=4]
    I/O ports at 2498 [size=8]
    I/O ports at 24b4 [size=4]
    I/O ports at 2480 [size=16]
    Kernel driver in use: ata_piix

00:1f.3 SMBus: Intel Corporation 82801EB/ER (ICH5/ICH5R) SMBus Controller (rev 02)
    Subsystem: Hewlett-Packard Company d330 uT
    Flags: medium devsel, IRQ 17
    I/O ports at fc00 [size=32]
    Kernel driver in use: i801_smbus

00:1f.5 Multimedia audio controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02)
    Subsystem: Hewlett-Packard Company d330 uT
    Flags: bus master, medium devsel, latency 0, IRQ 17
    I/O ports at 2000 [size=256]
    I/O ports at 2400 [size=64]
    Memory at fc500400 (32-bit, non-prefetchable) [size=512]
    Memory at fc500600 (32-bit, non-prefetchable) [size=256]
    Capabilities: [50] Power Management version 2
    Kernel driver in use: Intel ICH

01:00.0 VGA compatible controller: Matrox Graphics, Inc. MGA G400/G450 (rev 04) (prog-if 00 [VGA controller])
    Subsystem: Matrox Graphics, Inc. Millennium G400 MAX/Dual Head 32Mb
    Flags: bus master, VGA palette snoop, medium devsel, latency 64, IRQ 18
    Memory at f6000000 (32-bit, prefetchable) [size=32]
    Memory at fd200000 (32-bit, non-prefetchable) [size=16]
    Memory at fc800000 (32-bit, non-prefetchable) [size=8]
    [virtual] Expansion ROM at f5e00000 [disabled] [size=64]
    Capabilities: [dc] Power Management version 2
    Capabilities: [f0] AGP version 2.0
    Kernel driver in use: matrox_w1

05:02.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5782 Gigabit Ethernet (rev 03)
    Subsystem: Hewlett-Packard Company d530 CMT (DG746A)
    Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 20
    Memory at fc440000 (64-bit, non-prefetchable) [size=64]
    Expansion ROM at <ignored> [disabled]
    Capabilities: [48] Power Management version 2
    Capabilities: [50] Vital Product Data
    Capabilities: [58] MSI: Enable- Count=1/8 Maskable- 64bit+
    Kernel driver in use: tg3

05:04.0 Mass storage controller: Promise Technology, Inc. PDC40718 (SATA 300 TX4) (rev 02)
    Subsystem: Promise Technology, Inc. PDC40718 (SATA 300 TX4)
    Flags: bus master, 66MHz, medium devsel, latency 72, IRQ 16
    I/O ports at 1800 [size=128]
    I/O ports at 1000 [size=256]
    Memory at fc450000 (32-bit, non-prefetchable) [size=4]
    Memory at fc400000 (32-bit, non-prefetchable) [size=128]
    [virtual] Expansion ROM at 50100000 [disabled] [size=32]
    Capabilities: [60] Power Management version 2
    Kernel driver in use: sata_promise

05:0a.0 Mass storage controller: Promise Technology, Inc. PDC40718 (SATA 300 TX4) (rev 02)
    Subsystem: Promise Technology, Inc. PDC40718 (SATA 300 TX4)
    Flags: bus master, 66MHz, medium devsel, latency 72, IRQ 21
    I/O ports at 1880 [size=128]
    I/O ports at 1400 [size=256]
    Memory at fc451000 (32-bit, non-prefetchable) [size=4]
    Memory at fc420000 (32-bit, non-prefetchable) [size=128]
    [virtual] Expansion ROM at 50108000 [disabled] [size=32]
    Capabilities: [60] Power Management version 2
    Kernel driver in use: sata_promise

And here is how it looks like in Yast Partitioner:
partitions png

From the image you can see I have a Promise SATA 300 TX4 cards and SATA drives are attached to it while IDE drives are attached to the motherboard directly. What really puzzles me why are those 2 extra PCI cards (lspci shows them as 05:04.0 and 05:0a.0) listed first in YAST Partitioner and before Motherboards own IDE channels (lspci shows it as 00:1f.1 IDE interface)?
Any suggestions/help will be appriciated. Thanks in advance.[/size][/size][/size][/size][/size][/size][/size][/size][/size][/size][/size][/size][/size][/size][/size][/size][/size][/size][/size][/size][/size][/size][/size][/size][/size][/size][/size][/size][/size][/size][/size][/size][/size][/size][/size][/size]

Now I am even more confused. I installed Xen and booted into the OS. Yast Partitioner shows hard drive order as it used to be and as it should be imo. This is even more confusing and could be a bug?
Here is how grub menu looks like


# Modified by YaST2. Last modification on Sat Mar 12 22:18:22 CET 2011
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
# Configure custom boot parameters for updated kernels in /etc/sysconfig/bootloader

default 1
timeout 8
##YaST - generic_mbr
gfxmenu (hd0,0)/message
##YaST - activate

###Don't change this comment - YaST2 identifier: Original name: xen###
title Xen -- openSUSE 11.4 - 2.6.37.1-1.2
    root (hd0,0)
    kernel /xen.gz vga=mode-0x317 
    module /vmlinuz-2.6.37.1-1.2-xen root=/dev/disk/by-id/ata-Maxtor_6L300R0_L60YX44G-part2 resume=/dev/disk/by-id/ata-Maxtor_6L300R0_L60YX44G-part3 splash=silent quiet showopts vga=0x317
    module /initrd-2.6.37.1-1.2-xen

###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.4 - 2.6.37.1-1.2
    root (hd0,0)
    kernel /vmlinuz-2.6.37.1-1.2-default root=/dev/disk/by-id/ata-Maxtor_6L300R0_L60YX44G-part2 resume=/dev/disk/by-id/ata-Maxtor_6L300R0_L60YX44G-part3 splash=silent quiet showopts vga=0x317
    initrd /initrd-2.6.37.1-1.2-default

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 11.4 - 2.6.37.1-1.2
    root (hd0,0)
    kernel /vmlinuz-2.6.37.1-1.2-default root=/dev/disk/by-id/ata-Maxtor_6L300R0_L60YX44G-part2 showopts apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x317
    initrd /initrd-2.6.37.1-1.2-default

###Don't change this comment - YaST2 identifier: Original name: floppy###
title Floppy
    rootnoverify (fd0)
    chainloader +1

Please feel free to share some light on the issue? Thanks.

Same comment as here: Mounting issue second drive

ehm? avoid mixing SATA and IDE disks? You mean I should buy new motherboard and couple of SATA hard drives then transfer all that is on IDE hard drives to them? How economicaly this is and insane? “old” IDE drives still work flawlessly. As I said above Xen kernel did NOT have any troubles with this. And as this pc is attended to be used as home server/backup server it will not be rebooted that often so udev preformance does not mean much here. Is there a way to load make udev load kernel modules in some order? and how? Please read post above first before you answer like that :slight_smile: That does not help me a bit. Or solves the problem. What I wrote/explained in 2 last posts show inconsistency between 2 kernels. And just that is bad in my opinion.
Regards Nik

One more thing I cant edit last post so I’ll qucik reply here. I just rebooted the system couple of times and hard drive order does NOT change as you stated in
Mounting issue second drive
From

udev loads kernel modules by utilizing coding parallelism to provide a potential performance advantage versus loading these modules serially. The modules are therefore loaded asynchronously. The inherent disadvantage of this method is that udev does not always load modules in the same order on each boot. If the machine has multiple block devices, this may manifest itself in the form of device nodes changing designations randomly. For example, if the machine has two hard drives, /dev/sda may randomly become /dev/sdb. See below for more info on this.
And this goes both for the Xen installed kernel and default kernel. I just rebooted pc couple of times and hard drive order REMAINS the same (inconsistent between 2 kernels). So this is not true. I can provide you with screen dumps. Regards

Well I don’t mean anything. You can live with that but - as you noticed - it makes it hard to figure out what hard drive is what.

That’s unrelated.

Try to reboot ten times and you’ll end up with the drives in an order you like. Or play a little bit with the BIOS order but …

Not that I know of.

OKI Doki.

I never said it was good.

Now what I have done just to test your theory rebooted pc a couple of times and yes it is the true what I say. Hard drive order REMAINS the same for each of the kernels and does not change randomly as you say. I also installed desktop kernel and there the order appear the same as with xen kernel. I also noticed one more thing. During the boot right after choosing menu option in grub if I press F2 I can see some differences. Both Xen and desktop kernels say that ata-piix module is missing and write error message, while there is no such errors during kernel default I hope you can at least help with that? :slight_smile: or that can give a clue what is going on here. Regards.

This is not “my theory”. However I might also construct theories but, as you made it clear that it wasn’t what you were looking for, I made an exception this time. :wink:

OK. You know it might also not rain for hundred days. ‘randomly’ is something you cannot predict.

Don’t have a 11.4 ready nor Xen kernel, but it’s interesting.

From what I can tell, I don’t see differences. But I will pay attention. I’ve already seen this message on some machines too.


# find /lib/modules -name "*ata_piix*"
/lib/modules/2.6.34.7-0.7-default/kernel/drivers/ata/ata_piix.ko
/lib/modules/2.6.34.7-0.7-desktop/kernel/drivers/ata/ata_piix.ko

# diff /boot/config-2.6.34.7-0.7-{desktop,default} | grep -i ata

Thanks I will look into this further as I noticed with lsmod | grep ata that some more modules are loaded with default kernel compaired to the desktop kernel. Also about udev I stumbled upon this http://www.linuxformat.co.uk/includes/download.php?PDF=LXF66.tut_udev.pdf. Just quick reading tells me that udev randomness (I do know what it is and that there is probably no such thing as random :-). I also do some C,C++ programing in my spare time) could be true but when it comes to USB devices :). So my problem here might have something to do how udev detects devices. As I said in the first post it detects PCI devices first and IDE controller second. It should be other way around in my opinion as IDE controller is built into the motherboard and PCI is just and add on card I put in there so I could use SATA drives in that pc. I will be looking further into this but I do believe there are some differences here when booting xen/desktop or default/failsafe kernels. Btw I have been using Suse since 7.3 on and off but never did too much digging into it. I guess there is a first time for all. :slight_smile: Regards

It might also depend on mainboard design, BIOS - also BIOS order - and other things you don’t have influence over. Some people might also never encounter this issue (while mixing IDE and SATA disks) while for others, the device names will basically change after each reboot. If you ask me … it just sucks. udev does exactly the same with network interfaces. Just install Linux ten times on the same machine with several network cards and you will see that the ones attached to eth0, eth1, etc vary. However for network devices, you can write udev rules (precisely /etc/udev/rules.d/70-persistent-net.rules) and decide that such nic should get such device name. But these rules are stored on the hard disk … Where would you put the rules for the hard disks? There might be ways to achieve that for sure, like maybe passing arguments to the modules as boot options. But I doubt it’s going to happen soon, as the trend is to load more and more stuff more an more asynchronously in order to save milliseconds at boot. IMHO, the pratical solution is not to try to bring udev to name the devices as you wish - it won’t - but to simply ‘ignore’ device names and only use labels or UUIDs everywhere. That works. You can keep your IDE disks. As I said, it only adds more confusion. But once you’re aware of the confusion, you can live with it.

nidzo wrote:

>
> Thanks I will look into this further as I noticed with lsmod | grep ata
> that some more modules are loaded with default kernel compaired to the
> desktop kernel. Also about udev I stumbled upon this
> http://tinyurl.com/35qexnv. Just quick reading tells me that udev
> randomness (I do know what it is and that there is probably no such
> thing as random :-). I also do some C,C++ programing in my spare time)
> could be true but when it comes to USB devices :). So my problem here
> might have something to do how udev detects devices. As I said in the
> first post it detects PCI devices first and IDE controller second. It
> should be other way around in my opinion as IDE controller is built into
> the motherboard and PCI is just and add on card I put in there so I
> could use SATA drives in that pc. I will be looking further into this
> but I do believe there are some differences here when booting
> xen/desktop or default/failsafe kernels. Btw I have been using Suse
> since 7.3 on and off but never did too much digging into it. I guess
> there is a first time for all. :slight_smile: Regards

I commented on that with RC1 and the 11.4 DVD gave me a warning tonight
updating another machine about “some configuration files using kernel device
names might cause me problems” so something has changed at the kernel level.
For example, I have 2 SATA drives and one of those 4-slot card readers.
Before now, the two SATA drives were named sda and sdb. USB drives got sdg,
etc. regardless which drive I was installed on. Now, booting from hd0 shows
hd0 as sda, hd1 as sdf and the 4 card slots as sdb-sde. Wait! Booting from
the hd1 installation (a mirror of the other 11.4 instance) has the kernel
assigning hd0 as sde and hd1 as sdf with the USB cards slots getting sda-
sdd!

I actually like using the disk-by-id scheme for booting (GRUB) but this
musical chairs game is a PITA, especially when different copies of the same
system on this one machine give different kernel device names to the
components. Makes the old “mount /dev/sd(x) /mnt” a tad dicey since keeping
track of a mobile definition of (x) means I gotta remember the disk id of
all the devices. There has to be some way to lock those names down!


Will Honea

The easiest way is to label the partitions and use those labels. Another way is to use UUIDs. UUIDs don’t change unless you reformat the partitions. disk-by-id don’t change unless you add/remove partitions. UUIDs entries in /boot/grub/menu.lst and /etc/fstab will still work on a duplicated hard disk while disk-by-id won’t. disk-by-id won’t bother if you mount both the original and the copy since they are based on the hard disks serials, which are not the same. So both methods have advantages and inconvenients and you might use one or the other depending on what you are doing.

I have a script to display UUIDs and diks IDs of all partitions, which is called halinfo, since I originally wrote it to query the hal daemon. Now it can query either the hal daemon or udev. Both outputs should be similar. Use the syntax halinfo -hV or halinfo -uV for verbose output. The latest version is posted here: Displaying partitions infos from hal daemon.To show labels and UUIDs, you can also use the command blkid.

With the informations provided by halinfo and/or blkid you can edit /boot/grub/menu.lst and /etc/fstab using the most suitable syntax for you. Remember to never use device names!

The easiest and most natural way is as it used to be before :). First IDE hard drive gets name /dev/sda second /dev/sdb and so on then SATA hardrives. Yes UUID labeling is fine too I guess and bomb safe, unless that hard drive is failing and you dd it to another hard drive. Then when you are about to reboot nothing works. That is the same as in the programing you use hard coding. That works for the particular system but to port it is another issue and takes time/effort.

My original doubt was if you go back and read/compare images and my thoughts would be still this UDEV should work same under all kernels or if there something I don’t get here? as I said I can provide you with images and boot into one kernel and tthen the other one. Observe that hard drive order doesnt change between reboots only between different kernels!! UDEV when started with kernel 2.6.37.1-1.2-default has totally different hard drive order compaired to when the pc is booted with kernel xen 2.6.37.1-1.2 and this is where it is all wrong if you ask me, as it is inconsistent.

I have a script to display UUIDs and diks IDs of all partitions, which is called halinfo …

Great work. That will make life easier in finding what is wrong probably.

I will for now remove default 2.6.37.1-1.2 kernel and use desktop/xen kernels as those work as it should be.
One more thougt is to remove those PCI cards then boot with default 2.6.37.1-1.2 kernel and see/compair what is going on.

fdisk -l with default 2.6.37.1-1.2 kernel

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0004b95b

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63  1953520064   976760001   83  Linux

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000eb48c

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63   976768064   488384001   83  Linux

Disk /dev/sdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x43c445cf

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1              63   976768064   488384001   83  Linux

Disk /dev/sdd: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x4038c4b5

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1              63   976768064   488384001   83  Linux

Disk /dev/sde: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d9d06

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1              63  1953520064   976760001   83  Linux

Disk /dev/sdf: 300.1 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders, total 586114704 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00072067

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1   *          63      417689      208813+  83  Linux
/dev/sdf2          417690   105273944    52428127+  83  Linux
/dev/sdf3       105273945   107956799     1341427+  82  Linux swap / Solaris
/dev/sdf4       107956800   586099394   239071297+  83  Linux

Disk /dev/sdh: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 cylinders, total 490234752 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x4b0997bb

   Device Boot      Start         End      Blocks   Id  System
/dev/sdh1              63   490223474   245111706   83  Linux

Disk /dev/sdi: 300.1 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders, total 586114704 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xeccebbe4

   Device Boot      Start         End      Blocks   Id  System
/dev/sdi1              63   586099394   293049666   83  Linux

Disk /dev/sdg: 163.9 GB, 163928604672 bytes
255 heads, 63 sectors/track, 19929 cylinders, total 320173056 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x8296ba09

   Device Boot      Start         End      Blocks   Id  System
/dev/sdg1              63   320159384   160079661   83  Linux


More output comes.

fdisk -l when booted with 2.6.37.1-1.2-xen kernel



Disk /dev/sdb: 163.9 GB, 163928604672 bytes
255 heads, 63 sectors/track, 19929 cylinders, total 320173056 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x8296ba09

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63   320159384   160079661   83  Linux

Disk /dev/sda: 300.1 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders, total 586114704 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00072067

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63      417689      208813+  83  Linux
/dev/sda2          417690   105273944    52428127+  83  Linux
/dev/sda3       105273945   107956799     1341427+  82  Linux swap / Solaris
/dev/sda4       107956800   586099394   239071297+  83  Linux

Disk /dev/sdc: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 cylinders, total 490234752 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x4b0997bb

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1              63   490223474   245111706   83  Linux

Disk /dev/sdd: 300.1 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders, total 586114704 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xeccebbe4

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1              63   586099394   293049666   83  Linux

Disk /dev/sde: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0004b95b

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1              63  1953520064   976760001   83  Linux

Disk /dev/sdf: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000eb48c

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1              63   976768064   488384001   83  Linux

Disk /dev/sdg: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x43c445cf

   Device Boot      Start         End      Blocks   Id  System
/dev/sdg1              63   976768064   488384001   83  Linux

Disk /dev/sdh: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x4038c4b5

   Device Boot      Start         End      Blocks   Id  System
/dev/sdh1              63   976768064   488384001   83  Linux

Disk /dev/sdi: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d9d06

   Device Boot      Start         End      Blocks   Id  System
/dev/sdi1              63  1953520064   976760001   83  Linux

Can you see the difference now??? This is exactly how it should be booted as it used to be in OpenSuse 11.2. So imo there is some bug in 2.6.37.1-1.2-default kernel with udev devices order. Don’t ask me what yet as I am not sure. Regards.

Or to do like I used to do before and like I would still do if I weren’t spending so much time chatting around here with my friends: use NetBSD or openBSD, which handle disks and other devices naming as well as everything else (except filesystem) in a most cleaner and realistic way. I would say FreeBSD too … but FreeBSD tries to resemble Linux … just like Linux tries to resemble Windows. That will all ends in chaos. >:)

No. It works. I’ve done it already. This is one of the reasons why I mount by UUIDs and not by disk IDs. Look at the differences in the /etc/fstab below:


UUID=e15f9b1d-d2e4-404f-aac6-79e46b016eb9 /                    ext3       acl,user_xattr        1 1
UUID=ed078dce-1524-4421-933f-68577673f1cd /local               ext3       acl,user_xattr        1 2
UUID=37a0de1f-8fbb-4883-95b5-f76c7853d01b /usr                 ext4       acl,user_xattr        1 2
UUID=620d92ae-0325-479d-8c41-fa0f7bde5912 /var                 ext4       acl,user_xattr        1 2
UUID=50089717-8b5e-482a-8686-7d47d88b7402 swap                 swap       defaults              0 0
UUID=667b3d11-8d33-44a1-92a9-4ce2b0d1ce79 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-ST3320620A_6QF13R29-part10 /home           ext3       defaults              1 2
UUID=e373d504-6654-4859-8b31-0297d98ba743 /srv                 ext4       defaults              1 2
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0

If I duplicate the disk, all the partitions will mount fine except /home. Use this syntax and not the one used for /home, which is the default in openSUSE. However, while installing you can select ‘mount by UUID’ in the fstab options for each partition. I forgot to do it for /home during this setup as you can see in the example above.

Same goes for GRUB menu why using UUIDs.

###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.4 - 2.6.37.1-1.2
    root (hd0,10)
    kernel /boot/vmlinuz-2.6.37.1-1.2-default root=/dev/disk/by-uuid/e15f9b1d-d2e4-404f-aac6-79e46b016eb9 resume=/dev/disk/by-uuid/50089717-8b5e-482a-8686-7d47d88b7402 splash=silent quiet showopts vga=0x31a
    initrd /boot/initrd-2.6.37.1-1.2-default

I don’t know why openSUSE uses /dev/disk/by-uuid by default while others (Ubuntu, Mandriva, Fedora among others) use the UUID notation:

###Don't change this comment - YaST2 identifier: Original name: Ubuntu###
title Ubuntu 10.10 (maverick) - kernel 2.6.35-27-generic
    root (hd0,5)
    kernel /boot/vmlinuz-2.6.35-27-generic root=UUID=5adac0e4-5c27-4292-a8dc-cd86cb806951 ro vga=794
    initrd /boot/initrd.img-2.6.35-27-generic

But both syntaxes are possible. I don’t like /dev/disk-by… because these links are generated during boot by udev … and, like you, I don’t particularly like udev. But it is nothing but a superstition, because if udev doesn’t work nothing is going to work … However I’ve seen cases where some disk-by-uuid links were missing (after moving/resizing or deleting partitions).

Don’t understand me wrong. I am on your side. :slight_smile:
I’ve seen the issue on several systems under several Linux distros - while others did fine - on machines with mixed SATA/IDE configuration or not - and with some kernels - while others did fine. I agree that there is a need for more documentation and explanation (if there is one) on that topic.

Are you using Xen … if I may ask? If not, why would you use the Xen kernel? As for the default kernel, it is fine, just doesn’t have PAE support. So I wouldn’t use it on 32bit system with more than 2 GB of RAM. Otherwise it’s fine.

Or to do like I used to do before and like I would still do if I weren’t spending so much time chatting around here with my friends: use NetBSD or openBSD, which handle disks and other devices naming as well as everything else (except filesystem) in a most cleaner and realistic way. I would say FreeBSD too … but FreeBSD tries to resemble Linux … just like Linux tries to resemble Windows. That will all ends in chaos.
I would have to say big NO to the BSD. As I said before I have been using Suse since 7.3 and what can I say I like it. Yes I have been considering using other Linux distro, since many things/changes with Suse are not so clear and well it is hard to get help when things go badly. But I am a guy who does not quit so easily or give up. :wink:

Don’t understand me wrong. I am on your side. I’ve seen the issue on several systems under several Linux distros - while others did fine - on machines with mixed SATA/IDE configuration or not - and with some kernels - while others did fine. I agree that there is a need for more documentation and explanation (if there is one) on that topic.
I didnt understand you wrongly. I just didn’t know that if you dd the hard drive you keep uuids. My bad I guess.

But both syntaxes are possible. I don’t like /dev/disk-by… because these links are generated during boot by udev … and, like you, I don’t particularly like udev. But it is nothing but a superstition, because if udev doesn’t work nothing is going to work … However I’ve seen cases where some disk-by-uuid links were missing (after moving/resizing or deleting partitions).
I said it before I don’t mind this way or that way as long as there is consistency and here it is not the case. You just can’t/shouldn’t boot into different kernels and fdisk shows different disk orders. That is design flaw, and should be corrected asap. For that reason default kernel is not fine. And I say here default kernel and not xen/desktop kernels since I can compare disk order to the older kernels since 10.x. I would bet all my money (if I had it ;)) that this will sooner or later show as a bug when some one who has more knowledge/time/expertise then me to find out what is going on here.
And yes I am planing on using Xen. Regards.

Nevermind, but a big NO is kind of exagerated. OpenBSD is an excellent OS … although ufs/ffs filesystem sucks, so we’ll still have Linux fileservers for a long time. But as a router/firewall with pf, there is no contest (IMHO). BTW, I’ve been using SuSE since the very beginning and I like it too.

That wouldn’t change what’s bothering you in udev.

Yes we can . :frowning:

Be grateful that you don’t have that money then!

And yes I am planing on using Xen.

You might have a look at this script I’m working on if you have the time: vm-create : create kvm virtual machines. It is for kvm but it should work with Xen with little or no change.

For what it’s worth, I’ve seen this behavior many times before as well. I’ve had drives that SHOULD be /dev/sda appear as /dev/sd<something else other than a> which left me a bit puzzled. it’s even happened after system installation, and then when rebooting, the system wouldn’t even come up correctly because the drive order had been changed.

Say what you want about labels and UUIDs, which I understand were designed to work around this problem to some extent, but still, the first internal drive should always show up as /dev/sda and not change to something else when I un-dock my laptop and un-plug my external SATA card. Yes, I like consistency.

I’ve always been able to fix this by specifying the order of module loading in the initrd … openSUSE makes this a lot easier than in other distributions. Try checking out the section “INITRD_MODULES” (just search for it) in the Yast Module called “/etc/sysconfig editor” and I’ll bet your SATA module is loaded before your IDE one, etc.

Arrange those in the order you want the drives to appear in, reboot, and see if that makes a difference.

HTH.

nidzo wrote:

> I said it before I don’t mind this way or that way as long as there is
> consistency and here it is not the case. You just can’t/shouldn’t boot
> into different kernels and fdisk shows different disk orders.

You’ve actually hit on the biggest PITA I have with this. I get a steady
stream of drives in here for data recovery and/or wiping and trying to keep
track is already chore, especially when I can’t hot-plug the drive or use a
USB interface gizmo to attach to the drive and have to re-boot to bring it
up. At least the USB converter has (so far) given consistent mappings.


Will Honea