From: Stuart Gall on
Hello,
I have a strange issue and I have it on two unrelated systems.
One system has been working fine for over a year. (Debian 4.1.1-21) but
after a power failure started misbehaving

The other is a new system installed a few days ago. (Mandriva 2010.0 x86_64)

Some sata disks connected to the system do not get their partition
device created.
So say SDB
/dev/sdb exists
/dev/sdb1 is missing

I do
fdisk /dev/sdb
w

i.e. just rewrite the partition table with no changes.

Then the /dev/sdb1 is created, and can be mounted. But reboot and its
gone again.


I see no diferance on dmesg

scsi 0:0:0:0: Direct-Access ATA WDC WD2502ABYS-0 02.0 PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 490350672 512-byte logical blocks: (251 GB/233 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't
support DPO or FUA
sda: sda1 sda2 < sda5 sda6 sda7 sda8 sda9 >
sd 0:0:0:0: [sda] Attached SCSI disk
ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata2.00: ATA-8: WDC WD1002FBYS-02A6B0, 03.00C06, max UDMA/133
ata2.00: 1953525168 sectors, multi 16: LBA48 NCQ (depth 31/32)
ata2.00: configured for UDMA/133
scsi 1:0:0:0: Direct-Access ATA WDC WD1002FBYS-0 03.0 PQ: 0 ANSI: 5
sd 1:0:0:0: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
sd 1:0:0:0: [sdb] Write Protect is off
sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't
support DPO or FUA
sdb: sdb1
sd 1:0:0:0: [sdb] Attached SCSI disk



NB
sdb:sdb1
But /dev/sdb1 is not created.

Any ideas on when the /dev/sdxx links are created and/or how I can
debug this further ???




--
TIA
Stuart
--
There are three kinds of mathematician
Those that can count and those that cant.

From: Denis McMahon on
On 18/06/10 15:02, Stuart Gall wrote:

> Any ideas on when the /dev/sdxx links are created and/or how I can debug
> this further ???

Before you use your fdisk /dev/sdb fix, try:

sudo parted
select /dev/sdb
print all

The do your fdisk thing, then repeat the above.

Does it look the same before and after? Do the numbers look right?

Rgds

Denis McMahon
From: Stuart Gall on
On 2010-06-18 18:01:52 +0300, Denis McMahon
<denis.m.f.mcmahon(a)googlemail.co.uk> said:

> On 18/06/10 15:02, Stuart Gall wrote:
>
>> Any ideas on when the /dev/sdxx links are created and/or how I can debug
>> this further ???
>
> Before you use your fdisk /dev/sdb fix, try:
>
> sudo parted
> select /dev/sdb
> print all
>
> The do your fdisk thing, then repeat the above.
>
> Does it look the same before and after? Do the numbers look right?
>
> Rgds
>
> Denis McMahon

Hi Denis,

EXACTLY the same. I think udev is to blame --- somehow.
I set udev to debug, when I run fdisk it forces udev to reevaluate the
disk and udev then created the partition device file.
For some reason udev does not see the partition during normal startup.

I tried using various options on udevadm trigger but I cant get it to
create the file, only by running fdisk



During boot
Jun 18 18:34:45 ditto udevadm[1420]: device 0x11af0f0 has devpath
'/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda'
Jun 18 18:34:45 ditto udevadm[1420]: device 0x11af0f0 filled with db file data
Jun 18 18:34:45 ditto udevadm[1420]: device 0x11af0f0 has devpath
'/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1'
Jun

18 18:34:45 ditto udevadm[1420]: device 0x11af0f0 filled with db file data
Jun 18 18:34:45 ditto udevadm[1420]: device 0x11af0f0 has devpath
'/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda2'
Jun

18 18:34:45 ditto udevadm[1420]: device 0x11af0f0 filled with db file data
Jun 18 18:34:45 ditto udevadm[1420]: device 0x11af0f0 has devpath
'/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5'
Jun

18 18:34:45 ditto udevadm[1420]: device 0x11af0f0 filled with db file data
Jun 18 18:34:45 ditto udevadm[1420]: device 0x11af0f0 has devpath
'/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6'
Jun

18 18:34:45 ditto udevadm[1420]: device 0x11af0f0 filled with db file data
Jun 18 18:34:45 ditto udevadm[1420]: device 0x11af0f0 has devpath
'/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7'
Jun

18 18:34:45 ditto udevadm[1420]: device 0x11af0f0 filled with db file data
Jun 18 18:34:45 ditto udevadm[1420]: device 0x11af0f0 has devpath
'/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8'
Jun

18 18:34:45 ditto udevadm[1420]: device 0x11af0f0 filled with db file data
Jun 18 18:34:45 ditto udevadm[1420]: device 0x11af0f0 has devpath
'/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9'
Jun

18 18:34:45 ditto udevadm[1420]: device 0x11af0f0 filled with db file data
Jun 18 18:34:45 ditto udevadm[1420]: device 0x11af0f0 has devpath
'/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/bsg/0:0:0:0'
Jun 18 18:34:45 ditto udevadm[1420]: device 0x11af0f0 filled with db
symlink data '/dev/bsg/0:0:0:0'
Jun 18 18:34:45 ditto udevadm[1420]: device 0x11af0f0 has devpath
'/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/scsi_device/0:0:0:0'
Jun

18 18:34:45 ditto udevadm[1420]: device 0x11aef30 has devpath
'/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0'
Jun

18 18:34:45 ditto udevadm[1420]: device 0x11aef30 has devpath
'/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/scsi_generic/sg0'
Jun

18 18:34:45 ditto udevadm[1420]: device 0x11aef30 filled with db
symlink data '/dev/sg0'
Jun 18 18:34:45 ditto udevadm[1420]: device 0x11aef30 has devpath
'/devices/pci0000:00/0000:00:1f.2/host1'
Jun 18 18:34:45 ditto udevadm[1420]: device 0x11af150 has devpath
'/devices/pci0000:00/0000:00:1f.2/host1/scsi_host/host1'
Jun 18 18:34:45 ditto udevadm[1420]: device 0x11af120 has devpath
'/devices/pci0000:00/0000:00:1f.2/host1/target1:0:0'
Jun 18 18:34:45 ditto udevadm[1420]: device 0x11aeeb0 has devpath
'/devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0'
Jun 18 18:34:45 ditto udevadm[1420]: device 0x11aeeb0 has devpath
'/devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sdb'
Jun 18 18:34:45 ditto udevadm[1420]: device 0x11aeeb0 filled with db
file data <-------- NO PARTITIONS CREATED
Jun 18 18:34:45 ditto udevadm[1420]: device 0x11aeeb0 has devpath
'/devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/bsg/1:0:0:0'
Jun 18 18:34:45 ditto udevadm[1420]: device 0x11aeeb0 filled with db
symlink data '/dev/bsg/1:0:0:0'
Jun 18 18:34:45 ditto udevadm[1420]: device 0x11aeeb0 has devpath
'/devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/scsi_device/1:0:0:0'
Jun

18 18:34:45 ditto udevadm[1420]: device 0x11aee30 has devpath
'/devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/scsi_disk/1:0:0:0'
Jun

18 18:34:45 ditto udevadm[1420]: device 0x11aee30 has devpath
'/devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/scsi_generic/sg1'
Jun

18 18:34:45 ditto udevadm[1420]: device 0x11aee30 filled with db
symlink data '/dev/sg1'




When I run fdisk udev monitors the device


Jun 18 18:47:11 ditto udevd-work[609]: created db file for
'/devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sdb/sdb1'
in
'/dev/.udev/db/\x2fdevices\x2fpci0000:00\x2f0000:00:1f.2\x2fhost1\x2ftarget1:0:0\x2f1:0:0:0\x2fblock\x2fsdb\x2fsdb1'
Jun

18 18:47:11 ditto udevd-work[609]: creating device node '/dev/sdb1',
devnum=8:17, mode=0660, uid=0, gid=6
Jun 18 18:47:11 ditto udevd-work[609]: preserve file '/dev/sdb1',
because it has correct dev_t
Jun 18 18:47:11 ditto udevd-work[609]: '/dev/block/8:17' with target
'/dev/sdb1' has the highest priority 0, create it
Jun 18 18:47:11 ditto udevd-work[609]: preserve already existing
symlink '/dev/block/8:17' to '../sdb1'
Jun 18 18:47:11 ditto udevd-work[609]:
'/dev/disk/by-id/ata-WDC_WD1002FBYS-02A6B0_WD-WMATV3740787-part1' with
target '/dev/sdb1' has the highest priority 0, create it
Jun 18 18:47:11 ditto udevd-work[609]: preserve already existing
symlink
'/dev/disk/by-id/ata-WDC_WD1002FBYS-02A6B0_WD-WMATV3740787-part1' to
'../../sdb1'
Jun 18 18:47:11 ditto udevd-work[609]:
'/dev/disk/by-id/scsi-SATA_WDC_WD1002FBYS-_WD-WMATV3740787-part1' with
target '/dev/sdb1' has the highest priority 0, create it
Jun 18 18:47:11 ditto udevd-work[609]: preserve already existing
symlink
'/dev/disk/by-id/scsi-SATA_WDC_WD1002FBYS-_WD-WMATV3740787-part1' to
'../../sdb1'
Jun 18 18:47:11 ditto udevd-work[609]:
'/dev/disk/by-path/pci-0000:00:1f.2-scsi-1:0:0:0-part1' with target
'/dev/sdb1' has the highest priority 0, create it
Jun 18 18:47:11 ditto udevd-work[609]: preserve already existing
symlink '/dev/disk/by-path/pci-0000:00:1f.2-scsi-1:0:0:0-part1' to
'../../sdb1'
Jun 18 18:47:11 ditto udevd-work[609]:
'/dev/disk/by-uuid/f7e386da-4959-477e-9760-fe03f7e3de81' with target
'/dev/sdb1' has the highest priority 0, create it
Jun 18 18:47:11 ditto udevd-work[609]: preserve already existing
symlink '/dev/disk/by-uuid/f7e386da-4959-477e-9760-fe03f7e3de81' to
'../../sdb1'
Jun 18 18:47:11 ditto udevd-work[609]: '/dev/disk/by-label/SQUID' with
target '/dev/sdb1' has the highest priority 0, create it
Jun 18 18:47:11 ditto udevd-work[609]: preserve already existing
symlink '/dev/disk/by-label/SQUID' to '../../sdb1'
Jun 18 18:47:11 ditto udevd-work[609]:
'/dev/disk/by-id/edd-int13_dev81-part1' with target '/dev/sdb1' has the
highest priority 0, create it
Jun 18 18:47:11 ditto udevd-work[609]: preserve already existing
symlink '/dev/disk/by-id/edd-int13_dev81-part1' to '../../sdb1'
Jun 18 18:47:11 ditto udevd-work[609]: passed 1190 bytes to monitor 0x1c0dfb0
Jun 18 18:47:11 ditto udevd-work[609]: adding watch on '/dev/sdb1'
Jun 18 18:47:11 ditto udevd-work[609]: created db file for
'/devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sdb/sdb1'
in
'/dev/.udev/db/\x2fdevices\x2fpci0000:00\x2f0000:00:1f.2\x2fhost1\x2ftarget1:0:0\x2f1:0:0:0\x2fblock\x2fsdb\x2fsdb1'




--


TIA
Stuart
--
There are three kinds of mathematician
Those that can count and those that cant.

From: Stuart Gall on
On 2010-06-18 19:27:22 +0300, Stuart Gall <stuart(a)otenet.gr> said:

> udevadm trigger --action=change --verbose --subsystem-match=block
> /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda
> /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1
> /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda2
> /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5
> /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6
> /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7
> /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8
> /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9
> /sys/devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sdb
> /sys/devices/pci0000:00/0000:00:1f.2/host4/target4:0:0/4:0:0:0/block/sr0
> [root(a)ditto ~]# fdisk /dev/sdb
>
> The number of cylinders for this disk is set to 121601.
> 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): w
> The partition table has been altered!
>
> Calling ioctl() to re-read partition table.
> Syncing disks.
> [root(a)ditto ~]# udevadm trigger --action=change --verbose
> --subsystem-match=block
> /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda
> /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1
> /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda2
> /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5
> /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6
> /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7
> /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8
> /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9
> /sys/devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sdb
> /sys/devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sdb/sdb1
> /sys/devices/pci0000:00/0000:00:1f.2/host4/target4:0:0/4:0:0:0/block/sr0
> /sys/devices/virtual/block/loop0

Very odd!

>


--
TIA
Stuart
--
There are three kinds of mathematician
Those that can count and those that cant.

From: David W. Hodgins on
On Fri, 18 Jun 2010 10:02:41 -0400, Stuart Gall <stuart(a)otenet.gr> wrote:

> Some sata disks connected to the system do not get their partition
> device created.
> So say SDB
> /dev/sdb exists
> /dev/sdb1 is missing

Has the drive ever been used as part of a raid cluster? It may
be necessary to overwrite the raid signature, which may be near
the start of the partition, or the end, depending on which raid
version was used.

http://www.linuxquestions.org/questions/linux-general-1/proc-partitions-showing-wrong-partitions-264602/

Regards, Dave Hodgins

-- Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)