home *** CD-ROM | disk | FTP | other *** search
/ ftp.parl.clemson.edu / 2015-02-07.ftp.parl.clemson.edu.tar / ftp.parl.clemson.edu / pub / pvfs2 / orangefs-2.8.3-20110323.tar.gz / orangefs-2.8.3-20110323.tar / orangefs / doc / multi-fs-doc.txt < prev    next >
Text File  |  2004-10-29  |  9KB  |  236 lines

  1.  
  2. PVFS2 multiple file system support documentation
  3. ------------------------------------------------
  4.  
  5.  
  6. Why have multiple file systems in pvfs2?
  7. --
  8. For starters, you can mount each file system separately through the
  9. Linux kernel interface.  This means you can have one file system on
  10. mount point A and another on mount point B, etc.  This can be useful
  11. for organizational and management purposes.
  12.  
  13.  
  14. Can't I just run multiple servers, each with a single file system?
  15. --
  16. Yes, you can.  There's nothing wrong with doing this either, but it's
  17. another server to manage.  With the provided functionality, you have a
  18. choice in finding a configuration that works best for you.
  19.  
  20.  
  21. Ok, so how hard is it to setup another file system?
  22. --
  23. It's pretty easy.  You need only cut and paste your primary file
  24. system configuration and modify a few fields.  Specifically you must
  25. change the ID, and Name fields.  The MetaHandleRanges and
  26. DataHandleRanges can be re-used on this new file system with the same
  27. (or different of course) meta/data allocation as your original file
  28. system!
  29.  
  30.  
  31. ... But can I add a file system without disrupting my original file
  32. system?
  33. --
  34. Of course!  As always, back up your data if it's sensitive before
  35. trying anything like this.  All you need to do is add the new file
  36. system configuration (as mentioned above and as described below) to
  37. your server configuration file and use the pvfs2-mkspace utility to
  38. add the collection (file system).
  39.  
  40.  
  41. What does an example configuration for multiple file systems looks
  42. like?
  43. --
  44. Here's a simple example configuration with two file systems called
  45. "pvfs2-volume1" and "pvfs2-volume2":
  46.  
  47. =============================
  48. <Defaults>
  49.         LogFile /tmp/pvfs2-server.log
  50.         EventLogging server
  51.         UnexpectedRequests 50
  52.         BMIModules bmi_tcp
  53.         FlowModules flowproto_multiqueue
  54.         PerfUpdateInterval 1000
  55. </Defaults>
  56.  
  57. <Aliases>
  58.         Alias host1 tcp://localhost:3334
  59. </Aliases>
  60.  
  61. <Filesystem>
  62.         Name pvfs2-volume1
  63.         ID 1709020297
  64.         RootHandle 1048576
  65.         <MetaHandleRanges>
  66.                 Range host1 4-2147483650
  67.         </MetaHandleRanges>
  68.         <DataHandleRanges>
  69.                 Range host1 2147483651-4294967297
  70.         </DataHandleRanges>
  71.        <StorageHints>
  72.                 HandleRecycleTimeoutSecs 360
  73.                 TroveSyncMeta no
  74.                 TroveSyncData no
  75.                 AttrCacheKeywords datafile_handles,metafile_dist
  76.                 AttrCacheKeywords dir_ent, symlink_target
  77.                 AttrCacheSize 4093
  78.                 AttrCacheMaxNumElems 32768
  79.         </StorageHints>
  80. </Filesystem>
  81.  
  82. <Filesystem>
  83.         Name pvfs2-volume2
  84.         ID 1486499846
  85.         RootHandle 1048576
  86.         <MetaHandleRanges>
  87.                 Range host1 4-2147483650
  88.         </MetaHandleRanges>
  89.         <DataHandleRanges>
  90.                 Range host1 2147483651-4294967297
  91.         </DataHandleRanges>
  92.         <StorageHints>
  93.                 HandleRecycleTimeoutSecs 360
  94.                 TroveSyncMeta no
  95.                 TroveSyncData no
  96.                 AttrCacheKeywords datafile_handles,metafile_dist
  97.                 AttrCacheKeywords dir_ent, symlink_target
  98.                 AttrCacheSize 4093
  99.                 AttrCacheMaxNumElems 32768
  100.         </StorageHints>
  101. </Filesystem>
  102. =============================
  103.  
  104. As you can see, the second file system is very similar to the first
  105. one, differing only in ID, and Name values.
  106.  
  107.  
  108. Wow, that's cool!  So how do I add a file system to my existing
  109. storage setup without disrupting my existing setup?
  110. --
  111. The pvfs2-mkspace utility is a powerful tool that can help you create
  112. entire storage spaces, or just add and remove existing file systems
  113. within that storage space (Terminology note: In PVFS2, all file
  114. systems exist inside a storage space, which stores one or more file
  115. systems).  Run pvfs2-mkspace with the -h, or --help option to see some
  116. more information on what it can do for you.
  117.  
  118. To use pvfs2-mkspace to add a collection (file system) to an existing
  119. storage space, you need to add the file system information to your
  120. configuration file, for example, if the following was added:
  121.  
  122. =============================
  123. <Filesystem>
  124.         Name pvfs2-volume3
  125.         ID 1709020299
  126.         RootHandle 1048576
  127.         <MetaHandleRanges>
  128.                 Range host1 4-2147483650
  129.         </MetaHandleRanges>
  130.         <DataHandleRanges>
  131.                 Range host1 2147483651-4294967297
  132.         </DataHandleRanges>
  133.         <StorageHints>
  134.                 HandleRecycleTimeoutSecs 360
  135.                 TroveSyncMeta no
  136.                 TroveSyncData no
  137.                 AttrCacheKeywords datafile_handles,metafile_dist
  138.                 AttrCacheKeywords dir_ent, symlink_target
  139.                 AttrCacheSize 4093
  140.                 AttrCacheMaxNumElems 32768
  141.         </StorageHints>
  142. </Filesystem>
  143. =============================
  144.  
  145. ... and you need to run pvfs2-mkspace as follows:
  146.  
  147. =============================
  148. ./pvfs2-mkspace --add-coll --coll-name="pvfs2-volume3" --coll-id=1709020299 --root-handle=1048576 --meta-handle-range=4-2147483650 --data-handle-range=2147483651-4294967297 --verbose --storage-space="/tmp/pvfs2-test-space"
  149.  
  150. NOTE: Alternatively, you can use the short command line option format
  151.  
  152. pvfs2-mkspace -a -c pvfs2-volume3 -i 1709020299 -r 1048576 -M 4-2147483650 -N 2147483651-4294967297 -v -s /tmp/pvfs2-test-space
  153. =============================
  154.  
  155. Notice that the -a (or --add-coll) option is specified.  This tells
  156. pvfs2-mkspace that an existing storage space already exists and that
  157. we're only adding a new collection (file system) called
  158. "pvfs2-volume3", with an ID of "1709020299", root handle of "1048576",
  159. and a meta and data handle ranges as specified.  We also use the -s
  160. (or --storage-space) switch to point pvfs2-mkspace to the existing
  161. storage space located at "/tmp/pvfs2-test-space" (make sure this
  162. matches where you have yours already) and the -v option for verbose
  163. output.  You will see output similar to the following:
  164.  
  165. =============================
  166. neillm@glob admin $ ./pvfs2-mkspace --add-coll \
  167. --coll-name="pvfs2-volume3" --coll-id=1709020299 --root-handle=1048576 \
  168. --meta-handle-range=4-2147483650 \
  169. --data-handle-range=2147483651-4294967297 --verbose \
  170. --storage-space="/tmp/pvfs2-test-space"
  171.         use all defaults    : no
  172.         delete storage      : no
  173.         verbose             : ON
  174.         root handle         : 1048576
  175.         collection-only mode: ON
  176.         collection id       : 1709020299
  177.         collection name     : pvfs2-volume3
  178.         meta handle ranges  : 4-2147483650
  179.         data handle ranges  : 2147483651-4294967297
  180.         storage space       : /tmp/pvfs2-test-space
  181. Storage space: /tmp/pvfs2-test-space
  182. Collection   : pvfs2-volume3
  183. ID           : 1709020299
  184. Root Handle  : 1048576
  185. Meta Handles : 4-2147483650
  186. Data Handles : 2147483651-4294967297
  187. info: created storage space '/tmp/pvfs2-test-space'.
  188. info: created collection 'pvfs2-volume3'.
  189. info: set handle ranges to 4-2147483650,2147483651-4294967297
  190. info: created root directory with handle 1048576.
  191. info: using meta handle range 4-2147483650 for root dirent dspace
  192. info: created dspace for dirents with handle 4
  193. info: wrote attributes for root directory.
  194. info: using meta handle range 4-2147483650 for lost+found directory
  195. dspace
  196. info: created lost+found directory with handle 1048577.
  197. info: using meta handle range 4-2147483650 for lost+found dirent
  198. dspace
  199. info: created dspace for dirents with handle 1048575
  200. info: wrote attributes for lost+found directory.
  201. info: adding lost+found directory to the root directory.
  202. collection created:
  203.         root handle = 1048576, coll id = 1709020299, root string = "root_handle"
  204. =============================
  205.  
  206. Now assuming you've added the configuration information as specified
  207. above to your server configuration file, you can now restart the
  208. server and notice that it detects all of your file systems on startup.
  209. For this example output, I have only the "server" EventLogging keyword
  210. enabled:
  211.  
  212. =============================
  213. [15:51:50.676608] PVFS2 Server version X.Y.Z starting.
  214. [15:51:50.677909] Logging server (mask 32)
  215. [15:51:50.678660] Passing tcp://glob-8.mcs.anl.gov:3334 as BMI listen address.
  216. [15:51:50.694109] File system pvfs2-volume3 using handles:
  217.         4-2147483650,2147483651-4294967297
  218. [15:51:50.694299] Sync on metadata update for pvfs2-volume3: no
  219. [15:51:50.694355] Sync on I/O data update for pvfs2-volume3: no
  220. [15:51:50.695928] File system pvfs2-volume2 using handles:
  221.         4-2147483650,2147483651-4294967297
  222. [15:51:50.696477] Sync on metadata update for pvfs2-volume2: no
  223. [15:51:50.696548] Sync on I/O data update for pvfs2-volume2: no
  224. [15:51:50.697952] File system pvfs2-volume1 using handles:
  225.         4-2147483650,2147483651-4294967297
  226. [15:51:50.698099] Sync on metadata update for pvfs2-volume1: no
  227. [15:51:50.698156] Sync on I/O data update for pvfs2-volume1: no
  228. [15:51:50.698223] Storage Init Complete (aio-threaded)
  229. [15:51:50.698281] 3 filesystem(s) initialized
  230. [15:51:50.699028] Initialization completed successfully.
  231. =============================
  232.  
  233. Now you can see all three of your file systems, meaning that each of
  234. them are ready to go!  Finally, be sure to update your /etc/fstab
  235. entries where appropriate.
  236.