-
Background informationI've recently been doing some send-and-receive operations on my local system in an attempt to defrag some very-fragmented datasets. And those datasets happen to have hourly auto-snapshots enabled. The problem I've been encountering is: if the receive operation takes more than an hour (and for most of these datasets, it definitely does), then I'm guaranteed that (Let's say that the sender dataset had snapshots The commands I'm using are:
I do want to keep the auto-snapshot properties enabled on the datasets that I'm send/recv'ing. But I don't want But when I got down to the details of "how do I determine whether a particular dataset is currently the target of a receive operation", things got nebulous. The best I could come up with was to query the Another thing I found, but was much less confident in, was the presence of My questionSo ultimately I just got to wondering why there isn't a simple, reliable way to find out whether a particular dataset is currently the target of a receive operation. And I grant that perhaps there is a way and I've just overlooked it; but I've done a lot of digging, and I'm pretty sure that there just isn't one. And that seems kind of odd to me. I did find Am I asking the wrong question?I openly admit that, in the pursuit of fixing things, I sometimes go too far down one particular path and end up asking "the wrong question", instead of backing up and stopping at a more reasonable point earlier along the chain of logic. So, I'm potentially open to other solutions here that maybe don't need to resort to finding a reliable way to tell whether a dataset is currently being recv'd to. (I do still think that it would be useful to be able to easily access that information though.) Sort of along these lines, one thought that crossed my mind was, why is it even allowed to make a new snapshot on a dataset, when that dataset is currently being recv'd to? Seems kind of wrong. But perhaps it's justifiable in certain circumstances, where I guess maybe you'd want a receive-side snapshot to cause the recv operation to abort in deference to it, for whatever reason? It's hard to think of circumstances where that would make sense... but perhaps it would be less nonsensical when dealing with something like an incremental single-snapshot receive, rather than a replication receive. I don't know. Side note: strange error messageThe error that I get in the situation described above, when
The sender and receiver datasets are literally on the same system; and the problem is definitely happening due to a new snapshot being inserted in the middle of the receive process. But for some reason, I guess the kernel module is sending back System information
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I agree. Does not make sense, in case I want to abort the recv there is To test a dataset for being in recv... maybe something like |
Beta Was this translation helpful? Give feedback.
-
If the zfs recv operation is ongoing, the dataset will be locked, and a snapshot will not be able to be created:
|
Beta Was this translation helpful? Give feedback.
If the zfs recv operation is ongoing, the dataset will be locked, and a snapshot will not be able to be created: