RE: md as module cannot be reloaded.

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

 



> -----Original Message-----
> From: linux-raid-owner@xxxxxxxxxxxxxxx [mailto:linux-raid-
> owner@xxxxxxxxxxxxxxx] On Behalf Of Neil Brown
> Sent: Wednesday, December 01, 2010 10:57 PM
> To: Hawrylewicz Czarnowski, Przemyslaw
> Cc: linux-raid@xxxxxxxxxxxxxxx; Labun, Marcin; Czarnowska, Anna; Neubauer,
> Wojciech; Williams, Dan J; Ciechanowski, Ed
> Subject: Re: md as module cannot be reloaded.
> 
> On Wed, 1 Dec 2010 14:23:14 +0000 "Hawrylewicz Czarnowski, Przemyslaw"
> <przemyslaw.hawrylewicz.czarnowski@xxxxxxxxx> wrote:
> 
> > Hi,
> >
> > I have found an annoying problem with md module. If it is compiled as
> loadable module it is impossible to reload module if unloaded once.
> >
> > Eg.
> > # mdadm -Ss
> > # modprobe -r raid1 && modprobe -r md-mod
> > # cat /proc/modules | grep md_mod || echo Unloaded
> > Unloaded
> > # cat /proc/mdstat
> > cat /proc/mdstat: Invalid arguments
> 
> I cannot reproduce this.  That this point I get
> 
> cat: /proc/mdstat: No such file or directory
> 
> 
> > # modprobe md-mod
> > # cat /proc/mdstat
> > cat /proc/mdstat: Invalid argument
> > # cat /proc/modules | grep md_mod || echo Unloaded
> > md_mod 94178 0 - Live 0xf857a000
> >
> > Some functionalities seem to work, but nothing is able to read
> /proc/mdstat.
> >
> > If have tried few kernels from 2.6.27 to 2.6.37-rc3, openSUSE 11.x/RHEL6,
> doesn't matter, still the same result. What can be wrong?
> 
> openSUSE doesn't compile md as a module, it is compiled in to the kernel.
> But presumably you are compiling your own kernel with md as a module?  Is
> that right?  You aren't compiling a module and loading it into a kernel
> which
> already has md in it are you?  I don't think that would work anyway...
Yes, I have recompiled kernel with MD as module.

> 
> And you give a full sequence of commands from loading to unload that
> reliably
> produces this error for you?
Ok, here you are:
* Original opensuse config updated to new kernel with defaults
* Changed CONFIG_BLK_DEV_MD=y->m
* Added prefix -mdadm

make
su
make modules_install
make install
mdadm -Ss
mdadm --zero-superblock /dev/sd[b-g]
reboot
...
localhost:~ # uname -r
2.6.37-rc3-pae-mdadm
localhost:~ # cat /proc/mdstat
cat: /proc/mdstat: No such file or directory
localhost:~ # cat /proc/modules | grep md_mod
localhost:~ # modprobe md_mod
localhost:~ # ll /proc/mdstat
-r--r--r-- 1 root root 0 Dec  2 00:14 /proc/mdstat
localhost:~ # cat /proc/mdstat
Personalities : 
unused devices: <none>
localhost:~ # modprobe -r md_mod
localhost:~ # ll /proc/mdstat
-r--r--r-- 1 root root 0 Dec  2 00:14 /proc/mdstat
localhost:~ # cat /proc/mdstat
cat: /proc/mdstat: Invalid argument
localhost:~ # modprobe -r md_mod
localhost:~ # ll /proc/mdstat
-r--r--r-- 1 root root 0 Dec  2 00:14 /proc/mdstat
localhost:~ # cat /proc/mdstat
cat: /proc/mdstat: Invalid argument

that's all.

> 
> NeilBrown
> 
> --
> 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
--
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