Network and Storage Protocols
Network and Storage Protocols
I have searched the archives and I can't find a solution to my problem.
The issue is that I often want to remove just one file, or maybe a few files, from a snapshot in order to save space.
Very often a user will create several extremely large (many 10s of gigabytes) intermediate files in a filesystem that's
maybe 200GB and accidentally leave them overnight. When he deletes the file it moves into the snapshot, which we don't
really want. It's a useless file now. We have played a lot of games like creating some volumes that have snapshots turned on
and some volumes that don't in order to work around this limitation, but I'd really like to use some equivalent of clri to just
blow away a file and all references to that file when a user makes a mistake and leaves a large temporary file lying around.
Add those blocks back to the free list immediately. I don't want to delete the entire snapshot, because there are many
thousands of (small) files I want to keep there. I just want to remove specially selected files as the superuser. This limitation is
really killing us and is possibly my biggest complaint with ONTAP. I know snapshots are read-only blah blah blah. This
could be done if Netapp wanted to do it and it could be done easily.
I know this was not possible many versions of ONTAP ago, but is this possible now? I would like this added as a feature if not.
Any suggestions on how to solve this problem would be appreciated.
you cannot remove the single file from the snapshot. even i faced this issue last week so we decided to take the snapshot to tape & delete the snapshots.
Don't you think that's a little bit ridiculous? We should lean on Netapp to give us a little bit more power over the filesystem. Make it a privileged command if you want just to be really, really safe. I should not have to kill 800,000 files I'd like to retain snapshots of just because there is 1 (large) file in the snapshot I don't need which I'd like to remove. I am not fully aware if there are technical reasons why this isn't implemented, but it seems like it would be a simple matter of adding the blocks to the free list and updating the master blocks which contain snapshot info. I would *really* like to see this.
I agree with you dmitri. last time when i tried to take the snapshot to tape it tokk me 15 hrs for dumping the snapshot to tape which is very tough for us to do this for all snapshots & re-claim the space back.
NetApp should find a solution for this .
Is it possible to restructure your data into separate volumes so that the data you don't want to be included in a snapshot is stored on a volume without a snapshot schedule or data protection policy?
If you add the ability to delete files out of a snapshot how do you guarantee the consistency of the snapshot contents?
>Is it possible to restructure your data into separate volumes so that the data you don't want to be included in a snapshot is stored on a volume without a snapshot schedule or data >protection policy?
I mentioned in my original post that we play these games now. I find the status quo unacceptable. There's still the chance that someone accidentally creates a large file where they shouldn't have and the admin has no way to deal with that problem.
>If you add the ability to delete files out of a snapshot how do you guarantee the consistency of the snapshot contents?
How do you guarantee the consistency of any filesystem? There's a whole branch of OS theory to deal with these issues.
last time when i tried to take the snapshot to tape it tokk me 15 hrs for dumping the snapshot to tape
Check your volume fragmentation & possibly defrag by using reallocate command:
I'm having the same problems you face on my Netapp Filers. Have you any progress since end 2009 ?
I was wondering if you ever tried to remove the file from the filer using its command "rm" (rather than from NFS or CIFS mounts). I recently saw this command in "priv set advanced" mode and wonder if it could REALLY remove the file and not go into the snap.
Anyway i'll test it asap and tell you my results.
The rm command in advanced mode of ONTAP will not remove files in snapshots.
No the rm command won't delete the file in a snap, says its RO !
What I suggested is to remove the file from the qtree/volume with this command and not from a NFS/CIFS mount! Maybe the file won't get in the snap... Did anyone tried that ?
It is rather pointless exercise.
By definition a snapshot is a read-only, point-in-time copy of a live file system, so deleting anything from a snapshot would a) require hacking into ONTAP/WAFL, b) break one of the fundamentals of data protection provided by snapshots.
There are ways to achieve similar goal without heavy cannons though:
- FlexClone the snapshot in question
- delete the file from the clone
- split the clone
- snapshot resulting volume (it now does not include the deleted file)
- delete the snapshot from the source volume
(yes, there will be ~100% capacity overhead after the operation)
to cut a long story short: No, as of either ONTAP 7.3.4 or ONTAP 8.0, it is NOT possible.
Please get in touch with your local NetApp representative to issue a request why not or if possibly when such a feature will be available. NetApp wont give you a detailed, official answer in this community.
"Very often a user will create several extremely large (many 10s of gigabytes) intermediate files in a filesystem that's
maybe 200GB and accidentally leave them overnight."
Is this done via CIFS? Have you thought about designing around this by maybe using DFS? If possible at all?
Im just throwing it out there not knowing anything about your requirements or your environment.
You could also easily create a script that will delete what needs to be deleted every day before the snapshot is taken maybe?