Re: [zfs-discuss] Directory tree renaming -- disk usage

2010-08-09 Thread Tomas Ögren
On 09 August, 2010 - David Dyer-Bennet sent me these 1,2K bytes:

> If I have a directory with a bazillion files in it (or, let's say, a
> directory subtree full of raw camera images, about 15MB each, totalling
> say 50GB) on a ZFS filesystem, and take daily snapshots of it (without
> altering it), the snapshots use almost no extra space, I know.
> 
> If I now rename that directory, and take another snapshot, what happens? 
> Do I get two copies of the unchanged data now, or does everything still
> reference the same original data (file content)?  Seems like the new
> directory tree contains the "same old files", same inodes and so forth, so
> it shouldn't be duplicating the data as I understand it; is that correct?

The files hasn't changed, unless you rename the directory by creating a
new, copy stuff over and remove the old.

The only change is the name of the directory.

> This would, obviously, be fairly easy to test; and, if I removed the
> snapshots afterward, wouldn't take space permanently (have to make sure
> that the scheduler doesn't do one of my permanent snapshots during the
> test).  But I'm interested in the theoretical answer in any case.

/Tomas
-- 
Tomas Ögren, st...@acc.umu.se, http://www.acc.umu.se/~stric/
|- Student at Computing Science, University of Umeå
`- Sysadmin at {cs,acc}.umu.se
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] Directory tree renaming -- disk usage

2010-08-09 Thread Casper . Dik

>If I have a directory with a bazillion files in it (or, let's say, a
>directory subtree full of raw camera images, about 15MB each, totalling
>say 50GB) on a ZFS filesystem, and take daily snapshots of it (without
>altering it), the snapshots use almost no extra space, I know.
>
>If I now rename that directory, and take another snapshot, what happens? 
>Do I get two copies of the unchanged data now, or does everything still
>reference the same original data (file content)?  Seems like the new
>directory tree contains the "same old files", same inodes and so forth, so
>it shouldn't be duplicating the data as I understand it; is that correct?
>
>This would, obviously, be fairly easy to test; and, if I removed the
>snapshots afterward, wouldn't take space permanently (have to make sure
>that the scheduler doesn't do one of my permanent snapshots during the
>test).  But I'm interested in the theoretical answer in any case.


snapshots never take additional space until it starts to reference deleted 
data.  If the directory is renamed then the parent directory is changed 
and the directory's inode but the rest of the data is not modified
and has no effect on the amount of data stored.

Casper

___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


[zfs-discuss] Directory tree renaming -- disk usage

2010-08-09 Thread David Dyer-Bennet
If I have a directory with a bazillion files in it (or, let's say, a
directory subtree full of raw camera images, about 15MB each, totalling
say 50GB) on a ZFS filesystem, and take daily snapshots of it (without
altering it), the snapshots use almost no extra space, I know.

If I now rename that directory, and take another snapshot, what happens? 
Do I get two copies of the unchanged data now, or does everything still
reference the same original data (file content)?  Seems like the new
directory tree contains the "same old files", same inodes and so forth, so
it shouldn't be duplicating the data as I understand it; is that correct?

This would, obviously, be fairly easy to test; and, if I removed the
snapshots afterward, wouldn't take space permanently (have to make sure
that the scheduler doesn't do one of my permanent snapshots during the
test).  But I'm interested in the theoretical answer in any case.

-- 
David Dyer-Bennet, d...@dd-b.net; http://dd-b.net/
Snapshots: http://dd-b.net/dd-b/SnapshotAlbum/data/
Photos: http://dd-b.net/photography/gallery/
Dragaera: http://dragaera.info

___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss