Using multiple pnfs databases
# # make pnfstools available # . /usr/etc/pnfsSetup PATH=$pnfs/tools:$PATH # # check existing databases # mdb show # # you will get something like : # ID Name Type Status Path ---------------------------------------------- 0 admin r enabled (r) /<datdasedir>/admin 1 data1 r enabled (r) /<datdasedir>/data1 # # # add, let's say, 3 new databases # mdb create cell0 /<datdasedir>/cell0 mdb create cell1 /<datdasedir>/cell1 mdb create cell2 /<datdasedir>/cell2 # # get the listing again : # mdb show # ID Name Type Status Path ---------------------------------------------- 0 admin r enabled (r) /<datdasedir>/admin 1 data1 r enabled (r) /<datdasedir>/data1 2 cell0 r enabled (x) /<datdasedir>/cell0 3 cell1 r enabled (x) /<datdasedir>/cell1 4 cell2 r enabled (x) /<datdasedir>/cell2 # # so, the new databases got ID 2, 3 and 4 (resp) # but they are not yet launched : enabled (x) # mdb update # # results in # Starting cell0 Starting cell1 Starting cell2 # # and # mdb show # ID Name Type Status Path ---------------------------------------------- 0 admin r enabled (r) /<datdasedir>/admin 1 data1 r enabled (r) /<datdasedir>/data1 2 cell0 r enabled (r) /<datdasedir>/cell0 3 cell1 r enabled (r) /<datdasedir>/cell1 4 cell2 r enabled (r) /<datdasedir>/cell2 # # # create one root entry (resp. subdirectory) into each database # # # syntax : mkdir ".(<databaseId>)(<directoryName>)" # cd /pnfs/local/fs/usr mkdir ".(2)(cell0-dir)" mkdir ".(3)(cell1-dir)" mkdir ".(4)(cell2-dir)" # # all subsequently created files and directories below # cell0-dir will be on database cell0 (id=2). # NOTE : it may eventually happen that the mkdir commands return # some weird errors like 'directory not empty ...". # Just ingore those messages. if 'ls' confirms that the # directory exits afterward the command was fine. #Preparing pnfs to handle different storage groups
# # Prerequisits : cell0 cell1 and cell2 have been created as # described above. Make sure cell0 - cell2 don't # contain neither files nor directories yet. # cd /pnfs/local/fs/usr for c in cell0 cell1 cell2 ; do cd ${c}-dir echo "StoreName cms" >".(tag)(OSMTemplate)" echo ${c} >".(tag)(sGroup)" cd .. donePoolManager modifications for directory - pool affinity
# # define the pools (all not defined pools will end up in the # 'default' pool area.) # psu create pool cell0-pool0 psu create pool cell0-pool1 # psu create pool cell1-pool0 psu create pool cell1-pool1 # psu create pool cell2-pool0 psu create pool cell2-pool1 # # define the pool groups # psu create pgroup cell0-poolgroup psu create pgroup cell1-poolgroup psu create pgroup cell2-poolgroup # # add pools to pgroups # psu addto pgroup cell0-poolgroup cell0-pool0 psu addto pgroup cell0-poolgroup cell0-pool1 psu addto pgroup cell1-poolgroup cell1-pool0 psu addto pgroup cell1-poolgroup cell1-pool1 psu addto pgroup cell2-poolgroup cell2-pool0 psu addto pgroup cell2-poolgroup cell2-pool1 # # create storage groups ( == directory assignement ) # psu create unit -store cms:cell0@osm psu create unit -store cms:cell1@osm psu create unit -store cms:cell2@osm # # create storage group sets (ugroup's) # psu create ugroup cell0 psu create ugroup cell1 psu create ugroup cell2 # # add units to unit groups # psu addto ugroup cell0 cms:cell0@osm psu addto ugroup cell1 cms:cell1@osm psu addto ugroup cell2 cms:cell2@osm # # create the affinity objects (the links) # psu create link cell0-link world-net cell0 psu create link cell1-link world-net cell1 psu create link cell2-link world-net cell2 # # define the affinity ( preference ) # psu set link cell0-link -readpref=10 -writepref=10 -cachepref=10 psu set link cell1-link -readpref=10 -writepref=10 -cachepref=10 psu set link cell2-link -readpref=10 -writepref=10 -cachepref=10 # # assign pools to the links # psu add link cell0-link cell0-poolgroup psu add link cell1-link cell1-poolgroup psu add link cell2-link cell2-poolgroup