def infer_table_fstype(conn):
    """Determines if a database encodes GPFS or Lustre data

    Args:
        conn (sqlite3.Connection): SQLite database connection to a database
            containing an 'entries' table

    Returns:
        str or None: Either 'gpfs' or 'lustre' if conn's entries table is
            successfully identified, or None if no relevant columns are found.
    """
    columns = []
    cursor = conn.cursor()
    for row in cursor.execute("PRAGMA table_info('entries')").fetchall():
        columns.append(row[1])

    if 'snapshot' in columns:
        return 'gpfs'
    elif 'type' in columns:
        return 'lustre'

    return None