Skip to content

Instantly share code, notes, and snippets.

View harshavardhana's full-sized avatar
🌚
I may be slow to respond.

Harshavardhana harshavardhana

🌚
I may be slow to respond.
View GitHub Profile
DATA AND METADATA COHERENCE
Some modern cluster file systems provide perfect cache coherence among their clients. Perfect cache coherence among disparate NFS clients is expensive to achieve, especially on wide area networks. As such, NFS settles for weaker cache coherence that satisfies the requirements of most file sharing types.
Close-to-open cache consistency
Typically file sharing is completely sequential. First client A opens a file, writes something to it, then closes it. Then client B opens the same file, and reads the changes.
When an application opens a file stored on an NFS version 3 server, the NFS client checks that the file exists on the server and is permitted to the opener by sending a GETATTR or ACCESS request. The NFS client sends these requests regardless of the freshness of the file's cached attributes.
When the application closes the file, the NFS client writes back any pending changes to the file so that the next opener can view the changes. This al
"quota": {                                                                                        
            "storage": {                                                                                  
                "capacity": "1TiB",                                                                       
            }                                                                                             
            "network": {                                                                                  
                "iops": 1024,                                                                             
                "bandwidth": "250MiB",                                                                    
            }                                                                                             
            "cpu": {                                                                                      
@harshavardhana
harshavardhana / COPYING
Created May 6, 2018 22:23 — forked from davedoesdev/COPYING
Quietening Syslinux
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
@harshavardhana
harshavardhana / minio-gateway-azure.bat
Last active February 8, 2018 17:23
Minio windows batch examples
rem This program starts the minio batch.
@echo off
setlocal
path=C:\programs\minio;%path%
set MINIO_ACCESS_KEY=accountname1
set MINIO_SECRET_KEY=secretForAccountName
call minio gateway azure --address=:9001 >c:\test\c1.out
endlocal
@harshavardhana
harshavardhana / upload-minio.html
Last active January 29, 2023 01:33
Upload to play.minio.io:9000 from browser using minio-js
<!DOCTYPE html>
<html>
<head>
<title>Minio SDK for JavaScript - Sample Application</title>
@harshavardhana
harshavardhana / upload_upon_close.py
Created November 18, 2017 23:35
Watch for CLOSE events and upload the file to S3
import inotify.adapters
from minio import Minio
from minio.error import ResponseError
minioClient = Minio('play.minio.io:9000',
access_key='Q3AM3UQ867SPQQA43P2F',
secret_key='zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG',
secure=True)
def _main():

Keybase proof

I hereby claim:

  • I am harshavardhana on github.
  • I am y4m4 (https://keybase.io/y4m4) on keybase.
  • I have a public key ASAufnZvMt56rQ9785OSHLgz8g3ed1v-P_uBfie-iG5FRAo

To claim this, I am signing this object:

Database parameters

MariaDB [(none)]> CREATE DATABASE minio_event_db CHARACTER SET utf8 COLLATE utf8_bin;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> CREATE USER 'minio'@'%' IDENTIFIED BY '@0bjectst0rage';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> GRANT ALL PRIVILEGES ON minio_event_db.* to minio@'%' identified by '0bjectst0rage';
Query OK, 0 rows affected (0.00 sec)
package main
import (
"bytes"
"crypto/md5"
"encoding/base64"
"io/ioutil"
"log"
"os"