SBP2 hotplug doesn't update /proc/partitions

Torrey Hoffman (thoffman@arnor.net)
12 Jun 2003 12:28:00 -0700


I am now running 2.5.70-bk15, and with slab debugging turned off SBP2
mostly works. However, I just had an interesting glitch show up.

I plugged in a 120 GB drive which had two VFAT partitions, mounted them,
copied some data to them, unmounted them, and unplugged the drive.
That worked perfectly. (This was the first use of SBP2 after booting.)

Then I plugged in a 250 GB drive with a single reiserfs partition. The
SBP2 driver detected the drive correctly, but the kernel's idea of what
partitions are available was not updated.

/proc/partitions still has the old, stale data from the 120 GB drive and
looks like this: (skipping my hda partitions)

major minor #blocks name

8 0 117187500 sda
8 1 80011701 sda1
8 2 37174410 sda2

fdisk /dev/sda believes the drive is only 120 GB but has a single 250 GB
partition:

[root@torrey mnt]# fdisk /dev/sda

The number of cylinders for this disk is set to 14589.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sda: 120.0 GB, 120000000000 bytes
255 heads, 63 sectors/track, 14589 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 30515 245111706 83 Linux

Attempting to mount the partition fails and produces lots of errors,
which is not surprising. A snippet of the system log:

Jun 12 12:10:12 torrey kernel: found reiserfs format "3.6" with standard journal
Jun 12 12:10:15 torrey kernel: limit=160023402
Jun 12 12:10:15 torrey kernel: attempt to access beyond end of device
Jun 12 12:10:15 torrey kernel: sda1: rw=0, want=394002440, limit=160023402
Jun 12 12:10:15 torrey kernel: attempt to access beyond end of device

Here is the system log of the 250 GB drive being plugged in and
correctly detected:

Jun 12 12:09:45 torrey /etc/hotplug/ieee1394.agent: Setup sbp2 for IEEE1394 product 0x000000/0x00609e/0x010483
Jun 12 12:09:45 torrey kernel: ieee1394: sbp2: Logged into SBP-2 device
Jun 12 12:09:45 torrey kernel: ieee1394: sbp2: Node[00:1023]: Max speed [S400] - Max payload [2048]Jun 12 12:09:45 torrey kernel: Vendor: Maxtor 4 Model: A250J8 Rev:
Jun 12 12:09:45 torrey kernel: Type: Direct-Access ANSI SCSI revision: 06
Jun 12 12:09:45 torrey kernel: error 1
Jun 12 12:09:46 torrey devlabel: devlabel service started/restarted

Thanks for your development efforts!

Torrey Hoffman

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/