1

I know that zfs promote swaps a clone with the master, but other than that the documentation does not mention anything.

What consequences have promoting a dataset?
Can I just promote them back and forth any time I need to delete one, or will it be a problem at some point?
Will promoting move/create extra files on the disk?
Will it cause the dataset to use more space?

Lets take this system for example (for simplicity I assumed making a snapshot and then cloning it as one step called clone):

  • /data/project-1/master
    • /data/project-1/master/file-1 - 1GB file
  • /data/project-1/feature-1
    • clone of /data/project-1/master
    • /data/project-1/feature-1/file-2 - 1GB file
  • /data/project-1/feature-2
    • clone of /data/project-1/master
    • /data/project-1/feature-2/file-3 - 1GB file
  • /data/project-1/feature-3
    • clone of /data/project-1/feature-2
    • /data/project-1/feature-2/file-4 - 1GB file

Now lets assume I want to delete master, I will promote random feature, so what will happen?

  1. If I promote feature-2, will both feature-1 and feature-2 now require its own independent copy of file-1 duplicating required space?
  2. Will I be able to delete master after promoting feature-2, or will it be in the tree between feature-2 and feature-1 blocking the ability to delete?
  3. Do I need to promote feature-3 to be able to delete feature-2
  4. Will I be even able to delete feature-2 without deleting either master or feature-3
  5. Will the operation be atomic or will it take time depending on size of the files in the filesystem.
  6. Is promote just modifying metadata or will it be moving physical data on the drive?
  7. Is there any risk of data loss?
3
  • 1
    Isn't the title ambiguous? My first interpretation: "zfs promotes work, how does it do it?". I'm not a native English speaker though. Now I think the title is meant to be interpreted as "zfs promote, how does it work?". Apr 28, 2022 at 7:07
  • Please review meta.stackexchange.com/questions/39223/…
    – mtak
    Apr 28, 2022 at 7:08
  • The subquestions are just hinnts about what I am expecting to learn, not questions in itself. I am looking for explanation about what promote does.
    – HubertNNN
    Apr 28, 2022 at 9:27

0

You must log in to answer this question.

Browse other questions tagged .