ICEFS

From ICE Enterprises
Jump to navigation Jump to search

Ice File System configuration macro

<function>    	Function to perform 
<superblock>	Name of superblock file template
<param 1:N>	Function specific parameters

This macro contains functions for the ICE File System.

The valid functions are:

	MAKE <sbf> <config>	Makes the filesystem superblock based on the named config table file

	INIT <sbf> 		Copy superblock to actual device

	MOUNT <sbf>		Mount the filesystem defined in the superblock file

	UMOUNT <sbf>		UnMount the filesystem defined in the superblock file

 	STATS <sbf>		Report File System Statistics

	KEYS <sbf>		Lists the File System Keywords block

	DUMPLSB <devname>	Dumps the Linux Super Block on an ICEFS block device

	REHOST <devname>	Rehost a multi-drive set on a new computer

The SuperBlock information is contained in a single Midas File <superblock> with a detached header.
The keyword block in this header maintains all inode data in serialized binary form.
It can be flushed to disk efficiently in a single block write.
The inode contents requires 56 bytes per file plus the file name string. 

The block assignment map is the data section of this file.  
There is one entry for each block on the device.
This entry contains the inode number.

On the device, block=0 holds the superblock with the inode table, block=1-N hold the block map table.
Currently an 8Mby block size will support a minimum of 8M/40=200000 files and 8M*8M/4=16Tby of storage.
Currently a 4Kby block size will support a minimum of to 4K/40=100 files and 4K*4K/4=4Mby of storage.

To mount a device from outside of NeXtMidas:

  mount -t icefs /dev/nvmexxx /mnt/icefsX

To mount a raid set, simply mount the first device in the list.

To automount the device after it has been configured, the /etc/fstab file may be processed before the
ICE driver has been loaded, so use the following flags:

  /dev/nvmexxx /mnt/icefsX defaults,nofail 0 0

The ICE driver will automatically attempt to mount|umount any icefs filesystems when it is started|stopped.


The Configuration File structure is as follows:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Config file for an ICEFS volume  !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
VOLUMENAME=IceFSVolume			! arbitrary
VOLUMESIZE=AUTO				! in bytes or AUTO to get from fdisk
BLOCKSIZE=1G				! in bytes - typically 1M to 1G
STRIPESIZE=128K				! in bytes - for multivolume cases
PAGESIZE=4K				! in bytes - pages section size, for small files and Midas headers
MOUNTPOINT=/mnt/icefs			! name of unix mount point
DEVLIST="nvme0n1p1,nvme1n1p1,nvme2n1p1,nvme3n1p1"	! list of devices in file system array

The superblock keyword structure formed by the MAKE command is as follows:

TAG=SUPER
  S:VOLUMENAME=Name of Volume
  S:DEVICE=Name of first device in array
  L:DEVICES=Number of devices in array
  S:DEVLIST=List of devices for in disk array
  S:MOUNT=Mount point on host system
TAG=BLOCKS
  L:SIZE=Number of bytes in each block
  L:TOTAL=Number of blocks in the device array
  L:NEXT=Next free block for writing data
  L:USED=Number of blocks used 
  L:INODES=Number of blocks holding inodes
  L:MAPS=Number of blocks holding map table
TAG=PAGES
  L:SIZE=Number of bytes in each page
  L:TOTAL=Number of pages in the page array
  L:NEXT=Next free page for writing data
  L:USED=Number of pages used 
  L:BLOCK=Current block for page access
TAG=BOUNCE
  L:SIZE=Number of bytes in each bounce buffer for user space access.
TAG=STRIPE
  L:SIZE=Number of bytes per drive in a striped set. Default=128K.
TAG=INODES
  L:SIZE=Number of bytes in each inode (average)
  L:TOTAL=Number of inodes allocated (average)
  L:NEXT=Next inode number
  L:USED=Number of inodes used 
  L:BLOCK=Current block for inode access
  L:INODE=1	// mount point
    9L:file1=InodeBlock
    9L:dir1=InodeBlock
    9L:file2=InodeBlock
  L:INODE=dir1inode
    9L:file3=InodeBlock
    9L:file4=InodeBlock
    9L:file5=InodeBlock
    9L:dir2=InodeBlock
  L:INODE=dir2inode
    9L:file6=InodeBlock
  L:INODE=-1
TAG=EOF

The Inode block structure is as follows:
  L:ino		- The inode number
  I:uid		- The UNIX user ID
  I:gid		- The UNIX group ID
  L:mode	- The Unix permissions/link mask
  L:next	- The next inode in list
  L:atime	- Time of access
  L:mtime	- Time of modification
  L:ctime	- Time of creation
  L:pblk	- The page block
  I:pind	- The page index
  I:pbyt	- The page bytes
  L:sblk	- The data start block
  L:nblk	- The number of blocks allocated
  L:fbyt	- The number of bytes free in last block

The Data block structure is as follows:
  L:inode	- The inode number that owns this block (0==free)

Switches: