SOLVED How to force delete a snapshot

Status
Not open for further replies.

kjstech

Dabbler
Joined
Feb 27, 2014
Messages
15
The web UI thinks a snapshot is "busy" so when I try to delete one I get this error : cannot destroy snapshot backups@auto-20140315.1448-2d: dataset is busy

So is there a command line I can enter to force this thing gone? It's taking up too much space.
 

bigphil

Patron
Joined
Jan 30, 2014
Messages
486

leenux_tux

Patron
Joined
Sep 3, 2011
Messages
238
Be VERY careful when issuing such destructive commands on your system from the command line. Only use "zfs destroy" as a last resort. Take a look here.... "http://docs.oracle.com/cd/E19253-01/819-5461/gbcya/index.html".

The name of your snapshot contains the text "auto". This to me means you have setup an automated jobs to take snapshots of a specific file system ? If this is the case, you can not remove a parent snapshot whilst there is a child snapshot in place.

Look here for more information "http://docs.oracle.com/cd/E23824_01/html/821-1448/gbciq.html"

Apologies for using "Oracle" documentation as a reference but this is something that I find is a useful reference.
 

kjstech

Dabbler
Joined
Feb 27, 2014
Messages
15
I removed the holds it was tagged .snap-5311 or something like that.
I rebooted.
I tried zfs destroy -r
zfs destroy -R
zfs destroy -f

It always says dataset is busy.
I even disabled ssh since replication uses that and rebooted with ssh off.
It doesn't say it has children or dependencies. I can't make this go away. I wish there was the -nuclearredbutton option to jump past the code that causes 'dataset is busy' and just executes it.
 

kjstech

Dabbler
Joined
Feb 27, 2014
Messages
15
Ok finally got it removed.

ps -A |grep zfs

5277 zfsL sending backups@auto-20140315.1448-2d (2%: 103172568
kill -9 5277
zfs destroy -f backups@auto-20140315.1448-2d

done.

There was a stuck replication I guess.
 
Status
Not open for further replies.
Top