Robert Shaver
Cadet
- Joined
- May 2, 2017
- Messages
- 5
I don't see how that is possible. The encrypted data has to be stored somewhere and the old data is not being overwritten, therefor the amount of storage in use has doubled.Your system will not fill up until there is a snapshot taken of the encrypted data. At that point it will look like all the old data got deleted and the original snapshot will reference all the old data and take up space.
Correct me if I'm wrong but, copy-on-write means that, at the time of each block write, a copy happens. I'm guessing now but I assume that the directory entry for each file consists of pointers to each block containing the file data. A snapshot consists of a copy of these file pointers. When a block is written to a file, it is written to free space on the disk and the pointer in the live directory entry is updated to that new block. This action continues for each block of the file, with a new block in the disk free space being consumed for each block. When the encryption of a file is finished, the old file plus the new file total twice as many blocks as before.
Again, correct me if I'm wrong. This is just how I've imagined how snapshots worked in storage systems. I don't really have any experience with it.
What I'm really wondering now is how freeNAS handles the error condition of disk free space exhaustion and does it have tools to come back from that? Can I just roll back to the previous snapshot?
Thanks all for hanging in there with me. I hope I'm not asking too much.
EDIT:
I thought I'd better read the docs some more. Here's what I found.
- ZFS is a transactional, Copy-On-Write (COW) filesystem. For each write request, a copy is made of the associated disk block(s) and all changes are made to the copy rather than to the original block(s). Once the write is complete, all block pointers are changed to point to the new copy. This means that ZFS always writes to free space and most writes will be sequential.
Last edited: