Disks mounting in wrong order after upgrade to 8.10

Asked by Paul Slater

Hi,

I recently upgraded from Hardy to Intrepid and now my disks appear to be mounting incorrectly. Note, this doesn't happen at every boot, it only affects me about 3 times out of 5 which seems odd.

I have four drives attached - one for the system, one for my data, which is accessed via symbolic links from my /home folder, one for backups, and one for Windows.

Following a successful boot, gparted tells me this:

Disk FS Mountpoint Label
sda
 sda1 ext3 /
 sda2 extended
 sda5 linux-swap

sdb
 sdb1 ext3 /media/sdb1 data

sdc
 sdc1 ntfs /media/sdc1

sdd
 sdd1 ext3 /media/sdd1 backups

Following an *unsuccessful* boot:

sda
 sda1 ntfs

sdb
 sdb1 ext3 /, /media/sdb1
 sdb2 extended
 sdb5 linux-swap

sdc
 sdc1 ext3 /media/sdc1 data

sdd
 sdd1 ext3 /media/sdd1 backups

So sdc somehow becomes sda, sda becomes sdb, sdb becomes sdc, etc.

Also note that my data drive appears to be mounted twice, at / and at /media/sdb1.

I can still access the drives via the "Places" menu, but they appear under "Removable Media". Also, my symbolic links to "Documents", "Music" etc. are now broken, because they point to the wrong place.

It is baffling me as to how these things seem to move around in an unpredictable fashion following some, but not all reboots. So two questions, I guess:

1. Why is this happening since upgrading to 8.10? (With 8.04, everything stayed "in the same place")
2. Once the system has booted "correctly" (i.e. all drives where they should be), is it possible to do something to make that state permanent?

Note that I have tried re-installing a few times from scratch with different configurations of disks etc., swapped from one controller to another for example, but the problem still exists, and is still unpredictable in nature.

Many thanks in advance.

Paul

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu util-linux Edit question
Assignee:
No assignee Edit question
Solved by:
Florian Diesch
Solved:
Last query:
Last reply:
Revision history for this message
Florian Diesch (diesch) said :
#1

I don't know why this is happening, but a solution would be to use UUIDs instead of device files in /etc/fstab. See <https://help.ubuntu.com/community/Fstab> for how /etc/fstab works.

Revision history for this message
Paul Slater (potatan) said :
#2

Thanks for your response.

At the moment (i.e. right now), I seem to be running in a situation that works, all symlinks are working, my Desktop background is being loaded from my data drive, etc.

I was going to have a go at assigning UUIDs in fstab, so I tried running "blkid" but this gives me different results to what I see in my current fstab.

blkid output:
/dev/sda1: UUID="9966fb3e-aa44-487f-b5d1-d3cde8d6e6fe" TYPE="ext3" SEC_TYPE="ext2" LABEL="Data"
/dev/sdb1: LABEL="backups" UUID="7557036d-9ba5-4d6a-927e-1bd42a0cd5d3" SEC_TYPE="ext2" TYPE="ext3"
/dev/sdc1: UUID="d48068a0-fa56-4be9-8a57-7abef8946e4e" TYPE="ext3" SEC_TYPE="ext2"
/dev/sdd1: UUID="d48068a0-fa56-4be9-8a57-7abef8946e4e" TYPE="ext3"
/dev/sdc5: TYPE="swap" UUID="092549ce-c7ea-4f15-bff3-7f6afc12f517"

Current fstab contents:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
#
/dev/sdb1 / ext3 relatime,errors=remount-ro 0 1
#
UUID=092549ce-c7ea-4f15-bff3-7f6afc12f517 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/sda1 /media/data ext3 relatime 0 2

I'm not sure whether the current contents of fstab *actually* represent how the drives are currently mounted, but for instance, blkid reports /dev/sdb1 as being my actual "backups" drive, but fstab thinks it is mounted at "/".

This is quite frustrating. I sometimes have to reboot from three to five times before things mount up in the right order. It is even more frustrating as it only began happening since I started using 8.10.

Revision history for this message
Florian Diesch (diesch) said :
#3

When started as non-root blkid reads its data from a cache file (/etc/blkid.tab) instead of scanning devices. Use
  sudo blkid -c /dev/null
to avoid blkid using cached data.

To see how the drives are currently mounted you can use
 df

Revision history for this message
Paul Slater (potatan) said :
#4

So what I need to do is to boot into an acceptable configuration, run "sudo blkid -c /dev/null", and then see which UUIDs are mounted where. If they all look okay, then change /etc/fstab to include the UUIDs as reported by the blkid scan.

This (if it works) will be great, but it still leaves two issues. Why did this begin to happen only following the installation (upgrade and clean install) of 8.10? And also, as this seems to be a dynamically changing problem, what will prevent the disks from mounting in the wrong order again at a subsequent reboot?

Revision history for this message
Florian Diesch (diesch) said :
#5

The advantage of using UUIDs instead of device files in fstab is that a UUID is a property of the file system (that's the data structure you create when formating a disk). So it's not possible that a partition gets mounted to the wrong mountpoint.

The device file depends on the order in which the kernel recognizes the disks. If for some reason this order changes the partition gets another device.

The disadvantage is that the UUID changes if you format the partition. But I don't think that's a problem in your case.

I don't know why you see a change in 8.10 but not in 8.04, but maybe that's because of some changes in the kernel.

Could you please post the output of
 sudo lshw -C storage -C disk

That gives some information about your hardware.

Revision history for this message
Paul Slater (potatan) said :
#6

Of course - here you go:

 *-storage:0
       description: RAID bus controller
       product: PDC20378 (FastTrak 378/SATA 378)
       vendor: Promise Technology, Inc.
       physical id: 8
       bus info: pci@0000:00:08.0
       logical name: scsi5
       version: 02
       width: 32 bits
       clock: 66MHz
       capabilities: storage pm bus_master cap_list emulated
       configuration: driver=sata_promise latency=96 maxlatency=18 mingnt=4 module=sata_promise
     *-disk
          description: ATA Disk
          product: Hitachi HDT72502
          vendor: Hitachi
          physical id: 0.0.0
          bus info: scsi@5:0.0.0
          logical name: /dev/sdc
          version: V5DO
          serial: VFL101R13BTG5P
          size: 232GiB (250GB)
          capabilities: partitioned partitioned:dos
          configuration: ansiversion=5 signature=b6256c92
  *-storage:1
       description: RAID bus controller
       product: VIA VT6420 SATA RAID Controller
       vendor: VIA Technologies, Inc.
       physical id: f
       bus info: pci@0000:00:0f.0
       logical name: scsi0
       version: 80
       width: 32 bits
       clock: 33MHz
       capabilities: storage pm bus_master cap_list emulated
       configuration: driver=sata_via latency=64 module=sata_via
     *-disk
          description: ATA Disk
          product: Maxtor 6Y160M0
          vendor: Maxtor
          physical id: 0.0.0
          bus info: scsi@0:0.0.0
          logical name: /dev/sda
          version: YAR5
          serial: Y45B28HE
          size: 152GiB (163GB)
          capabilities: partitioned partitioned:dos
          configuration: ansiversion=5 signature=74bfade6
  *-ide
       description: IDE interface
       product: VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE
       vendor: VIA Technologies, Inc.
       physical id: f.1
       bus info: pci@0000:00:0f.1
       logical name: scsi2
       logical name: scsi3
       version: 06
       width: 32 bits
       clock: 33MHz
       capabilities: ide pm bus_master cap_list emulated
       configuration: driver=pata_via latency=32 module=pata_via
     *-disk
          description: ATA Disk
          product: SAMSUNG SV0602H
          physical id: 0
          bus info: scsi@2:0.0.0
          logical name: /dev/sdb
          version: RH10
          serial: 0451J1EW339492
          size: 55GiB (60GB)
          capabilities: partitioned partitioned:dos
          configuration: ansiversion=5 signature=b61eb61e
     *-cdrom
          description: DVD writer
          product: DVD_RW ND-2510A
          vendor: _NEC
          physical id: 1
          bus info: scsi@3:0.0.0
          logical name: /dev/cdrom
          logical name: /dev/cdrw
          logical name: /dev/dvd
          logical name: /dev/dvdrw
          logical name: /dev/scd0
          logical name: /dev/sr0
          version: 2.15
          serial: [_NEC DVD_RW ND-2510A 2.1504051401
          capabilities: removable audio cd-r cd-rw dvd dvd-r
          configuration: ansiversion=5 status=nodisc
  *-scsi
       physical id: 1
       bus info: usb@5:8
       logical name: scsi7
       capabilities: emulated scsi-host
       configuration: driver=usb-storage
     *-disk:0
          description: SCSI Disk
          product: CardReader CF RW
          vendor: USB2.0
          physical id: 0.0.0
          bus info: scsi@7:0.0.0
          logical name: /dev/sdd
          version: 0.0>
          capabilities: removable
        *-medium
             physical id: 0
             logical name: /dev/sdd
     *-disk:1
          description: SCSI Disk
          product: CardReader Combo
          vendor: USB2.0
          physical id: 0.0.1
          bus info: scsi@7:0.0.1
          logical name: /dev/sde
          version: 0.0>
          capabilities: removable
        *-medium
             physical id: 0
             logical name: /dev/sde

Revision history for this message
Paul Slater (potatan) said :
#7

Actually, the above output is from an "incorrect" boot. Let me reboot a few times and post further output, in case it's any different. brb

Revision history for this message
Paul Slater (potatan) said :
#8

As suspected - the output is now different:

 *-storage:0
       description: RAID bus controller
       product: PDC20378 (FastTrak 378/SATA 378)
       vendor: Promise Technology, Inc.
       physical id: 8
       bus info: pci@0000:00:08.0
       logical name: scsi1
       version: 02
       width: 32 bits
       clock: 66MHz
       capabilities: storage pm bus_master cap_list emulated
       configuration: driver=sata_promise latency=96 maxlatency=18 mingnt=4 module=sata_promise
     *-disk
          description: ATA Disk
          product: Hitachi HDT72502
          vendor: Hitachi
          physical id: 0.0.0
          bus info: scsi@1:0.0.0
          logical name: /dev/sda
          version: V5DO
          serial: VFL101R13BTG5P
          size: 232GiB (250GB)
          capabilities: partitioned partitioned:dos
          configuration: ansiversion=5 signature=b6256c92
  *-storage:1
       description: RAID bus controller
       product: VIA VT6420 SATA RAID Controller
       vendor: VIA Technologies, Inc.
       physical id: f
       bus info: pci@0000:00:0f.0
       logical name: scsi3
       version: 80
       width: 32 bits
       clock: 33MHz
       capabilities: storage pm bus_master cap_list emulated
       configuration: driver=sata_via latency=64 module=sata_via
     *-disk
          description: ATA Disk
          product: Maxtor 6Y160M0
          vendor: Maxtor
          physical id: 0.0.0
          bus info: scsi@3:0.0.0
          logical name: /dev/sdb
          version: YAR5
          serial: Y45B28HE
          size: 152GiB (163GB)
          capabilities: partitioned partitioned:dos
          configuration: ansiversion=5 signature=74bfade6
  *-ide
       description: IDE interface
       product: VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE
       vendor: VIA Technologies, Inc.
       physical id: f.1
       bus info: pci@0000:00:0f.1
       logical name: scsi5
       logical name: scsi6
       version: 06
       width: 32 bits
       clock: 33MHz
       capabilities: ide pm bus_master cap_list emulated
       configuration: driver=pata_via latency=32 module=pata_via
     *-disk
          description: ATA Disk
          product: SAMSUNG SV0602H
          physical id: 0
          bus info: scsi@5:0.0.0
          logical name: /dev/sdc
          version: RH10
          serial: 0451J1EW339492
          size: 55GiB (60GB)
          capabilities: partitioned partitioned:dos
          configuration: ansiversion=5 signature=b61eb61e
     *-cdrom
          description: DVD writer
          product: DVD_RW ND-2510A
          vendor: _NEC
          physical id: 1
          bus info: scsi@6:0.0.0
          logical name: /dev/cdrom
          logical name: /dev/cdrw
          logical name: /dev/dvd
          logical name: /dev/dvdrw
          logical name: /dev/scd0
          logical name: /dev/sr0
          version: 2.15
          serial: [_NEC DVD_RW ND-2510A 2.1504051401
          capabilities: removable audio cd-r cd-rw dvd dvd-r
          configuration: ansiversion=5 status=nodisc
  *-scsi
       physical id: 1
       bus info: usb@5:8
       logical name: scsi7
       capabilities: emulated scsi-host
       configuration: driver=usb-storage
     *-disk:0
          description: SCSI Disk
          product: CardReader CF RW
          vendor: USB2.0
          physical id: 0.0.0
          bus info: scsi@7:0.0.0
          logical name: /dev/sdd
          version: 0.0>
          capabilities: removable
        *-medium
             physical id: 0
             logical name: /dev/sdd
     *-disk:1
          description: SCSI Disk
          product: CardReader Combo
          vendor: USB2.0
          physical id: 0.0.1
          bus info: scsi@7:0.0.1
          logical name: /dev/sde
          version: 0.0>
          capabilities: removable
        *-medium
             physical id: 0
             logical name: /dev/sde

Revision history for this message
Florian Diesch (diesch) said :
#9

So every disk has its own controller. I guess /var/log/dmesg will show that the order in which the controllers are detected at boot time varies. I don't know much about hardware or kernel details so I don't know how this order can be influenced. Maybe it depends on some ACPI features.

Revision history for this message
Paul Slater (potatan) said :
#10

Many thanks for your help so far, Florian.

What can I do now to progress this problem?

Revision history for this message
Best Florian Diesch (diesch) said :
#11

I think using UUIDs in /etc/fstab should fix the issue.

Revision history for this message
Paul Slater (potatan) said :
#12

I've rebooted now about 8 times in the last couple of days after adding UUIDs to fstab, and everything comes up fine every time.

Many thanks again.

Revision history for this message
Paul Slater (potatan) said :
#13

Thanks Florian Diesch, that solved my question.