Could someone point me to a piece of documentation which explains why the directory files double in size between say Auspex and the NetApp?
One of my users is complaining that now that we moved his directory all of the directory files doubled in size overnight.
Tom
I don't have a handy pointer, and it's too early for me to think clearly enough to find one. Did they go from 2KB to 4KB? This would be explained by block size in the respective filesystems. In most filesystems directories use whole blocks, so directory sizes are multiples of block sizes. Filers use 4KB blocks, so directory sizes on filers are multiples of 4KB.
John
On Wed, 3 Nov 1999 tkaczma@gryf.net wrote:
Could someone point me to a piece of documentation which explains why the directory files double in size between say Auspex and the NetApp?
One of my users is complaining that now that we moved his directory all of the directory files doubled in size overnight.
Tom
Hi,
Just a little curious, if the filer uses 4K block sizes, why does my sysconfig -r output imply 2K?
eg:
marvin> sysconfig -r Volume corp
RAID group 0
RAID Disk HA.ID HA SHELF BAY CHAN Used (MB/blks) Phys (MB/blks) --------- ----- ------------ ---- -------------- -------------- parity 5.1 5 0 1 FC:A 8600/17612800 8683/17783112 data 5.2 5 0 2 FC:A 8600/17612800 8683/17783112
If I divide the Used blocks (17612800) by the MB (8600) I get 2048.
Cheers,
"John K. Edwards" wrote:
I don't have a handy pointer, and it's too early for me to think clearly enough to find one. Did they go from 2KB to 4KB? This would be explained by block size in the respective filesystems. In most filesystems directories use whole blocks, so directory sizes are multiples of block sizes. Filers use 4KB blocks, so directory sizes on filers are multiples of 4KB.
John
On Wed, 3 Nov 1999 tkaczma@gryf.net wrote:
Could someone point me to a piece of documentation which explains why the directory files double in size between say Auspex and the NetApp?
One of my users is complaining that now that we moved his directory all of the directory files doubled in size overnight.
Tom
On Thu, 4 Nov 1999, Shaun Norris wrote:
Hi,
Just a little curious, if the filer uses 4K block sizes, why does my sysconfig -r output imply 2K?
eg:
marvin> sysconfig -r Volume corp
RAID group 0
RAID Disk HA.ID HA SHELF BAY CHAN Used (MB/blks) Phys (MB/blks)
parity 5.1 5 0 1 FC:A 8600/17612800 8683/17783112 data 5.2 5 0 2 FC:A 8600/17612800 8683/17783112
If I divide the Used blocks (17612800) by the MB (8600) I get 2048.
Cheers,
Actually you should divide (8600*1024*1024) by 17612800 to get 512. The blocks in this case are the 512 byte sectors on disk. WAFL chunks 8 of these into it's smallest allocation unit.
John
On Wed, 3 Nov 1999, John K. Edwards wrote:
I don't have a handy pointer, and it's too early for me to think clearly enough to find one. Did they go from 2KB to 4KB?
That was my initial guess, but:
a) It would have been true with respect to all the files, not just directories, and the size of the file is as reported by "ls" is unrelated to the actual size of the file, i.e. sparse files will show much larger than they are in reality.
b) The size of the directory would be rounded up to 4k and not double. Besides ls does not round up to block boundaries, i.e. if you have a 3 byte file it will report 3 bytes.
This is what I am seeing:
Auspex:
dr-xr-xr-x 2 user group 59392 Oct 29 07:01 dir1
NetApp:
dr-xr-xr-x 2 user group 118784 Oct 29 09:49 dir1
How much space do directories actually occupy? How do I find that out? (Please do not suggest "du" unless you thought it through.)
Why do I see the apparent doubling in size?
Does the difference in apparent size affect the quota? (With sparse files the "ls size" doesn't matter.)
Tom
I *think* this may be due to the number and length of filenames that can be stored in a directory block?
Netapps store filenames as unicode characters, so each character is 2 bytes. if the other box doesn't support unicode, then the directorys would be 1/2 the size. (Assuming filenames >12 chars -- I think the netapp limit is 127 12 unicode (24 byte) filenmes in a 4k dir block)
Am I way off base here? -Luke
On Wed, 3 Nov 1999, John K. Edwards wrote:
I don't have a handy pointer, and it's too early for me to think clearly enough to find one. Did they go from 2KB to 4KB?
That was my initial guess, but:
a) It would have been true with respect to all the files, not just directories, and the size of the file is as reported by "ls" is unrelated to the actual size of the file, i.e. sparse files will show much larger than they are in reality.
b) The size of the directory would be rounded up to 4k and not double. Besides ls does not round up to block boundaries, i.e. if you have a 3 byte file it will report 3 bytes.
This is what I am seeing:
Auspex:
dr-xr-xr-x 2 user group 59392 Oct 29 07:01 dir1
NetApp:
dr-xr-xr-x 2 user group 118784 Oct 29 09:49 dir1
How much space do directories actually occupy? How do I find that out? (Please do not suggest "du" unless you thought it through.)
Why do I see the apparent doubling in size?
Does the difference in apparent size affect the quota? (With sparse files the "ls size" doesn't matter.)
Tom
On Wed, 3 Nov 1999, Luke Gain wrote:
I *think* this may be due to the number and length of filenames that can be stored in a directory block?
Netapps store filenames as unicode characters, so each character is 2 bytes. if the other box doesn't support unicode, then the directorys would be 1/2 the size. (Assuming filenames >12 chars -- I think the netapp limit is 127 12 unicode (24 byte) filenmes in a 4k dir block)
Am I way off base here?
Thank you, that makes more sense. However if this is to hold true the inode numbers must double in size as well. I should check whether the inode number size differs between the two boxes. Would anyone from NetApp care to comment?
Tom
On Wed, 3 Nov 1999 tkaczma@gryf.net wrote:
On Wed, 3 Nov 1999, Luke Gain wrote:
I *think* this may be due to the number and length of filenames that can be stored in a directory block?
Netapps store filenames as unicode characters, so each character is 2 bytes. if the other box doesn't support unicode, then the directorys would be 1/2 the size. (Assuming filenames >12 chars -- I think the netapp limit is 127 12 unicode (24 byte) filenmes in a 4k dir block)
Am I way off base here?
Thank you, that makes more sense. However if this is to hold true the inode numbers must double in size as well. I should check whether the inode number size differs between the two boxes. Would anyone from NetApp care to comment?
Tom
I wish it were that simple. When you go to CIFS there is the unicode factor, but also "8.3" names. I won't go into details (unless forced), but in general if you're in an NFS-only situation with short names with 1 byte characters you will fit more entries into a directory block than with CIFS and unicode and 8.3 names.
John
On Wed, 3 Nov 1999 tkaczma@gryf.net wrote:
On Wed, 3 Nov 1999, John K. Edwards wrote:
I don't have a handy pointer, and it's too early for me to think clearly enough to find one. Did they go from 2KB to 4KB?
That was my initial guess, but:
a) It would have been true with respect to all the files, not just directories, and the size of the file is as reported by "ls" is unrelated to the actual size of the file, i.e. sparse files will show much larger than they are in reality.
b) The size of the directory would be rounded up to 4k and not double. Besides ls does not round up to block boundaries, i.e. if you have a 3 byte file it will report 3 bytes.
This is what I am seeing:
Auspex:
dr-xr-xr-x 2 user group 59392 Oct 29 07:01 dir1
NetApp:
dr-xr-xr-x 2 user group 118784 Oct 29 09:49 dir1
How much space do directories actually occupy? How do I find that out? (Please do not suggest "du" unless you thought it through.)
Why do I see the apparent doubling in size?
Does the difference in apparent size affect the quota? (With sparse files the "ls size" doesn't matter.)
Tom
Many people have mostly small directories, so the one block explanation was my first attempt. Since that didn't work. I'll refer to Dave's initial comment that our particular directory entry and directory block formats are different. For directories, the size reported by ls is typically the exact size of the directory. This is certainly true on filers. If you add an entry to a directory, the directory will either remain the same size or increase by one block (4096 bytes on a filer). The directory is like a little simple database that grows one full block at a time. If you want to know how much space is used by a directory on a filer do "ls -l" from a NFS client or the moral equivalent from a CIFS client.
Directories are not included in quotas on filers. Occasionally the argument breaks out as to whether this is a feature or a bug. I'd have to appeal to the ancients or dig through ancient documents for the precise motivation for this design decision, but I suspect the fact that the filer decides the format of the metadata in the directory would figure highly in an explanation.
John
On Wed, 3 Nov 1999 tkaczma@gryf.net wrote:
One of my users is complaining that now that we moved his directory all of the directory files doubled in size overnight.
You mean the directories themselves? WAFL uses a 4K minimum block size, so directories that may only have been 512 bytes before will "round up" to 4K now.