Am 16.02.16 um 18:58 schrieb Johan Kragsterman:
Hi!



-----"OmniOS-discuss" <omnios-discuss-boun...@lists.omniti.com> skrev: -----
Till: <omnios-discuss@lists.omniti.com>
Från: Stephan Budach
Sänt av: "OmniOS-discuss"
Datum: 2016-02-16 17:44
Ärende: Re: [OmniOS-discuss] Ang: zvol snapshot rollback issue, dataset busy

Am 16.02.16 um 17:11 schrieb Johan Kragsterman:
Hi!


-----"OmniOS-discuss" <omnios-discuss-boun...@lists.omniti.com> skrev: -----
Till: omnios-discuss <omnios-discuss@lists.omniti.com>
Från: Hafiz Rafiyev
Sänt av: "OmniOS-discuss"
Datum: 2016-02-16 16:47
Ärende: [OmniOS-discuss] zvol snapshot rollback issue,dataset busy

I now its OmniOs forum,question about Nexenta v4.0.4FP02.
Maybe issue is common to illumos,

Getting below error when trying to rollback zvol snapshot,zvol unshared before 
rollback operation,system rebooted but result was same.
any sugesttions?

zfs rollback -r OPOOL/DATA@snap-hourly-1-2016-02-16-130002

cannot rollback 'OPOOL/DATA': dataset is busy
Nexenta log:

Feb 16 15:35:47 xxx nms[966]: [ID 702911 local0.error] (:1.12) EXCEPTION: 
SystemCallError: 
SnapshotContainer::rollback(OPOOL/DATA@snap-hourly-1-2016-02-16-130002,-r):

[zfs rollback -r OPOOL/DATA@snap-hourly-1-2016-02-16-130002] cannot rollback 
'OPOOL/DATA': dataset is busy




My guess is that the volume you want to roll it back to is registred as an LU with 
stmf...is it? If so, you need to delete it first. But be aware, before you delete the LU 
you need to delete any view for that LU. Otherwise you get views "hanging in the 
air" which is difficult to get rid of.


Johan

I'd say, it's the other way round&#8230; if you delete a LUN via stmfadm
delete-lu, that will also delete it's views, which can be annoying, if
you then want to re-import the LUN from the rolled back snapshot, no?

If you want to keep the view, which is what I usually want to do, just
run stmfadm delete-lu -k <LU> to keep the view. That way, you can then
re-import the LUN on the rolled back dataset and won't have to re-create
the view for it.

Cheers,
Stephan



Is that so? I have been annoyed by this for a long time, that I needed to delete the view 
as well. But actually this was not the case some years ago when I discovered how I needed 
to do this. At this time I had views "hanging in the air" without connection to 
a LU, and difficulties to remove them.
Happy to see that this is working the way it should...

But I am not familiar with this -k option, where is that one documented? Can't 
find it on Illumos man page for stmf, nor can I find it on Oracle.


/Johan

I concurr, as much as I had found it also very cumbersome having to delete all views manually in the old days… I think to remember, that this was on OpenSolaris in 2011, when I started playing with COMSTAR and I was creating/removing LUNs and targets quite frequently. However, on a production system, where everything has settled, I prefer it the other way round and I like to keep the vews in case I have to remove a LUN for the sake of a snapshot rollback.

Actually, the -k option is not mentioned anywhere but it is supported up to any version I checked. I came across this option when I searched the net for any means of deleting a LUN, but keeping the view and on some random website, there it was...

Cheers,
Stephan
_______________________________________________
OmniOS-discuss mailing list
OmniOS-discuss@lists.omniti.com
http://lists.omniti.com/mailman/listinfo/omnios-discuss

Reply via email to