> Lets say I reorganized my zpools. Now there are 2 > pools: > Pool1: > Production data, combination of binary and text > files. Only few files > change at a time. Average file sizes are around 1MB. > Does it make > sense to take zfs snapshots of the pool? Will the > snapshot consume as > much space as original zpool?
A snapshot takes up almost no space when originally created. Essentially just enough space to keep a reference pointer to the current state of data. The snapshot 'grows' as data in the pool is changed. After a snapshot is taken, it will grow in size by updates being made to existing blocks. The existing blocks are maintained and the snapshot keeps pointers to the existing blocks while new blocks are created that are pointed to as the current version. In short, the snapshot only keeps track of changes from the current state to the snapshot's state... It does not make a copy of everything. Depending upon the frequency and quantity of blocks updated, this could be very little space or a ton of space for the snapshots. For example: You have file A at 20 MB and file B at 20 MB files in a directory and you take a snapshot: - at this point, 40 MB is used You add file C (20 MB) and delete file B - now the current file system contains 40 MB (A + C) and the snapshot is using up 20 MB (B) You modify 1 MB of file A - Now the current file system contains 40 MB (A + C) and the snapshot is using 21 MB (Files B and 1MB from the previous state of A) Hope that helps :) > > Pool2: > Again, production data, mostly binary files. File > sizes are huge > ~10GB. These files change frequently. Does it make > sense to snapshot > it? Somehow I am reluctant to think about putting > these files under > something like CVS. As I mentioned before, I need > only 1 version of > the file at any time. > The answer is it depends How often do you want snapshots? (More frequently would indicate zfs over cvs) Do you want to keep all snapshots? (If you want to remove snapshots at some point, zfs is your best bet) Do you need version annotation of some type? (cvs would be better for this, you can diff with zfs though if the .zfs folder is enabled). How many files do you care about snapshotting? (A small percentage of files in a directory would make cvs a better option..all files in a directory would make zfs a better option) Are there a lot of other files in the directory that change that you don't want snapshots of? (Log/temp files can add a lot of space to snapshots in zfs. If this is the case and they can't be moved to a different filesystem, zfs may not be for you) Do you want a snapshot of all files at once or single files at a time? (all at once would be better for zfs, single files at a time would indicate cvs) >From what I have read, I think your best bet is to use ZFS rather than version >control software. Also note that you can do snapshots by file system (and thus >by directory) and don't have to snapshot the entire pool at once. Therefore, >you could have zpool 'tank' with two filesystems - tank/production/snapshot >and tank/production/no_snapshot - setup and segregate your files by whether >or not to take snapshots. Eric This message posted from opensolaris.org _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss