Hi,
I’ve a question regarding ZFS duplication of “physical” FS object.
Let’s say I have this layout
- data_zpool
- mydata_dataset
- file_1 (2GB)
- folder_1 (5GB)
- mydata_dataset
Total Space consumed is 7GB. Now let’s say I make a snapshot of mydata_dataset.
Then I create a new dataset in data_zpool, called mydata2_dataset.
- data_zpool
- mydata_dataset
- file_1 (2GB)
- folder_1 (5GB)
- mydata2_dataset
- mydata_dataset
If I move the folder folder_1 in mydata2_dataset, what happen?
Hypothesis 1: “hard copy” of the file is done, thus we have the following, total space consumed is now 2+5+5 = 12GB
- data_zpool
- mydata_dataset
- file_1 (2GB)
- (folder_1_snapshot (5GB))
- mydata2_dataset
- folder_1 (5GB)
- mydata_dataset
Hypothesis 2: “linked copy”, so total space consumed would still be 7GB:
- data_zpool
- mydata_dataset
- file_1 (2GB)
- (folder_1_snapshot (0 GB))
- mydata2_dataset
- folder_1 (5GB)
- mydata_dataset
Which one is good?
To put it in a nutshell, I want folder_1 to be a dataset instead of a folder, but I have no enough space for a 2nd copy of the folder_1.
Thank!