Upgrade to 8.04 (Hardy) trashed RAID Array

Bug #224171 reported by tonyw
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Release Notes for Ubuntu
Invalid
Undecided
Unassigned
mdadm (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

This issue should be covered in the release notes, but appears not to be.

I was upgrading an Xubuntu based server from 7.10 to 8.04. This system ran a 2.6.22-14-server kernel image and had an ATA-133 IDE system disk (/dev/hda) and two SATA 320GB disks as a RAID-1 array (/dev/sda1 and /dev/sdb1 configured as /dev/md0). The array was defined by an entry in mdadm.conf:

ARRAY /dev/md0 devices=/dev/sda1,/dev/sdb1

Following the upgrade to the 2.6.24-16-server kernel image, the device names for the disks changed:
/dev/hda -> /dev/sda
/dev/sda -> /dev/sdb
/dev/sdb -> /dev/sdc

This was not expected and appeared as a failure to assemble the RAID array. An attempt to manual start the RAID array brought it up with a single disk only (/dev/sdb1). Only by poking around with fdisk was it apparent that /dev/sda had a different partition scheme to that expected - and was really /dev/hda1.

This problem was corrected by adding /dev/sdc1 back into the RAID array and by updating mdadm.conf. However, the change to device names should have been flagged up in the release notes and a warning given during the upgrade process. This is probably only one example of how an unexpected change to device names can screw up an upgrade.

Luke Faraone (lfaraone)
Changed in ubuntu-website:
status: New → Confirmed
Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

The question becomes how did those hard disk IDs end up as /dev/hd* ? Did a tool automatically put them in? Ubuntu has defaulted (and switched during the upgrade to Edgy) device IDs to UUIDs (see https://help.ubuntu.com/community/UsingUUID ). Non label/UUID references can and will break and so should be avoided unless the user is willing (and able) to fix them up...

Revision history for this message
tonyw (tony-whyman) wrote :

Thanks for the link - its the first time I heard about this having come to Ubuntu after Edgy and from SuSe 9.2. I long as I have known Linux, IDE disk devices have always been entirely predictable from the cabling. It's the SCSI, SATA and USB drives that have a predictability problem - so I am not sure that messing with them was worth the effort. BTW, the bug also affects tapes. My IDE attached tape changed from /dev/ht0 to /dev/st0 at the same time!

Going back to an earlier backup, this is what my fstab looked like before the upgrade to 8.04:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/hda6
UUID=9d716e44-0a7f-4abb-abd1-6f7cf8dc0173 / ext3 defaults,errors=remount-ro 0 1
# /dev/hda5
UUID=03826fd9-2e03-4510-b630-f1e849c87f1d none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/md0 /raiddisk reiserfs rw,acl,user_xattr 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0

Note that the /dev/hda entries had been commented out. I assume this is by the Ubuntu installer as I don't remember doing this. I am not surprised to see this as hard linking a system disk to a UUID seems to be a good way of making it difficult to recover from a broken system disk. The RAID 1 arrar has a reiserfs file system for the simple reason that the system was upgraded from Suse 9.2 by replacing the system disk and then adding the RAID array from the original system.

I have been scanning the literature to see how to build a RAID array by UUID, but can't seen to find anything on this. Looks like you have to know the device names before you can assemble a RAID array - so UUIDs don't help much here.

Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

> as I have known Linux, IDE disk devices have always been entirely predictable

They can switch around due to cabling, BIOS and driver changes. You've encountered the last one...

> Looks like you have to know the device names before you can assemble a RAID array - so UUIDs don't help much here.

Only if you are assembling the array by hand (e.g. a disk has been dropped). The final filesystem can be labelled like any partition (assuming the /dev/md? device was built). If md is working correctly it will be able to assembled the underlying partitions itself automatically (so it won't matter if you switch disks around etc).

Old documentation won't talk about filesystem labelling or UUIDs (because it wasn't around) so take a look at the age of the documents.

Revision history for this message
Charlie Kravetz (cjkgeek) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. For reasons explained already, the issue has already been resolved.

Changed in mdadm:
status: New → Invalid
Revision history for this message
Charlie Kravetz (cjkgeek) wrote :

Documentation still does not explain how to use UUID instead of hd?/sd? to build and maintain the RAID configuration. A quick search of the community maintained documentation for example:
https://help.ubuntu.com/community/Installation/SoftwareRAID
https://help.ubuntu.com/community/Installation/FileServerWithRAID

Revision history for this message
David Tombs (dgtombs) wrote :

This should be in the release notes, not the website.

affects: ubuntu-website → ubuntu-release-notes
Revision history for this message
Dave Walker (davewalker) wrote :

Hardy release notes have long since passed. Marking the ubuntu-release-notes as Invalid.

Thanks.

Changed in ubuntu-release-notes:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.