[Wilfried.Weissmann@gmx.at: Bug#277534: hal: harddisk partition scan does not check harddisk size]

David Zeuthen david at fubar.dk
Fri Oct 22 13:14:55 PDT 2004


On Fri, 2004-10-22 at 21:52 +0200, Kay Sievers wrote:
> On Fri, 2004-10-22 at 15:16 -0400, David Zeuthen wrote:
> > > Do I get this right? The kernel creates devices for your disk, which are
> > > not usable? Also the sysfs repreentation is invalid then? Then the
> > > kernel should be fixed, right?
> > > 
> > 
> > No, I don't think the kernel is at fault here. Look at software raid, I
> > can create /dev/md0 built from /dev/sda1 and /dev/sdb1
> 
> But sda1 + sdb1 are completely readable 

Sure

> and also unmountable! 

Well, 'mount /dev/sda1' works find but volume_id tags it as not
mountable cause it's clever enough to find the RAID signature.

> We have
> devices here with wrong in-kernel representation, that's why we issue an
> (from userspace legal) seek() and the kernel tries to access nonexistant
> blocks and fails with that.
> 

Well, my understanding from Wilfried is that /dev/hdg* is the block
devices we shouldn't touch. Am I wrong in that?

So, assuming we shouldn't touch /dev/hdg* we do find a file system

20:04:37.291 [I] linux/osspec.c:756: handling /sys/block/hdg/hdg1 block
20:04:37.496 [I] linux/block_class_device.c:592: volume.num_blocks = 67103442

 ...

20:04:37.596 [I] linux/block_class_device.c:110: volume.fsusage = 'filesystem'
20:04:37.596 [I] linux/block_class_device.c:113: volume.fstype = 'ntfs'
20:04:37.596 [I] linux/block_class_device.c:116: volume.fsversion = '3.0'
20:04:37.596 [I] linux/block_class_device.c:119: volume.uuid = 'D68C33108C32EB1F'

so in the worst case this is added to /etc/fstab and e.g. g-v-m mounts
this when you log into GNOME and there you have data corruption
(assuming the kernel isn't clever enough to deny the mounting).

> I still think that it is wrong that kernel creates _unreadable_
> subdevices! Raid set members should not be parsed at all, it's the same
> logic applied, as the kernel refuses to mount devices that are raid
> members.
> 

But I'm saying they are indeed readable (some of them).

Cheers,
David


_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list