Bug 8588
Summary: | The automatic partition scan upon block device registration cause I/O trouble problems for other cluster nodes | ||
---|---|---|---|
Product: | IO/Storage | Reporter: | Tore Anderson (tore) |
Component: | Block Layer | Assignee: | Jens Axboe (axboe) |
Status: | CLOSED CODE_FIX | ||
Severity: | low | CC: | alan, devzero |
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | 2.6.20 | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Tore Anderson
2007-06-05 12:00:32 UTC
does this problem still apply with more recent kernels or dm-multipath versions? maybe we can close this one...!? forget about the last post. so, would that mean - in fs/block_dev.c, the call to rescan_partitions() should be optional (i.e. skipped if there is some special param in place) ? - need to call BLKRRPART ioctl from userspace for partition scan instead? (as that calls rescan_partitions() too) i`m not a real kernel coder, i`m just trying to understand linux/kernel better.... Hello, about your point #1 - that is exactly the case, yes. Actually Hannes Reinecke posted a patch that did this a while back at http://linux.derkeiler.com/Mailing-Lists/Kernel/2008-08/msg11622.html - don't know why it never got merged. About point #2 - yes, userspace would have to make sure to call that ioctl (if needed for the device in question of course) to make the partition devices appear. An alternative to using the built-in kernel partition handling would be to use the kpartx tool to set up DM maps that corresponded to the partitions (in this case you only need to change the userspace tool in order to support new partition table types and so on). Tore good pointer, but if no_partition_scan disables partition scan globally,how should such system boot sucessfully, as it won`t recognize partitions on local raid device anymore ? boot environment would need to be adjusted for that. wouldn`t that make things difficult? were adressing a very specific problem with disabling partition_scan due to problems in multipathing enviroment, so i`d consider disabling scan for dedicated blockdevices a better approach. comments ? Yes, userspace would need to take care of triggering the partition scan for the devices where it is necessary. In most distributions this would have to be done from the initramfs - which by the way is already responsible for loading the block device drivers, so it's likely not a very big change. I'm not very sure what you mean by "dedicated blockdevices", though? Tore >I'm not very sure what you mean by "dedicated blockdevices", though?
pardon, i`m no native english speaker. maybe "certain blockdevices" is the better word ?
i mean, being able to either specify "do not scan for partitions on /dev/sdc, /dev/sdd..." or specify "do not scan for partitions on all devices except /dev/sda, /dev/...."
I see. The problem with that is that the device names aren't always deterministic - especially in SAN environments. They've become less so of late too, most distributions use file system labels or UUIDs for mounting, and dm-multipath does something similar. So even if you add a kernel param like "enablepartscanonlyon=sda,sdb" then you might risk that after a kernel upgrade, sda and sdb no longer represents the same devices as they used to. IMHO the best approach would be to leave partition scanning to userspace in general, which fits with the current trend of leaving other similar tasks to userspace (udev, initramfs, etc). But that is a more lengthy undertaking - better to get Hannes Reinecke's patch in, and then get support for userspace-initiated partition scanning in the various distributions' mkinitramfs scripts so it can be enabled when it's necessary. After that support is ubiquitous it might be possible to make it default enabled... Tore As far as I can see you can now build a distribution that does this and compile with no partition support in kernel but use the device mapper layer. |