ICEFS

Ice File System configuration macro.

ICEFS - 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:

	PART <dev>		Partition the named drive (nvme0n1,iceblk0n1...)

	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 filesystem statistics

	KEYS <sbf>		Lists the filesystem 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

	PRESERVE <sbf>		Copy IceFS Midas super block files to /var/preserve/ or <sbf>
	RECOVER	<sbf>		Restore IceFS Midas super block files from /var/preserve/ or <sbf>

	TEST			Run throughput test on /mnt/icefs to/from ramdisk
	TESTP			-Run ramfile Preparation only
	TESTW 			-Run disk Write test only
	TESTR 			-Run disk Read test only
	TESTC			-Run ramfile Comparison

	WARMUP			Runs a few write/read buffers to get disks to maximum speeds

The SuperBlock information is contained in a single Midas File <sbf> 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, blocks=0-I hold the superblock with the inode table, blocks=I-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
FILES=32K			! maximum number of files in the inode table
MOUNTPOINT=/mnt/icefs		! name of unix mount point
DEVLIST="nvme[0-3]n1p1"		! list of devices in filesystem array
LICENSE=PAC|NVID=xx		! license mode for DIO access

The ICEFS file system is typically unique to ICE systems, but may be loaded on any Linux system to
access ICE FlightPac data.  It has special mechanisms to efficiently handle Midas files.
Also, when the data source or sink is the ICE ramdisk, the driver can bypass the bounce buffers to 
remove the CPU from the data path allowing the maximum speed as well as limiting CPU usage.
The licensing keys are necessary to invoke the high-speed access paths.

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:
  /WLOOP=n	- number of write passes in TEST function
  /RLOOP=n	- number of read  passes in TEST function