# shutdown fails because mdraid fails to stop device

## dirtbag

hey folks... Im not sure at what point,but my gentoo server will not shutdown cleanly.. basically I get something like 

 * Bringing down interface lo

 *   Removing addresses

 * Unmounting loop devices

 * Unmounting filesystems

 * Shutting down the Logical Volume Manager

 * Finished Shutting down the Logical Volume Manager

 * Shutting down RAID devices (mdadm) ...

mdadm: stopped /dev/md1

mdadm: failed to stop array /dev/md3: Device or resource busy

Perhaps a running process, mounted filesystem or active volume group?     [ !! ]

 * ERROR: mdraid failed to stop

 * Stopping udevd ...                                                     [ ok ]

 * Terminating remaining processes ...                                    [ ok ]

 * Killing remaining processes ...                                        [ ok ]

 * Saving dependency cache ...                                            [ ok ]

 * Remounting remaining filesystems read-only ...

 *   Remounting / read only ...                                           [ ok ]

INIT: no more processes left in this runlevel

It hangs here and I have to hit the reset button to reboot my server ..

any ideas on why?

beast log # cat /proc/mdstat 

Personalities : [raid0] [raid1] 

md1 : active raid1 sda1[0] sdb1[1]

      88256 blocks [2/2] [UU]

md3 : active raid1 sdb3[1] sda3[0]

      193310080 blocks [2/2] [UU]

unused devices: <none>

beast log # 

-db

----------

## vaxbrat

You didn't mention where md3 is mounted originally.  Is it your root or home possibly?  Are you maybe making this fs a network share and not mentioning that earlier on in the shutdown, that shared network still had people hanging off of it?

----------

## dirtbag

yeah the md3 is my / partition 

but I dont have NFS sharing running on it..

maybe samba shares? I guess i need a better log of whats going on during shutdown..

-db

----------

