11 distributed file systems

Upload: piyush-raghav

Post on 08-Jul-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/19/2019 11 Distributed File Systems

    1/19

      CS-550: Distributed File Systems [SiS] 1

    Resource Management in Distributed Systems:

    Distributed File Systems

  • 8/19/2019 11 Distributed File Systems

    2/19

      CS-550: Distributed File Systems [SiS] 2

    Distributed File Systems

    Deinition:

    ! "m#lement a common ile system t$at can be s$ared by allautonomous com#uters in a distributed system

     

    %oals:

    !  &et'or( trans#arency

    ! )ig$ a*ailability 

    +rc$itectural o#tions:

    ! Fully distributed: iles distributed to all sites

     ,  "ssues: #erormance im#lementation com#le.ity! Client-ser*er Model:

     ,  Fileser*er: dedicated sites storing iles #erorm storage and retrie*al

    o#erations

     ,  Client: rest o t$e sites use ser*ers to access iles

  • 8/19/2019 11 Distributed File Systems

    3/19

      CS-550: Distributed File Systems [SiS] /

    Distributed File Systems: Client-Ser*er +rc$itecture

  • 8/19/2019 11 Distributed File Systems

    4/19

      CS-550: Distributed File Systems [SiS]

    Distributed File Systems Ser*ices

    ! Ser*ices #ro*ided by t$e distributed ile system:

    1 &ame Ser*er : 3ro*ides ma##ing name resolution t$e namessu##lied by clients into ob4ects iles and directories

    ! a(es #lace '$en #rocess attem#ts to access ile or directory t$e irst

    time6

     

    2 Cac$e manager: "m#ro*es #erormance t$roug$ ile cac$ing! Cac$ing at t$e client - 7$en client reerences ile at ser*er:

     ,  Co#y o data broug$t rom ser*er to client mac$ine

     ,  Subse8uent accesses done locally at t$e client

    ! Cac$ing at t$e ser*er:

     ,  File sa*ed in memory to reduce subse8uent access time

     

    9 "ssue: dierent cac$ed co#ies can become inconsistent6 Cac$e

    managers at ser*er and clients $a*e to #ro*ide coordination6

  • 8/19/2019 11 Distributed File Systems

    5/19

      CS-550: Distributed File Systems [SiS] 5

    y#ical Data +ccess in a ClientFile Ser*er +rc$itecture

  • 8/19/2019 11 Distributed File Systems

    6/19

      CS-550: Distributed File Systems [SiS] ;

    1 Mounting

    ! $e mount mec$anism binds toget$er se*eral ilename s#aces collection

    o iles and directories into a single $ierarc$ically structured name s#ace

  • 8/19/2019 11 Distributed File Systems

    7/19

      CS-550: Distributed File Systems [SiS] B

    Mec$anisms used in distributed ile systems cont6

    1 Mounting cont6

    ! ocation o mount inormation 

    a6 Mount inormation maintained at clients , 

  • 8/19/2019 11 Distributed File Systems

    8/19

      CS-550: Distributed File Systems [SiS]

    Mec$anisms used in distributed ile systems cont6

    2 Cac$ing ,  "m#ro*es ile system #erormance by e.#loiting t$e locality o reerence

     ,  7$en client reerences a remote ile t$e ile is cac$ed in t$e mainmemory o t$e ser*er ser*er cac$e and at t$e client client cac$e

     ,  7$en multi#le clients modiy s$ared cac$ed data cac$e consistency becomes a #roblem

     ,  "t is *ery diicult to im#lement a solution t$at guarantees consistency

    / )ints ,  reat t$e cac$ed data as $ints i6e6 cac$ed data may not be com#letely

    accurate

     ,  Can be used by a##lications t$at can disco*er t$at t$e cac$ed data isin*alid and can reco*er 

    !

  • 8/19/2019 11 Distributed File Systems

    9/19

  • 8/19/2019 11 Distributed File Systems

    10/19

      CS-550: Distributed File Systems [SiS] 1

    Design "ssues

    16 &aming and name resolution  ,  erminology

    !  &ame: eac$ ob4ect in a ile system ile directory $as a uni8ue name!  &ame resolution: ma##ing a name to an ob4ect or multi#le ob4ects re#lication

    !  &ame s#ace: collection o names 'it$ or 'it$out same resolution mec$anism

     ,  +##roac$es to naming iles in a distributed system

    a Concatenate name o $ost to names o iles on t$at $ost

     ,  +d*antage: uni8ue ilenames sim#le resolution ,  Disad*antages:

    G Conlicts 'it$ net'or( trans#arency

    G Mo*ing ile to anot$er $ost re8uires c$anging its name and t$e a##lications using it

    b Mount remote directories onto local directories ,  Re8uires t$at $ost o remote directory is (no'n

     ,  +ter mounting iles reerenced location-trans#arent "6e6 ile name does not re*eal itslocation

    c )a*e a single global directory ,  +ll iles belong to a single name s#ace

     ,  imitation: $a*ing uni8ue system 'ide ilenames re8uire a single com#uting acility orcoo#erating acilities

  • 8/19/2019 11 Distributed File Systems

    11/19

      CS-550: Distributed File Systems [SiS] 1

    Design "ssues cont6

    16 &aming and &ame Resolution cont6 ,  Conte.ts

    ! Sol*e t$e #roblem o system-'ide uni8ue names by #artitioning a name s#aceinto conte.ts geogra#$ical organiHational etc6

    !  &ame resolution is done 'it$in t$at conte.t

    ! "nter#retation may lead to anot$er conte.t

    ! File &ame I Conte.t J &ame local to conte.t

     ,   &ameser*er! 3rocess t$at ma#s ile names to ob4ects iles directories! "m#lementation o#tions

     ,  Single name Ser*er 

    G Sim#le im#lementation reliability and #erormance issues

     ,  Se*eral &ame Ser*ers on dierent $osts

    G

  • 8/19/2019 11 Distributed File Systems

    12/19

      CS-550: Distributed File Systems [SiS] 1

    Design "ssues Cont6

    26 Cac$ing

     ,  Cac$ing at t$e client: Main memory *s6 Dis( 

    ! Main memory: J Fast J 7or(s or dis(less clients -

  • 8/19/2019 11 Distributed File Systems

    13/19

      CS-550: Distributed File Systems [SiS] 1

    Design "ssues Cont6

    /6 7riting #olicy ,  Luestion: once a client 'rites into a ile and t$e local cac$e '$en s$ould

    t$e modiied cac$e be sent to t$e ser*er ,  #tions:

    ! 7rite-t$roug$: all 'rites at t$e clients immediately transerred to t$eser*ers

     ,  +d*antage: reliability

     ,  Disad*antage: #erormance it does not ta(e ad*antage o t$e cac$e! Delayed 'riting: delay transer to ser*ers

     ,  +d*antages:

    G Many 'rites ta(e #lace including intermediate results beore atranser 

    G Some data may be deleted ,  Disad*antage: reliability

    ! Delayed 'riting until ile is closed at client

     ,  For s$ort o#en inter*als same as delayed 'riting

     ,  For long inter*als reliability #roblems

  • 8/19/2019 11 Distributed File Systems

    14/19

      CS-550: Distributed File Systems [SiS] 1

    Design "ssues Cont6

    6 +*ailability

     ,  "ssue: '$at is t$e le*el o a*ailability o iles in a distributed ile system

     ,  Resolution: use re#lication to increase a*ailability i6e6 many co#iesre#licas o iles are maintained at dierent sitesser*ers

     ,  Re#lication issues:

    ! )o' to (ee# re#licas consistent

    ! )o' to detect inconsistency among re#licas

     ,  =nit o re#lication

    ! File

    ! %rou# o iles

    a Kolume: grou# o all iles o a user or grou# or all iles in a ser*er 

    G +d*antage: ease o im#lementation

    G Disad*antage: 'asteul user may need only a subset re#licated

     b 3rimary #ac( *s6 #ac( 

    G 3rimary #ac(:all iles o a user 

    G 3ac(: subset o #rimary #ac(6 Can recei*e a dierent degree o re#lication or

    eac$ #ac(

  • 8/19/2019 11 Distributed File Systems

    15/19

      CS-550: Distributed File Systems [SiS] 1

    Design "ssues Cont6

    56 Scalability

     ,  "ssue: can t$e design su##ort a gro'ing system

     , 

  • 8/19/2019 11 Distributed File Systems

    16/19

      CS-550: Distributed File Systems [SiS] 1

    Case Studies:

    $e Sun &et'or( File System &SF

    ! De*elo#ed by Sun Microsystems to #ro*ide a distributed ile

    system inde#endent o t$e $ard'are and o#erating system

    ! +rc$itecture

     ,  Kirtual File System KFS:

    File system interace t$at allo's &SF to su##ort dierent ile systems

     ,  Re8uests or o#eration on remote iles are routed by KFS to &FS ,  Re8uests are sent to t$e KFS on t$e remote using

    ! $e remote #rocedure call R3C and

    ! $e e.ternal data re#resentation >DR

     ,  KFS on t$e remote ser*er initiates iles system o#eration locally

     ,   Vnode Kirtual &ode:

    ! $ere is a net'or(-'ide vnode or e*ery ob4ect in t$e ile system ile or

    directory- e8ui*alent o =&"> inode 

    !   vnode $as a mount table allo'ing any node to be a mount node

  • 8/19/2019 11 Distributed File Systems

    17/19

      CS-550: Distributed File Systems [SiS] 1

    Case Studies: &FS +rc$itecture

  • 8/19/2019 11 Distributed File Systems

    18/19

      CS-550: Distributed File Systems [SiS] 1

     &FS Cont6 !  &aming and location:

     ,  7or(stations are designated as clients or ile ser*ers

     ,  + client deines its o'n #ri*ate ile system by mounting a subdirectory o

    a remote ile system on its local ile system

     , 

  • 8/19/2019 11 Distributed File Systems

    19/19

      CS-550: Distributed File Systems [SiS] 1

     &FS Cont6 ! Cac$ing:

     ,  Cac$ing done in main memory o clients

     ,  Cac$ing done or: ile bloc(s translation o ilenames to vnodes and attributeso iles and directories

      1 Cac$ing o ile bloc(s! Cac$ed on demand 'it$ time stam# o t$e ile '$en last modiied on t$e ser*er

    !