PDA

View Full Version : cannot delete /home directory



whiphubley
31st December 2008, 09:59 PM
Hi there.

I wish to symlink my /home directory to somewhere else, but whenever I attempt to remove it I get...

[root@host ~]# rm -rf /home
rm: cannot remove directory `/home': Device or resource busy

I can confirm the directory is empty and "lsof /home" returns nothing.

How on earth can I do this ?

Thanks very much.

leigh123linux
31st December 2008, 10:02 PM
Change to runlevel 1 then make the change



su -
init 1

whiphubley
31st December 2008, 10:31 PM
Thanks for the tip.

Sadly I'm remotely connected via SSH and don't have a KVM over IP to view a console :-(

Turns out /home was a mount point for a partition (doh!) so I just needed to umount it first.

Happy New Year !

marcrblevins
1st January 2009, 06:53 AM
Thought "Device or resource busy" means you are on it somewhere in /home. You need to get off of the /home branch, like 'cd /root' then you can 'rm -rf /home'

axet
1st January 2009, 12:19 PM
umount /home

drunkahol
1st January 2009, 12:56 PM
Doing `lsof | grep home` should provide an indication of which processes are blocking the device being umounted.

/home may also be listed in the automounter configuration. I can't check just now unfortunately. But this may prevent it being deleted.

Cheers

Duncan