Skip to main content

Scan Slices

Scan each slice in storage pool by comparing with metaslice db & provide supplementary information.

How it works

  • Preliminary check

    • Check the given context has a config file
    • Check the METASLICE.DB is accessible by the current user
    • Check the storage pool is accessible by the current user
    • If above condition is not met it will stop
  • Gather information from METASLICE and SLICE directory

    • Extract slice details for a single slice storage and checks this slice are present in the directory
    • Same-way it check all slices in the directory is present in DB.
    • Analyze each slice and extract required data
  • Process the information

    • Based on the gathered data each slice is prented in terminal with table format

    • At end of the script it shows the number of collected slice

    Arguments

    SyntaxInfoUsageExample
    -llist the storage pool availableUse this output to below argumentarchive
    ref
    xarchive_1
    oper/0/
    oper/1/
    -m storage-poolprints the slice in the storage pool given by userYou can run this script anywhere./scanslices.sh -m ref
    -d .prints the current directry slice detailsYou should be in the storage pool to run this script./scan_slices.sh -d .
    -d Slice-namePrint specific slice details given by userYou should be in the storage pool to run this script./scan_slices.sh -d SLICE.eJkeR
    -aPrints the slice which is either missing in db or directorythis option should be run aling with -d or -m option./scan_slices.sh -m red -a
    -hPrints the usage details-./scan_slices.sh -h

Description of each column

ParameterInfo
Slice-nameName of the directory in storage pool
Statusstorage pool name
InstanceDirectory present inside storage pool for oper like 0,1.
Metaslice TimestampTimestamp of slice in database
Topper TimestampTimestamp in directory itself
Slide-dateA file that contains the date in the file name
Date-Matchcompare the date between topper and meta-slice timestamp & check the difference is below 10 min or not
Slice-in-DBslice present in metaslice db or not
Slice-in-DIRslice presnet in storage-pool or not
ArchiveCheck if the file is archivable or not
AAACheck the AAAlog.SQT is present or not

Examples :

  • /usr/local/share/trisul-hub/scan_slices.sh -m ref

    Scan-slices

  • scan_slices