Actually this issue - of wanting to bring files from a snapshot back into the current filesystem, without raising the occupancy of the disks any more - is something that has crossed my mind before.
There are times, for example, when it'd be nice to just bring back a large directory-tree into current use from a snapshot, perhaps/probably toasting anything in the current filesystem image that would name-clash but not having to freshly copy the data into new free blocks on the filer - perhaps because you are close to filling the filer already.
Now if it's the total contents of the filer in question then you could take the filer down and use the requisite admin commands (perhaps with the help of the NetApp support folk) to use an older snapshot as your current filesystem image. 'Rolling back to a named consistency point' would be something akin to the NetApp way of putting it.
However, I've often thought it'd be darned useful to say: 'take everything from this directory down from that snapshot and graft it coherently into place in the current filesystem here, but leave everything else as it is currently'.
This is probably a great deal to ask and couldn't be done with normal filesystem operations, CIFS/NFS notwithstanding. However, as an option available to an admin I think it would be stunningly useful to some folk.
This would take some cunning WAFL wizardry to accomplish I think, but it's not beyond the bounds of credibility.
As I'm sure you've already discovered, you can't create a hard link to a file in a snapshot. The reason is that snapshots are read-only, but it is necessary to increment the number of links in the linked-to inode. You can use a symbolic link, of course, but it would point to whatever was at that location. To prevent the snapshot from being recycled, you could do a "snap rename" of hourly.0 or whatever to something else.
Mark
-----Original Message----- From: Jim Harm harm1@llnl.gov To: toasters@mathworks.com toasters@mathworks.com Date: Thursday, November 05, 1998 8:56 AM Subject: hard link .snapshot files
We have the need to occasionally recover a LARGE file and we would like to recover it quickly without making the massive increase in space usage that would result if we merely copied the file from .snapshot to the old
directory.
Can we build a hard link from the old directory to the .snapshot/hourly.#/Large.file and how will that be protected with the next snapshot?
I don't want to screw anything up. Our users ARE rocket scientists.
}}}===============>> LLNL James E. Harm (Jim); jharm@llnl.gov (925) 422-4018 Page: 423-7705x57152