You are on page 1of 20

WAFL Internals

Appendix A Data ONTAP 7-Mode Administration

Module Objectives
By the end of this module, you should be able to: Describe how data is structure within a WAFL (Write Anywhere File Layout) file system on a traditional volume Explain how data is structure within a WAFL file system in a flexible volume on a 32-bit aggregate Describe how data is structure within a WAFL file system in a flexible volume on a 64-bit aggregate

2011 NetApp, Inc. All rights reserved.

WAFL Structure

2011 NetApp, Inc. All rights reserved.

WAFL File System


Is the file system in the Data ONTAP operating system Stores metadata in files and uses a buffer tree structure Allows the Data ONTAP operating system to write metadata files and blocks anywhere on disk (Write Anywhere File Layout) Is more flexible than traditional file systems, because metadata is not in fixed locations on disk, with the exception of the root inode

2011 NetApp, Inc. All rights reserved.

WAFL Block Structure


The WAFL file system organizes data into blocks. Use the vol status -b command to verify block size.
system> vol status -b Volume Block Size (bytes) Vol Size (blocks) FS Size (blocks) ------ ------------------ ----------------- ---------------vol0 4096 7058256 7058256

2011 NetApp, Inc. All rights reserved.

WAFL Structure
The WAFL file system is structured into volumes:

Aggregate vol1

vol1
2011 NetApp, Inc. All rights reserved. 6

WAFL File System and Inodes


WAFL organizes some metadata into inodes. An inode:
Is a collection of information about a file or directory Holds information including:
Time and date stamp Size UNIX permissions Windows access control list (ACL)

Has 192 bytes of data Is placed in an inode file (inofile)


2011 NetApp, Inc. All rights reserved. 7

WAFL Structure: Volinfo and Fsinfo Blocks


Every volume has a root inode, which is the starting point of the inode tree.
Root inode
volinfo block 1 volinfo block 2

Aggregate vol1

fsinfo block 0

...
vol1

fsinfo block 255

Active file system


2011 NetApp, Inc. All rights reserved.

Snapshot definitions
8

WAFL Structure: Inofile


Inode information is held in the inode file (inofile), a hidden system file.
Root inode 0
... 192-byte inode

20 21 Inode file

Aggregate vol1

Blocks of 4096-byte each

vol1
2011 NetApp, Inc. All rights reserved. 9

Level 0
For files that are less than 65 bytes, the data is stored within the inode file.
Root inode 0
... Small file inode

20

Inode file

Aggregate vol1

4-KB block

Small file data inside the 192-byte inode

vol1
2011 NetApp, Inc. All rights reserved. 10

Level 1 In Traditional Volumes


For files that are greater than 64 bytes, but less than or equal to 64 KB, a level-1 inode structure is used. 32-bit pointers Root inode
File inode

0
0 1

...

20 ...

Inode file
15

4 bytes

vol1
Direct Data Block Direct Data Block Direct Data Block

vol1
2011 NetApp, Inc. All rights reserved.

4-KB block
11

Traditional Volume Data Structure

Disk Physical Block Number (PBN) 500 block number

Volume Block Number (VBN) 500 block number

Traditional Volume

2011 NetApp, Inc. All rights reserved.

12

Level 1 In 32-Bit Aggregates


For files that are greater than 64 bytes but less than or equal to 32 KB, a level-1 inode structure is used.
Root inode 0 32-Bit Aggregate vol1
Direct Data Block Direct Data Block Direct Data Block
0

32-bit pointers File inode ...

20 ...

Inode file
7

2x4 bytes*

*NOTE: 2 x 4 bytes, because the physical and virtual VBNs are separate
2011 NetApp, Inc. All rights reserved.

vol1

4-KB block
13

Flexible Volume Data Structure

Aggregate Disk vol1 PvBN 456 block number vol2 PvBN 123 block number Disk

vVBN 500 block number

vVBN 500 block number

Physical Virtual Block Number (PvBN) Virtual Volume Block Number (vVBN)

2011 NetApp, Inc. All rights reserved.

14

Level 1 In 64-Bit Aggregates


For files that are greater than 64 bytes but less than or equal to 16 KB, a level-1 inode structure is used.
Root inode 0
0

64-bit pointers File inode ...

20 ...
3

Inode file
2x8 bytes

64-Bit Aggregate vol1


Direct Data Block Direct Data Block

vol1
2011 NetApp, Inc. All rights reserved.

4-KB block
15

Level 2 in Traditional Volumes


For files that are greater than 64 KB, but less than or equal to 64 MB, a level-2 inode structure is used.
Root inode 0
0 1

32-bit pointers File inode ...

20 ...

Inode file
15

Up to 16 indirect blocks

vol1

...

1023

...

1023

Direct Data Block

Direct Data Block

Direct Data Block

vol1
2011 NetApp, Inc. All rights reserved. 16

Level 2 in 32-Bit Aggregates


For files that are greater than 32 KB but less than or equal to 16 MB, a level-2 inode structure is used.
Root inode 0
0

32-bit pointers File inode ...

20 ...

Inode file
7

Up to 8 indirect blocks

32-Bit Aggregate vol1

...

511

...

511

Direct Data Block

Direct Data Block

Direct Data Block

vol1
2011 NetApp, Inc. All rights reserved. 17

Level 2 In 64-Bit Aggregates


For files that are greater than 16 KB, but less than or equal to 4 MB, a level-2 inode structure is used.
Root inode 0
0

64-bit pointers File inode ...

20 ...
3

Inode file
Up to 4 indirect blocks

64-Bit Aggregate vol1

...

255

...

255

Direct Data Block

Direct Data Block

Direct Data Block

vol1
2011 NetApp, Inc. All rights reserved. 18

Directories
Each directory inode points to at least one 4-KB block that holds the metadata for the block.
Root inode Inode file
Directory inode

4-KB block

Entries Chunks

Aggregate vol1

An array of entries containing 128 rows of 12 bytes An array of 160 sixteenbyte name chunks

vol1
2011 NetApp, Inc. All rights reserved. 19

Module Summary
Now that you have completed this module, you should be able to: Describe how data is structure within a WAFL file system on a traditional volume Explain how data is structure within a WAFL file system in a flexible volume on a 32-bit aggregate Describe how data is structure within a WAFL file system in a flexible volume on a 64-bit aggregate

2011 NetApp, Inc. All rights reserved.

20

You might also like