Download
storage resource broker n.
Skip this Video
Loading SlideShow in 5 Seconds..
Storage Resource Broker PowerPoint Presentation
Download Presentation
Storage Resource Broker

Storage Resource Broker

214 Vues Download Presentation
Télécharger la présentation

Storage Resource Broker

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Storage Resource Broker USER INTERFACE George Kremenek kremenek@sdsc.edu

  2. C language API S-commands Unix, Win NT, W2000 Java GUI Win32 GUI WEB Types of Interface

  3. Programmatic API High-level API Low-level API SRB Manager API Command Level Interface - Scommands Graphical User Interface - srbBrowser Web Utilities SRB API

  4. SRB API Interface Application MCAT SRB Master

  5. Low-level API talks to resource drivers no registration of data sets in MCAT no authentication through MCAT User provides all information High-level API Uses low-level API to access resources Registers data management information in MCAT Uses MCAT for authentication and meta information Uses MCAT for resource and data discovery Access/store data in remote SRB High & Low-level API

  6. srbFileOpen(conn, storType, host, fileName, mode) srbFileCreate(conn, storType, host, fileName, mode) srbFileClose(conn, fd) srbFileUnlink(conn, storType, host, fileName) srbFileRead(conn, fd, buffer, length) srbFileWrite(conn, fd, buffer, length) srbFileSeek(conn, fd, offset, whence) srbFileSync(conn, fd) srbFileStat(conn, storType, host, fileName, statBuf) srbFileMkdir(conn, storType, host, dirName, mode) srbFileRmdir(conn, storType, host, dirName, mode) srbFileChmod(conn, storType, host, fileName, mode) Low-level API

  7. srbDbLobjOpen(conn, storType, resourceLoc, positionName, mode) srbDbLobjCreate(conn, storType, resourceLoc, positionName, mode) srbDbLobjClose(conn, dd) srbDbLobjUnlink(conn, storType, host, fileName) srbDbLobjRead(conn, dd, buffer, length) srbDbLobjWrite(conn, dd, buffer, length) srbDbLobjSeek(conn, dd, offset, whence) Low-Level API (contd …)

  8. srbBrowser - A SRB Graphical Interface • A java GUI • Interface with SRB servers using the client API library. • Performs most SRB operations - cp, replicate, import, export, metadata query, etc. USER Java GUI Obtain user’s metadata information via SRB. Invoke SRB operations SRB Agent MCAT Proxy operation

  9. SRB Command Line Interface Environment File USER SRB “shell” commands: Sls, Scp, Scat, Sput, Sget, ... MCAT SRB Agent Proxy operation

  10. srbObjOpen(conn, objChar, mode, collectionName) srbObjCreate(conn, objName, objType, resourceName, collectionName, pathName, size) srbObjClose(conn, od) srbObjUnlink(conn, objChar, collectionName) srbObjRead(conn, od, buffer, length) srbObjWrite(conn, od, buffer, length) srbObjSeek(conn, od, offset, whence) srbObjMove(conn, objChar, collectionName, newResourceName, newPathName) srbObjReplicate(conn, objChar, collectionName, newResourceName, newPathName) srbObjProxyOpr(conn, Operation, sourceDesc, targetDesc) High-level API

  11. srbGetDatasetInfo(conn, objChar, collectionName, resultStruct, requiredNumber) srbGetMoreInfo(resDesc, resultStruct, requiredNumber) srbGetDataDirInfo(conn, conditionList, selectList, resultStruct) srbModifyDataset(conn, objId, collectionName, newValue1, newValue2, modifyType, resourceName, pathName) srbCreateCollect(conn, parentCollectionName, childCollectionName) srbListCollect(conn, CollectionName, flag, resultStruct) srbModifyCollect(conn, CollectionName, newValue1, newValue2, newValue2, modifyType) srbModifyUser(conn, newValue1, newValue2, modifyType) srbSetAuditTrail(conn, setValue) High-Level API (contd …)

  12. srbChkMdasAuth(conn, userName, userAuth, domain) srbChkMdasSysAuth(conn, userName, userAuth, domain) srbRegisterUser(conn, userName, domain, password, userType, userAddress, userPhone, userEmail) srbRegisterUserGrp(conn, userGrpName, userGrpPassword, userGrpType, userGrpAddress, userGrpPhone, userGrpEmail) System Manager API

  13. Sinit initializes client environment Sexit ends a SRB session started with Sinit A client may communication with servers with different "release version", but they must have the same "API version” See ~/.srb/.MdasEnv and environment variables Sinit [-v], Sexit

  14. mdasCollectionHome '/home/kremenek.sdsc' mdasDomainHome 'sdsc' srbUser 'kremenek' srbHost ’srb.sdsc.edu' ~/.srb/.MdasEnv file

  15. setenv srbPort '5566' # valid schemes are : 'PASSWD_AUTH', 'SEA_AUTH', 'SEA_ENCRYPT', # 'GSI_AUTH', 'GSI_SECURE_COMM' AUTH_SCHEME 'ENCRYPT1' defaultResource 'dl1-unix-sdsc’ .MdasEnv, .MdasAuth

  16. changes the working SRB collection without a collection the mdasCollectionHome value in the ~/.srb/.MdasEnv file will become the new working collection. Scd [collection]

  17. displays current working SRB collection Spwd

  18. {-w position annotation dataName} {-u timestamp newAnnotation dataName} {[-R] [-t timestamp] [-p position] [-U userName@domainName] [-Y n] [-L n] [-T dataType] dataName|collectionName} facility for annotations on data objects Sannotate {switches}

  19. { localFileName srbTarget} {-i srbTarget} {-s srbObj srbTarget} appends a local file, stdin, SRB object to an existing SRB object Sappend {switches}

  20. lists the queriable MCAT attributes used in conditions for choosing SRB objects. Sattrs

  21. {[-C n] [-T ticketFile | -t ticket] [-A condition] srbObj …} reads each srbObj from SRB to stdout -A option, only srbObj which conform to the condition are chosen If using a ticket, one need not give a srbObj name Scat {switches + list}

  22. {[-c] [-a] [-p] [-r] [-d|c] w|a|r|n newUserName domainName collection| srbObj …} grants/changes access permits for the operand collection or srbObj ... for newUserName in domainName granted new permission for all replica Schmod {switches+list}

  23. {[-n n ] [-fpra] [-c container] [-S newResourceName] [-P newPathName] srcObj destObj srcObj ... target collection -r source collection... target collection } -p prompts, -f force, -a force all replica, -r copy recursively, -n replica number Scp {switches + list}

  24. describes SRB errors takes an error number generated by SRB/MCAT system and displays a text human readable message relating to the error Serror number

  25. {[-n n] [-pfr] [-A condition] srbObj|Collection ... localFile|localDirectory} exports one or more objects from SRB space into local file system -A option, only srbObj which conform to the condition are chosen. Sget {switches+list}

  26. {[-ahc] [-I] [-W | -U userName] [-Y number] [-L number] [-A condition] [collName]{ display information about SRB data objects -a display permissions, -W all users, -c container, -U for usr/group,-I in all collections, -Y output format, -A condition option "<Attr> <CompOp> <Value>" SgetColl {switches+list}

  27. {[-phPrReasdDc] [-I] [-W | -U userName] [-Y number] [-L number] [-P dataType] [-A condition] [dataName]} display information about SRB data objects -p basic parameters, -r storage information, -a permissions, -d audit info., -c collection info., -W for all users, -Y [number] format SgetD {switches+list}

  28. {[-lhdDp] [-L number] [-Y number] [-T resourcTy pe] [resourceName]} display information about SRB resource(s) -l display comprehensive list, -d list objects, -D with details, -p for physical resources only,-T resource type list for the given type, -Y [number] controls display format SgetR {switches+list}

  29. {[-h] [-u] [-v] [-L n] [-Y n] [ -F fileName | -T ticket | -D dataName | -C collection | -U [-c] userName domainName ]} display information about SRB tickets for a given ticket, dataName or collection -u ticket-users perspective,-F file for the ticket, -T ticket, -D dataName, -C collection, -U userName SgetT {switches+list}

  30. {[-pPhdatg] [-L number] [-Y number] [-T userType] [userName@domainName]} displays information about a group or user userName@domainName -p user/group name, -a access permissions, -d domain(s), -t audit info. -g group(s), -c collection access, -T info. for user type SgetU {switches+list}

  31. {[-C n ] [-p] [-A condition] srbObj ... localFile} exports object(s) into local file system -p prompts before operation, -C replica number, -A condition list (‘&’ separated) the form "<Attr> <CompOp> <Value>” Sgetappend {s+l}

  32. {[-hl] [-L number] [-r|-f] [-A condition] [collection|srbObj ...]} display and properties of objects -r recursively for sub-collections, -f force argument to be interpreted as a collection.-l long format, giving owner, replica #, physical resource, siz, time of creation Sls {s+l}

  33. {[-a] [-l]} or {container} display metadata of SRB containers “Slscont” displays all containers “Slscont XYZ” all inContainer objects will be listed -l metadata in long format,-a accessible by the user rather than owned by the user Slscont {s+l}

  34. modifies metadata information about SRB data objects {-i -I metaAttrNameEqValue [ [-I metaAttrNameEqValue] ... ] dataName} {-u metadataIndex metaAttrNameEqValue dataName} {-d metadataIndex dataName} {-c -i -I metaAttrNameEqValue [ [-I metaAttrNameEqValue] ... ] collectionName} {-c -u metadataIndex metaAttrNameEqValue collectionName} Smeta {s+l}

  35. {-c -d metadataIndex collectionName} {[-R] [-I metaAttrNameOrCondition [-I metaAttrNameOrCondition] ... ] [-Y n] [-L n] [-T dataType] dataName|collectionName} {-c [-R] [-I metaAttrNameOrCondition [-I metaAttrNameOrCondition] ...] [-Y n] [-L n] [-T dataType] [collectionName]} Smeta cont.

  36. Smeta provides facility for inserting,deleting, updating and accessing meta-data on data object dataName or collection collectionName Currently, we support 10 string attributes and two integer attributes 'all’ permission for modify, 'read’ for view Smeta cont.

  37. {[-S resourceName] [-D dataType] [-s containerSize] container} creates a new SRB container “container" may be an absolute path or a relative path (will be created in the user's container collection path - /container/userName.domainName) Smkcont {s+l}

  38. {[-N] collection} creates a new SRB collection is a format <path_name>/<new_collection_name>. -N option overrides the default association with container of its parent collection Smkdir {s+l}

  39. {[-dh] -c value collName} modifies information about collections in collName -h help, -d delete, -c container_name is updated SmodColl {s+l}

  40. {-s|-t|-c newValue dataName} modifies metadata information about SRB data objects -s change size -t change type -c insert comments SmodD {s+l}

  41. {srbObj targetObj} {collection newcollection} {srbObj ... Collection} Smv {s+l}

  42. changes password of current user changes the current user's password both in the Meta Catalog as well as in the Client Authorization Environment file password change persists across sessions with SRB Spasswd

  43. {[-h] [-H hostAddr] command} proxy command operation. Request a remote SRB server to execute arbitrary commands on behalf of client on the “hostAddr” (or “srbHost” in the .MdasEnv) the proxy commands should be installed in the /usr/local/srb/bin/commands directory Spcommand {s+l}

  44. {[-C n] [-p] [-P newpathName] srbObj ... newresourceName} moves one or more SRB objects to the newresourceName at new path newpathName (if given ). The old copy is deleted and the MCAT catalog is also updated Sphymove {s+l}

  45. {[-fpra] [-c container] [-D dataType] [-S resourceName] [-P pathName] localFileName|localDirectory ... TargetName} imports one or more local files and/or directories -p prompts, -f force, -a force all replica,-r recursively, -c container Sput {s+l}

  46. {[-p] [-D dataType] [-S size] [-R resourceName] RegisteringObjectPath ... TargetName} {-c [-p] [-D dataType] [-S size] [-R resourceName] RegisteringObjectPath srbObjectName} registers one or more files into SRB space Sregister {s+l}

  47. {-S resource container} replicate a container copy to a specific resource For containers that have multiple "permanent" and "cache" copies, this is a way to put a copy of the container on a specific resource Sreplcont {s+l}

  48. {-n replicaNum] [-pr] [-S resourceName] [-P pathName] srbObj|collection …} makes one more copy of srbObj or collection -p prompts, -r recursively, -n replicaNum, -P full or relative newpathName to move the object, -S new resourcename Sreplicate {s+l}

  49. {[-p] [-A condition] srbObj …} {[-p] [-A condition] -r srbObj|collection …} remove files from SRB space -p prompts, -r recursively (the collection will be emptied of datasets and removed), -A condition options(“"<Attr><CompOp> <Value>””) Srm {s+l}

  50. {[-f] container} remove an empty existing SRB container -f Force the removal of all inContainer objects stored in this containe before removing the container Srmcont {s+l}