I am running FreeBSD 8.2/amd64 and I applied the ZFS v28 patch for 8.2-R and zpool/zfs upgraded my pools.
I was previously using gallery 2 for hosting my family photos, and recently updated to gallery 3. Due to limitations in the way the g2 import/migration process works, it had to create basically copies of every one of the source jpegs.
Since I want to keep the same gallery 2 album structure (for the time being) in case I find a problem or feature missing from gallery 3, I tried to do the following:
1. moved /data/pictures to /data/pictures.old
2. create a new dataset on my data zpool for the pictures (data/pictures) and enabled dedup and compression:
[CMD="zfs create -o dedup=on -o compression=on data/pictures"]zfs create -o dedup=on -o compression=on data/pictures[/CMD]
3. copied /data/pictures.old/gallery3 to /data/pictures/gallery
4. copied /data/pictures.old/gallery to /data/pictures/gallery.old
I was expecting the second copy (step #4 above) to run much faster and/or consume only the disk space constituting the files from the old gallery that were not in the new gallery. What I observed in reality was that it took just as long to copy (e.g. as if I was just copying to the zpool without dedup enabled) and df reports ~169 GB used, instead of roughly half of that.
Did I not correctly enable dedup? Do I need to enable dedup for the parent zpool also? It shows as enabled:
Did I misunderstand dedup and incorrectly expect it to not have two copies of the same data. Does the ctime/mtime of the extra data come into play? After the g2 import, I did write a script to go back and change the mtime/ctime of the files in the new gallery directory to match those of the old gallery files.
Thanks in advance!
I was previously using gallery 2 for hosting my family photos, and recently updated to gallery 3. Due to limitations in the way the g2 import/migration process works, it had to create basically copies of every one of the source jpegs.
Since I want to keep the same gallery 2 album structure (for the time being) in case I find a problem or feature missing from gallery 3, I tried to do the following:
1. moved /data/pictures to /data/pictures.old
2. create a new dataset on my data zpool for the pictures (data/pictures) and enabled dedup and compression:
[CMD="zfs create -o dedup=on -o compression=on data/pictures"]zfs create -o dedup=on -o compression=on data/pictures[/CMD]
3. copied /data/pictures.old/gallery3 to /data/pictures/gallery
4. copied /data/pictures.old/gallery to /data/pictures/gallery.old
I was expecting the second copy (step #4 above) to run much faster and/or consume only the disk space constituting the files from the old gallery that were not in the new gallery. What I observed in reality was that it took just as long to copy (e.g. as if I was just copying to the zpool without dedup enabled) and df reports ~169 GB used, instead of roughly half of that.
Did I not correctly enable dedup? Do I need to enable dedup for the parent zpool also? It shows as enabled:
Code:
root@pflog:/data# zfs get all data/pictures
NAME PROPERTY VALUE SOURCE
data/pictures type filesystem -
data/pictures creation Thu Jun 2 9:10 2011 -
data/pictures used 165G -
data/pictures available 1.32T -
data/pictures referenced 165G -
data/pictures compressratio 1.02x -
data/pictures mounted yes -
data/pictures quota none default
data/pictures reservation none default
data/pictures recordsize 128K default
data/pictures mountpoint /data/pictures default
data/pictures sharenfs on inherited from data
data/pictures checksum on default
data/pictures compression on local
data/pictures atime on default
data/pictures devices on default
data/pictures exec on default
data/pictures setuid on default
data/pictures readonly off default
data/pictures jailed off default
data/pictures snapdir hidden default
data/pictures aclinherit restricted default
data/pictures canmount on default
data/pictures xattr off temporary
data/pictures copies 1 default
data/pictures version 5 -
data/pictures utf8only off -
data/pictures normalization none -
data/pictures casesensitivity sensitive -
data/pictures vscan off default
data/pictures nbmand off default
data/pictures sharesmb off default
data/pictures refquota none default
data/pictures refreservation none default
data/pictures primarycache all default
data/pictures secondarycache all default
data/pictures usedbysnapshots 0 -
data/pictures usedbydataset 165G -
data/pictures usedbychildren 0 -
data/pictures usedbyrefreservation 0 -
data/pictures logbias latency default
data/pictures dedup on local
data/pictures mlslabel -
data/pictures sync standard default
Did I misunderstand dedup and incorrectly expect it to not have two copies of the same data. Does the ctime/mtime of the extra data come into play? After the g2 import, I did write a script to go back and change the mtime/ctime of the files in the new gallery directory to match those of the old gallery files.
Thanks in advance!