Friday 11 December 2015

inode & NetApp Maxfiles

An inode is a data structure that defines a file, except for the filename which is stored in the directory entry. Note that a directory is just another file. The inode number is an integer unique to the volume upon which it is stored. Inodes point to blocks that make up a file, and inodes also contain the metadata of the file.
When a program refers to a file by name, the system looks up the filename in the directory entry file of the directory in which the file exists to get the proper inode. This gives the system the information it needs about the file to perform further operations.
Each inode contains the following information:
  • Volume where the inode resides
  • Locking information
  • Mode and type of file
  • Number of links to the file
  • Owner's user and group ids
  • Number of bytes in the file
  • Access and modification times
  • Time the inode itself was last modified
  • Addresses of the file's blocks on disk
  • Permission: UNIX bits or Windows Access Control List (ACLs)
  • Qtree ID
Data ONTAP allocates one inode per 32KB of data in a volume by default. This value can be increased to as high as 1 inode per 4KB of data via the maxfiles command.

Maxfiles
  1. Using maxfiles command we can increase the number of inodes in the respective volume, so that we create additional files.
  2. We may not decrease the inode value because you might not be able to run WAFL_check.
  3. One  file is one inodes

The below examples show how to inodes increase:

STEP :1

fas3070> aggr create aggr1 10 

Fri Aug 31 06:29:16 GMT [raid.vol.disk.add.done:notice]: Addition of Disk /aggr1/plex0/rg0/v4.24 Shelf 1 Bay 8 [NETAPP VD-100MB 0042] S/N [50125907] to aggregate aggr1 has completed successfully
Fri Aug 31 06:29:16 GMT [raid.vol.disk.add.done:notice]: Addition of Disk /aggr1/plex0/rg0/v4.36 Shelf 2 Bay 4 [NETAPP VD-100MB 0042] S/N [50130017] to aggregate aggr1 has completed successfully
Creation of an aggregate with 10 disks has completed.
fas3070> Fri Aug 31 06:29:16 GMT [raid.vol.disk.add.done:notice]: Addition of Disk /aggr1/plex0/rg0/v4.22 Shelf 1 Bay 6 [NETAPP VD-100MB 0042] S/N [50125906] to aggregate aggr1 has completed successfully
Fri Aug 31 06:29:16 GMT [raid.vol.disk.add.done:notice]: Addition of Disk /aggr1/plex0/rg0/v4.35 Shelf 2 Bay 3 [NETAPP VD-100MB 0042] S/N [50130016] to aggregate aggr1 has completed successfully
Fri Aug 31 06:29:16 GMT [raid.vol.disk.add.done:notice]: Addition of Disk /aggr1/plex0/rg0/v4.21 Shelf 1 Bay 5 [NETAPP VD-100MB 0042] S/N [50125905] to aggregate aggr1 has completed successfully
Fri Aug 31 06:29:16 GMT [raid.vol.disk.add.done:notice]: Addition of Disk /aggr1/plex0/rg0/v4.34 Shelf 2 Bay 2 [NETAPP VD-100MB 0042] S/N [50130015] to aggregate aggr1 has completed successfully
Fri Aug 31 06:29:16 GMT [raid.vol.disk.add.done:notice]: Addition of Disk /aggr1/plex0/rg0/v4.20 Shelf 1 Bay 4 [NETAPP VD-100MB 0042] S/N [50125904] to aggregate aggr1 has completed successfully
Fri Aug 31 06:29:16 GMT [raid.vol.disk.add.done:notice]: Addition of Disk /aggr1/plex0/rg0/v4.33 Shelf 2 Bay 1 [NETAPP VD-100MB 0042] S/N [50130014] to aggregate aggr1 has completed successfully
Fri Aug 31 06:29:16 GMT [raid.vol.disk.add.done:notice]: Addition of Disk /aggr1/plex0/rg0/v4.19 Shelf 1 Bay 3 [NETAPP VD-100MB 0042] S/N [50125903] to aggregate aggr1 has completed successfully
Fri Aug 31 06:29:16 GMT [raid.vol.disk.add.done:notice]: Addition of Disk /aggr1/plex0/rg0/v4.32 Shelf 2 Bay 0 [NETAPP VD-100MB 0042] S/N [50125913] to aggregate aggr1 has completed successfully
Fri Aug 31 06:29:17 GMT [wafl.vol.add:notice]: Aggregate aggr1 has been added to the system.
fas3070> Fri Aug 31 06:29:20 GMT [nbt.nbns.registrationComplete:info]: NBT: All CIFS name registrations have completed for the local server.

STEP:2

CREATE THE NEW VOLUME FOR 100MB

fas3070> 
fas3070> vol create vol1 aggr1 1.2g
Creation of volume 'vol1' with size 1.2g on containing aggregate
'aggr1' has completed.
fas3070>

STEP:3

CHECK THE VOL1 & VOL1 INODE VALUE

fas3070> maxfiles 
Volume vol0: maximum number of files is currently 19990 (6096 used)
Volume vol1: maximum number of files is currently 322,122547 (52870 used)
fas3070>

STEP:4

NOW THE CHECK THE USED AND FREE INODE OF VOL1

fas3070> df -i /vol/vol1 
Filesystem         iused               ifree                 %iused           Mounted on  
/vol/vol0           52870         322,122547           97%               /vol/vol0 
fas3070> 

STEP:5

INCREASING THE INODE VAULE 3033 TO 5000

fas3070> maxfiles vol1 422,122547
The new maximum number of files specified is more than twice as big as it needs to be, based on current usage patterns. Increasing the maximum number of files consumes disk space, and the number can never
be decreased. Configuring a large number of inodes can also result in less available memory after an upgrade, which means you might not be able to run WAFL_check.

The new maximum number of files will be rounded to 422,122540.

Are you sure you want to increase the maximum number of files? y
fas3070>

fas3070> maxfiles 
Volume vol0: maximum number of files is currently 19990 (6154 used).
Volume vol1: maximum number of files is currently 422,122540 (52870used).
fas3070>

NOW THE INODE VALUE IS 4988 AT MAXIMUM OF VOLUME1

No comments:

Post a Comment