> Is it possible to unload zfs module without rebooting > the computer. > > I am making some changes in zfs kernel code. then > compiling it. i then want to reload the newly rebuilt > module without rebooting. > > I tried modunload. But its always givin "can't unload > the module: Device busy" . > > What can be the possible solution
Some modules are not unloadable - they always refuse to unload, no matter what. But after a _very_ quick look at the code, I _think_ zfs can be unloaded (although I've never tried, and in my case I couldn't, because I'm running with zfs root). The catch is that nothing must be using it, at all. Not only does this mean that all zfs filesystems must be unmounted (and zvols not in use), it means no other sort of use either. If I run an "fuser" command on /dev/zfs, I see the PIDs for syseventd and fmd; apparently both interact with zfs somehow, for monitoring most likely. So you would also have to disable the sysevent and fmd services. Maybe even that wouldn't be enough; like I said, I can't try it anyway. But that should be a start, if you really want to. Although I think in the long run, rebooting would be better for testing anyway, and it's a lot quicker with SMF that it used to be with rc files. -- This message posted from opensolaris.org