Re: Partitioned arrays initially missing from /proc/partitions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday April 24, david@xxxxxxxxxxxx wrote:
> Neil Brown wrote:
> > This problem is very hard to solve inside the kernel.
> > The partitions will not be visible until the array is opened *after*
> > it has been created.  Making the partitions visible before that would
> > be possible, but would be very easy.
> > 
> > I think the best solution is Mike's solution which is to simply
> > open/close the array after it has been assembled.  I will make sure
> > this is in the next release of mdadm.
> > 
> > Note that you can still access the partitions even though they do not
> > appear in /proc/partitions. Any attempt to access and of them will
> > make them all appear in /proc/partitions.  But I understand there is
> > sometimes value in seeing them before accessing them.
> > 
> > NeilBrown
> 
> Um. Are you sure?

"Works for me".

What happens if you
  blockdev --rereadpt /dev/md_d0
?? It probably works then.
It sounds like someone is deliberately removing all the partition
info.

Can you try this patch and see if it reports anyone calling
'2' on md_d0 ??

diff .prev/block/ioctl.c ./block/ioctl.c
--- .prev/block/ioctl.c	2007-04-17 11:42:15.000000000 +1000
+++ ./block/ioctl.c	2007-04-24 20:55:41.000000000 +1000
@@ -17,6 +17,7 @@ static int blkpg_ioctl(struct block_devi
 	long long start, length;
 	int part;
 	int i;
+	char b[BDEVNAME_SIZE];
 
 	if (!capable(CAP_SYS_ADMIN))
 		return -EACCES;
@@ -30,6 +31,8 @@ static int blkpg_ioctl(struct block_devi
 	part = p.pno;
 	if (part <= 0 || part >= disk->minors)
 		return -EINVAL;
+	printk("blkpg_ioctl: %s called %d on %s\n",
+	       current->comm, a.op, bdevname(bdev, b));
 	switch (a.op) {
 		case BLKPG_ADD_PARTITION:
 			start = p.start >> 9;


-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux