/dev/mdctl & deleting md

  • Thread starter Thread starter Anonymous
  • Start date Start date
A

Anonymous

Guest
I created a swap space using the following commands
Code:
# dd if=/dev/zero of=/swap0 bs=1024k count=256
# chown root:wheel /swap0
# chmod 0600 /swap0
Then I added the following swapfile variable in the /etc/rc.conf file to enable swap file on boot time:
swapfile="/swap0"
Code:
# mdconfig -a -t vnode -f /swap0
# swapon /dev/md1
And then I rebooted, now I would like to remove the swap space using the command:
Code:
mdconfig -d -u 0
and I get the following message:
Code:
mdconfig: ioctl(/dev/mdctl): Device busy
I know that the swapspace is not being used so I was wondering first of all what the problem is and secondly I was curious about what the /dev/mdctl file is used for.
 
If you look at the output of swapinfo you will see it's in use. Use swapoff to remove the file from the swap. Then you can remove the md device.
 
Back
Top