Virtual Shared Disk on Distributed Redundant Storage

download Virtual Shared Disk on Distributed Redundant Storage

of 88

Transcript of Virtual Shared Disk on Distributed Redundant Storage

  • 8/6/2019 Virtual Shared Disk on Distributed Redundant Storage

    1/88

    A V i r t u a l S h a r e d D i s k

    o n D i s t r i b u t e d R e d u n d a n t S t o r a g e

    S t e f a n V i j z e l a a r

    F e b r u a r y 9 , 2 0 1 0

    A b s t r a c t

    S i m u l a t i n g a s h a r e d d i s k o n d i s t r i b u t e d r e d u n d a n t s t o r a g e r e q u i r e s a

    c o n s i s t e n t o r d e r i n g o f d i s k o p e r a t i o n s . C o n s e n s u s o n s u c h a n o r d e r i n g i s

    i m p o s s i b l e i n a s y n c h r o n o u s s y s t e m s w i t h f a i l i n g p r o c e s s e s . C o n s i s t e n c y

    c a n h o w e v e r b e a c h i e v e d w i t h o u t r e a c h i n g c o n s e n s u s , e v e n w h e n o n l y a

    m a j o r i t y o f p r o c e s s e s i s a v a i l a b l e . T h i s p a p e r s h o w s h o w t o i m p l e m e n t a

    v i r t u a l s h a r e d d i s k , u s i n g a n a p p r o p r i a t e c o n s i s t e n c y m o d e l . A l g o r i t h m s

    a r e v e r i e d u s i n g t h e S p i n m o d e l c h e c k e r .

    1 I n t r o d u c t i o n

    S t o r a g e s h a r i n g i s a n i m p o r t a n t a p p l i c a t i o n o f c u r r e n t n e t w o r k t e c h n o l o g y , r a n g -

    i n g f r o m s h a r i n g l e s b e t w e e n c o m p u t e r s i n a h o m e n e t w o r k t o c o n s o l i d a t i n g

    s t o r a g e i n a n e n t e r p r i s e s e r v e r e n v i r o n m e n t . T h e s e a p p l i c a t i o n s c a n c h o o s e f r o m

    a v a r i e t y o f h a r d w a r e a n d s o f t w a r e s o l u t i o n s . S t o r a g e c a n f o r e x a m p l e b e s h a r e d

    a t b l o c k l e v e l : u s i n g h o s t b u s a d a p t e r s a t t a c h e d t o s h a r e d d i s k s , o r n e t w o r k

    a d a p t e r s c o n n e c t e d t o a s t o r a g e a r e a n e t w o r k . S t o r a g e c a n a l s o b e s h a r e d a t l e

    l e v e l : u s i n g d i s t r i b u t e d l e s y s t e m s w i t h s t o r a g e s e r v e r s , o r n e t w o r k l e s y s t e m s

    o n n e t w o r k a t t a c h e d s t o r a g e . S t o r a g e s y s t e m s c a n e v e n b e u s e d t o c o m p l e m e n t

    e a c h o t h e r : s h a r e d d i s k l e s y s t e m s c a n t r a n s f o r m s h a r e d b l o c k s t o r a g e i n t o

    s h a r e d l e s t o r a g e , s t o r a g e s e r v e r s o f a d i s t r i b u t e d l e s y s t e m c a n u s e s h a r e d

    d i s k s a s b a c k i n g s t o r a g e . T h e r e a r e a l o t o f o p t i o n s t o s t a c k , m i x a n d m a t c h

    s t o r a g e s o l u t i o n s .

    R e l i a b i l i t y i s a b i g c o n c e r n f o r s t o r a g e s y s t e m s , e s p e c i a l l y w h e n s t o r a g e i s

    s h a r e d . S h a r i n g s t o r a g e c a n i n c r e a s e t h e i m p a c t o f d a t a l o s s , s h o u l d t h e s t o r a g e

    s y s t e m f a i l . T h e s o l u t i o n i s t o i n t r o d u c e r e d u n d a n c y i n t o t h e s y s t e m , a l l o w i n g

    f o r a c e r t a i n a m o u n t o f b a c k i n g s t o r a g e t o f a i l w i t h o u t j e o p a r d i z i n g i n t e g r i t y .

    R e d u n d a n t a r r a y s o f i n e x p e n s i v e d i s k ( R A I D ) a r e a p r i m e e x a m p l e : d a t a i s

    s t o r e d o n m u l t i p l e d i s k s a n d c a n s u r v i v e d i s k f a i l u r e s . H o w e v e r , R A I D a n d

    s i m i l a r t e c h n i q u e s a r e d e s i g n e d t o r u n o n a s i n g l e m a c h i n e w i t h d i r e c t l y a t t a c h e d

    s t o r a g e . E v e n w h e n s h a r e d b l o c k s t o r a g e i s u s e d , a R A I D i m p l e m e n t a t i o n c a n

    o n l y r u n o n a s i n g l e n o d e a t a t i m e . I t i s n o t m e a n t t o r u n c o n c u r r e n t l y . T h i s

    s t i l l l e a v e s t h e n o d e a s a s i n g l e p o i n t o f f a i l u r e .

    1

  • 8/6/2019 Virtual Shared Disk on Distributed Redundant Storage

    2/88

    A s i n g l e p o i n t o f f a i l u r e c a n b e r e m o v e d b y e i t h e r u s i n g f a i l - o v e r o r m a k i n g i t

    r e d u n d a n t . F a i l - o v e r i m p l e m e n t a t i o n s l e t a n o t h e r n o d e t a k e o v e r w h e n a n o d e

    f a i l s . T h e p r o b l e m t h e n s h i f t s t o d e t e c t i n g n o d e f a i l u r e : i n a n a s y n c h r o n o u s

    s y s t e m i t i s i m p o s s i b l e t o d i s t i n g u i s h b e t w e e n a s l o w a n d a f a i l e d n o d e . H a r d -

    w a r e s o l u t i o n s e x i s t t o e n s u r e t h a t a p r e s u m a b l y f a i l e d n o d e s t a y s d o w n , f o r

    e x a m p l e b y c u t t i n g i t s p o w e r , b u t t h e s e s o l u t i o n s a d d c o m p l e x i t y t o t h e s y s t e m .

    R e d u n d a n t i m p l e m e n t a t i o n s m a k e s u r e n o s i n g l e p o i n t o f f a i l u r e e x i s t s . T h e

    p r o b l e m t h e n b e c o m e s o n e o f c o o r d i n a t i o n b e t w e e n p a r t i c i p a t i n g n o d e s , w h i c h

    m i g h t p r o v e d i c u l t s i n c e d e t e r m i n i s t i c c o n s e n s u s i n a n a s y n c h r o n o u s s y s t e m i s

    i m p o s s i b l e w h e n n o d e s c a n f a i l . H a r d w a r e s o l u t i o n s e x i s t i n t h e f o r m o f r e d u n -

    d a n t l y c o n n e c t e d R A I D a p p l i a n c e s , b u t t h e s e a r e g e n e r a l l y e x p e n s i v e . A m o r e

    c o s t e e c t i v e s o l u t i o n w o u l d b e a r e d u n d a n t i m p l e m e n t a t i o n i n s o f t w a r e .

    T h i s p a p e r p r e s e n t s a v i r t u a l s h a r e d d i s k : a s h a r e d d i s k i m p l e m e n t a t i o n

    i n s o f t w a r e , b a s e d o n r e d u n d a n t d i s t r i b u t e d s t o r a g e . D a t a i s d i s t r i b u t e d o v e r

    m u l t i p l e n o d e s a n d c a n b e a c c e s s e d c o n c u r r e n t l y . D e s p i t e t h i s , t h e s y s t e m s t i l l

    b e h a v e s a s a s i n g l e s h a r e d d i s k . S h a r e d d i s k s e m a n t i c s a r e e n s u r e d t h r o u g h

    a c o n s i s t e n c y m o d e l : r e a d a n d w r i t e o p e r a t i o n s b e h a v e a s i f s u b j e c t t o s o m e

    g l o b a l o r d e r . F o r e x a m p l e , w h e n a r e a d o r w r i t e n i s h e s , n o s u b s e q u e n t r e a d

    c a n r e t u r n a n o l d e r v a l u e t h a n t h e o n e j u s t r e a d o r w r i t t e n . I t i s n o t n e c e s s a r y

    t o h a v e c o m p l e t e c o n s e n s u s o n t h e g l o b a l o r d e r . I t i s e n o u g h t o p r o v e t h a t ,

    f o r e a c h e x e c u t i o n , o n e o r m o r e p o s s i b l e o r d e r i n g s e x i s t w h i c h a r e c o n s i s t e n t

    w i t h t h e o b s e r v e d r e a d a n d w r i t e b e h a v i o r . T h e c o n s i s t e n c y m o d e l u s e d i n t h i s

    p a p e r i s c a l l e d s t r i c t l i n e a r i z a b i l i t y . I t a l l o w s v i r t u a l s h a r e d d i s k s t o f u n c t i o n a s

    a d r o p - i n r e p l a c e m e n t f o r s h a r e d d i s k h a r d w a r e .

    M e s s a g e s s e n t c o n c u r r e n t l y b y t h e p r o t o c o l c a n a r r i v e i n d i e r e n t o r d e r s a t

    t h e i r d e s t i n a t i o n s ; c a u s e d b y a r b i t r a r y m e s s a g e d e l a y s i n t r o d u c e d b y t h e n e t -

    w o r k . C o r r e c t n e s s n e e d s t o b e e v a l u a t e d f o r e a c h p o s s i b l e o r d e r i n g o f m e s s a g e s

    t o e n s u r e r e l i a b i l i t y a n d s e q u e n t i a l c o n s i s t e n c y . M o d e l c h e c k i n g i s u s e d t o m a k e

    s u r e t h e v i r t u a l s h a r e d d i s k b e h a v e s c o r r e c t l y . A P r o m e l a m o d e l o f t h e a l g o -

    r i t h m i s c r e a t e d a n d s u b s e q u e n t l y v e r i e d u s i n g t h e S p i n m o d e l c h e c k e r . T h e

    m o d e l c h e c k e r b u i l d s a s t a t e s p a c e o f t h e p r o t o c o l a n d v e r i e s i t s c o r r e c t n e s s .

    T h e v i r t u a l s h a r e d d i s k i s m e a n t t o r u n o n p l a i n c o m m o d i t y h a r d w a r e : p e r -

    s o n a l c o m p u t e r s , s o m e w i t h l o c a l s t o r a g e , c o n n e c t e d t h r o u g h a n e t w o r k . M a -

    c h i n e s r u n n i n g t h e M I N I X o p e r a t i n g s y s t e m a n d c o n n e c t e d u s i n g a n E t h e r n e t

    n e t w o r k a r e u s e d a s a p l a t f o r m f o r a n i n i t i a l i m p l e m e n t a t i o n . S i n c e t h e s o -

    l u t i o n i s b a s e d o n s o f t w a r e , i t d o e s n o t r e q u i r e h a r d w a r e s h a r e d d i s k s , w h i c h

    c a n b e e s p e c i a l l y e x p e n s i v e w h e n r e d u n d a n c y i s r e q u i r e d . T o g e t h e r w i t h o t h e r ,

    f o r e x a m p l e o p e n s o u r c e , s t o r a g e s o l u t i o n s , t h i s g i v e s a c c e s s t o a n a o r d a b l e

    r e d u n d a n t s t o r a g e s y s t e m .

    T h i s p a p e r i s s t r u c t u r e d a s f o l l o w s . S e c t i o n 2 i s a n i n t r o d u c t i o n t o c o n c e p t s

    o f s t o r a g e s y s t e m s . I t p r o v i d e s a b a s i c o v e r v i e w o f t e r m i n o l o g y a n d d e s c r i b e s

    s o l u t i o n s w h i c h c a n b e u s e d t o c o m p l e m e n t a v i r t u a l s h a r e d d i s k . S e c t i o n 3

    p r e s e n t s u s e c a s e s f o r a v i r t u a l s h a r e d d i s k i m p l e m e n t a t i o n : i t c a n r e p l a c e a n d

    i m p r o v e u p o n t h e u s e s o f c o n v e n t i o n a l s h a r e d d i s k s . S e c t i o n 4 e x p l o r e s t h e

    t h e o r y a v a i l a b l e t o c o n s t r u c t v i r t u a l s h a r e d d i s k s a n d i n v e s t i g a t e s c o m p e t i n g

    s o l u t i o n s .

    2

  • 8/6/2019 Virtual Shared Disk on Distributed Redundant Storage

    3/88

    A p r e l i m i n a r y a l g o r i t h m f o r v i r t u a l s h a r e d d i s k s i s i n t r o d u c e d i n s e c t i o n 5 .

    I t i s f o l l o w e d b y s e c t i o n s 6 a n d 7 r e s p e c t i v e l y , w h i c h s h o w t h e m o d e l c h e c k i n g

    a n d i m p l e m e n t i o n o f t h e a l g o r i t h m . T h e p r e l i m i n a r y a l g o r i t h m c a n c o p e w i t h

    a s y n c h r o n o u s n e t w o r k s , b u t n o t f a i l i n g p r o c e s s e s . S e c t i o n 8 p r e s e n t s a b e t t e r

    a l g o r i t h m t o i m p l e m e n t a v i r t u a l s h a r e d d i s k . I n t h i s a l g o r i t h m , p r o c e s s e s

    c a n f a i l a s l o n g a s a m a j o r i t y r e m a i n s r e s p o n s i v e . S e c t i o n 9 s h o w s h o w m o d e l

    c h e c k i n g a n d i m p l e m e n t a t i o n a r e c o m b i n e d b y s h a r i n g C - c o d e .

    3

  • 8/6/2019 Virtual Shared Disk on Distributed Redundant Storage

    4/88

  • 8/6/2019 Virtual Shared Disk on Distributed Redundant Storage

    5/88

    t h e n b e r e c a l c u l a t e d u s i n g t h e p a r i t y s t r i p e . R A I D 5 c a n n o t r e c o v e r f r o m m o r e

    t h a n o n e d i s k f a i l u r e . B y d i s t r i b u t i n g t h e p a r i t y s t r i p e s o v e r d i e r e n t d i s k s ,

    p e r f o r m a n c e i n c r e a s e s w i t h t h e n u m b e r o f d i s k s ; a l t h o u g h w r i t e p e r f o r m a n c e

    w i l l s u e r f r o m t h e n e e d t o c a l c u l a t e p a r i t y s t r i p e s . T h e a r r a y a l s o e e c t i v e l y

    l o o s e s o n e d i s k w o r t h o f s t o r a g e d u e t o r e d u n d a n c y . R A I D 5 i s a c o m p r o m i s e

    b e t w e e n r e d u n d a n c y a n d s t o r a g e s i z e , g e n e r a l l y u s e d o n t h r e e o r m o r e d i s k s .

    R A I D 6 u s e s t w o p a r i t y s t r i p e s p e r g r o u p . T h i s l e v e l i s v e r y s i m i l a r t o

    R A I D 5 , b u t a l l o w s s i m u l t a n e o u s f a i l u r e o f t w o d i s k s i n s t e a d o f o n e . E s p e c i a l l y

    w h e n u s i n g a l a r g e n u m b e r o f d i s k s , t h e c h a n c e o f a s i m u l t a n e o u s d i s k f a i l u r e c a n

    b e c o m e l a r g e e n o u g h t o w a r r a n t t h i s a d d i t i o n a l r e d u n d a n c y . W r i t e p e r f o r m a n c e

    c a n b e l o w e r t h a n R A I D 5 , d u e t o t h e m o r e c o m p l e x c a l c u l a t i o n o f t h e t w o p a r i t y

    s t r i p e s . T w o d i s k s w o r t h o f s t o r a g e a r e l o s t d u e t o r e d u n d a n c y . R A I D 6 i s u s e d

    w h e n R A I D 5 i s n o t d e e m e d s e c u r e e n o u g h , u s u a l l y w i t h l a r g e r n u m b e r s o f

    d i s k s .

    R A I D l e v e l s c a n b e s t a c k e d t o a c h i e v e a n a p p r o p r i a t e b a l a n c e b e t w e e n p e r -

    f o r m a n c e , r e d u n d a n c y a n d s t o r a g e . A c o m m o n e x a m p l e i s R A I D 1 0 : d i s k s a r e

    r s t m i r r o r e d i n t o a g g r e g a t e d i s k s f o r r e d u n d a n c y u s i n g R A I D 1 , a f t e r w h i c h

    t h e s e a g g r e g a t e d i s k s a r e s t r i p e d t o g e t h e r f o r p e r f o r m a n c e u s i n g R A I D 0 . L e s s

    c o m m o n i s R A I D 0 1 , w h i c h i s s i m i l a r b u t o p p o s i t e t o R A I D 1 0 : i n s t e a d o f

    s t r i p i n g m i r r o r e d d i s k s , i t m i r r o r s s t r i p e d d i s k s . R A I D 1 0 i s p r e f e r r e d , b e c a u s e

    r e c o v e r y a f t e r a s i n g l e d i s k f a i l u r e r e q u i r e s m o r e d a t a t o b e r e s y n c h r o n i z e d f o r

    R A I D 0 1 , d u e t o i t s t r i p i n g b e f o r e m i r r o r i n g . A n o t h e r e x a m p l e i s R A I D 5 0 ,

    w h i c h s t r i p e s R A I D 5 a r r a y s t o g e t h e r t o i n c r e a s e p e r f o r m a n c e . T h i s s t a c k i n g o f

    s t o r a g e t e c h n i q u e s i s a c o m m o n p r a c t i c e f o r s t o r a g e s y s t e m s a n d n o t l i m i t e d t o

    R A I D l e v e l s .

    M e n t i o n e d b e f o r e , i s t h e i n c r e a s e d c h a n c e o f d i s k f a i l u r e w h e n a n a g g r e g a t e

    d i s k c o n s i s t s o f a l a r g e r n u m b e r o f d i s k s . O n e h a s t o k e e p i n m i n d t h a t w h i l e

    m u l t i p l e d i s k f a i l u r e s a r e l e s s p r o b a b l e t h a n s i n g l e d i s k f a i l u r e s , s i n g l e d i s k f a i l -

    u r e s a r e m o r e p r o b a b l e f o r a n a g g r e g a t e d i s k t h a n a s t a n d - a l o n e d i s k . D i s k s

    h a v e t o b e r e p l a c e d q u i c k l y b e f o r e t h e n e x t f a i l u r e o c c u r s , w h i c h c o u l d r e s u l t

    i n d a t a l o s s . F a i l i n g t o d o s o i n a t i m e l y m a n n e r o n l y i n c r e a s e s t h e c h a n c e o f

    a d d i t i o n a l f a i l u r e s . R A I D g i v e s t h e u s e r a w i n d o w o f o p p o r t u n i t y t o r e s t o r e

    r e d u n d a n c y .

    A l t h o u g h R A I D p r e v e n t s d a t a l o s s f r o m d i s k f a i l u r e , t r a n s i e n t o r p a r t i a l

    f a i l u r e s c a n s t i l l c o r r u p t d a t a . W h e n d i s k s b e c o m e a k y o r h a v e b a d s e c t o r s , i t

    i s u p t o t h e u s e r t o d e t e r m i n e a n d r e p l a c e t h e f a u l t y d r i v e t o r e p a i r t h e a r r a y .

    P a r i t y s t r i p e s s t o r e d i n a b a d s e c t o r m a y g o u n n o t i c e d u n t i l a r e g u l a r d i s k f a i l u r e

    o c c u r s , r e s u l t i n g i n d a t a l o s s . A s i m i l a r s i t u a t i o n c a n o c c u r w h e n p o w e r i s l o s t

    w h i l e w r i t i n g : p a r i t y s t r i p e s b e c o m e i n c o n s i s t e n t w i t h d a t a s t r i p e s . T h i s l a s t

    p r o b l e m i s c a l l e d t h e w r i t e h o l e a n d a e c t s b o t h R A I D 5 a n d R A I D 6 a r r a y s .

    B a t t e r y b a c k e d c o n t r o l l e r s a n d p o w e r s u p p l i e s a r e u s e d t o r e d u c e t h e r i s k . R A I D

    o n i t s o w n i s o n l y d e s i g n e d t o h a n d l e c o m p l e t e d i s k f a i l u r e s .

    5

  • 8/6/2019 Virtual Shared Disk on Distributed Redundant Storage

    6/88

    2 . 2 L o g i c a l v o l u m e m a n a g e m e n t

    L o g i c a l v o l u m e m a n a g e r s a r e a m o r e e x i b l e a l t e r n a t i v e t o p a r t i t i o n s : t h e y

    d i v i d e a n d c o m b i n e a v a i l a b l e s t o r a g e i n t o v i r t u a l d i s k s . T h e s e v i r t u a l d i s k s c a n

    a l s o b e e a s i l y m o v e d o r r e - s i z e d . E x a m p l e s a r e t h e L o g i c a l V o l u m e M a n a g e r

    ( L V M ) f o r L i n u x , t h e S o l a r i s V o l u m e M a n a g e r ( S V M ) , t h e L o g i c a l D i s k M a n a g e r

    o f M i c r o s o f t W i n d o w s , a n d t h e c r o s s p l a t f o r m V e r i t a s V o l u m e M a n a g e r ( V V M ) .

    O f t e n R A I D t e c h n i q u e s a r e e m p l o y e d t o e n s u r e r e l i a b i l i t y ; e i t h e r b y t h e v o l u m e

    m a n a g e r i t s e l f , o r t h e u n d e r l y i n g v i r t u a l d i s k s .

    T h e m a p p i n g o f s t o r a g e i n t o v i r t u a l d i s k s i s d i v i d e d i n t o s t e p s . F i r s t t h e u n -

    d e r l y i n g d i s k s , c a l l e d p h y s i c a l v o l u m e s ( P V s ) , a r e d i v i d e d i n t o x e d s i z e c h u n k s ,

    c a l l e d p h y s i c a l e x t e n t s ( P E s ) . T h e s e P E s , p o s s i b l y o r i g i n a t i n g f r o m d i e r e n t

    p h y s i c a l v o l u m e s , a r e a s s i g n e d t o a v o l u m e g r o u p ( V G ) . T h e V G a c t s a s a p o o l

    o f a v a i l a b l e s t o r a g e f o r v i r t u a l d i s k s . T h e p h y s i c a l e x t e n t s f r o m a v o l u m e g r o u p

    a r e c o n c a t e n a t e d t o f o r m o n e o r m o r e l o g i c a l v o l u m e s ( L V s ) . P h y s i c a l e x t e n t s

    a r e c a l l e d l o g i c a l e x t e n t s ( L E s ) i n t h e c o n t e x t o f t h e l o g i c a l v o l u m e t h e y b e l o n g

    t o . T h e s e s t e p s e n s u r e a e x i b l e m a p p i n g o f c h u n k s f r o m p h y s i c a l v o l u m e s t o

    l o g i c a l v o l u m e s .

    L o g i c a l v o l u m e s h a v e s e v e r a l a d v a n t a g e s o v e r c o n v e n t i o n a l p a r t i t i o n s . F o r

    e x a m p l e , l o g i c a l v o l u m e s d o n o t n e e d t o b e c o n t i g u o u s , a n d l o g i c a l e x t e n t s c a n

    b e m a p p e d i n a r b i t r a r y o r d e r o n t o p h y s i c a l e x t e n t s o f t h e b a c k i n g s t o r a g e . T h i s

    g r e a t l y s i m p l i e s r e s i z i n g a n d m o v i n g o f l o g i c a l v o l u m e s c o m p a r e d t o p a r t i t i o n s .

    A l t h o u g h p a r t i t i o n s a n d l o g i c a l v o l u m e m a n a g e r s h a v e o v e r l a p p i n g f u n c t i o n a l -

    i t i e s , t h e y c a n s t i l l b e u s e d t o g e t h e r . P a r t i t i o n s a r e o f t e n u s e d a s a b a s i s f o r

    p h y s i c a l v o l u m e s , p r e v e n t i n g o p e r a t i n g s y s t e m s f r o m i d e n t i f y i n g t h e d i s k a s

    e m p t y , w h e n l a c k i n g l o g i c a l v o l u m e m a n a g e r s u p p o r t .

    2 . 3 S t o r a g e a r e a n e t w o r k s

    A s t o r a g e a r e a n e t w o r k ( S A N ) c o n n e c t s c o m p u t e r s t o r e m o t e s t o r a g e , s i m i l a r t o

    h o w a l o c a l a r e a n e t w o r k ( L A N ) c o n n e c t s c o m p u t e r s t o r e m o t e s y s t e m s . S A N s

    t y p i c a l l y u s e b e r c h a n n e l o r E t h e r n e t n e t w o r k i n f r a s t r u c t u r e s t o p r o v i d e b l o c k

    l e v e l a c c e s s t o r e m o t e s t o r a g e : t h e s a m e l e v e l a s a p h y s i c a l d i s k . S p e c i a l i z e d

    p r o t o c o l s r u n o n t o p o f t h e b e r c h a n n e l o r E t h e r n e t , p o s s i b l y u s i n g i n t e r m e d i a t e

    p r o t o c o l s l i k e I P a n d T C P . T h e r e m o t e s t o r a g e c a n c o n s i s t o f p l a i n p h y s i c a l

    d i s k s , b u t m o r e o f t e n c o n s i s t s o f v i r t u a l d i s k s c r e a t e d f r o m R A I D a r r a y s u s i n g

    a n L V M . T h e s e l e v e l s o f i n d i r e c t i o n g i v e a l o t o f e x i b i l i t y ; s t o r a g e c a n b e

    c o n s o l i d a t e d a n d n o l o n g e r n e e d s t o b e d i r e c t l y c o n n e c t e d t o t h e m a c h i n e .

    A h i s t o r i c a l l y o f t e n u s e d d i r e c t a t t a c h e d s t o r a g e ( D A S ) i n t e r f a c e i n t h e e n t e r -

    p r i s e m a r k e t i s t h e S m a l l C o m p u t e r S y s t e m I n t e r f a c e ( S C S I ) . S e v e r a l w a y s e x i s t

    t o a d a p t t h i s p r o t o c o l t o a S A N . T h e F i b e r C h a n n e l P r o t o c o l ( F C P ) t r a n s p o r t s

    S C S I c o m m a n d s o v e r b e r c h a n n e l , w h i l e t h e I n t e r n e t S m a l l C o m p u t e r S y s t e m

    I n t e r f a c e ( i S C S I ) p r o t o c o l d o e s t h e s a m e o v e r T C P / I P . T h e t e r m i n o l o g y u s e d

    b y t h e s e p r o t o c o l s d e v i a t e s s o m e w h a t d u e t o t h e S C S I h e r i t a g e . S t o r a g e s e r v e r s

    a r e c a l l e d t a r g e t s , w h i l e c l i e n t s a r e c a l l e d i n i t i a t o r s ; c o n s i s t e n t w i t h r e s p e c t i v e l y

    t h e i n t e r f a c e s a n d c o n t r o l l e r s o n a S C S I b u s . A s i n g l e t a r g e t c a n e x p o r t m u l t i p l e

    6

  • 8/6/2019 Virtual Shared Disk on Distributed Redundant Storage

    7/88

    d i s k s , e a c h i d e n t i e d b y a L o g i c a l U n i t N u m b e r ( L U N ) . W h i l e o r i g i n a l l y a L U N

    w o u l d r e f e r t o a p h y s i c a l d r i v e , i n a S A N i t m o r e o f t e n r e f e r s t o a v i r t u a l d r i v e ,

    c o n s t r u c t e d u s i n g R A I D a n d o r L V M . A n i m p o r t a n t b e n e t o f i S C S I o v e r F C P

    i s t h e a b i l i t y t o u s e e x i s t i n g E t h e r n e t i n f r a s t r u c t u r e .

    T h e A T A o v e r E t h e r n e t ( A o E ) p r o t o c o l e n c a p s u l a t e s A T A c o m m a n d s i n

    s t a n d a r d E t h e r n e t f r a m e s . A d v a n c e d T e c h n o l o g y A t t a c h m e n t ( A T A ) i s a c o m -

    p e t i n g p r o t o c o l t o S C S I , p r i m a r i l y a i m e d a t d e s k t o p s y s t e m s . T h e b e n e t o f

    d i r e c t l y u s i n g E t h e r n e t i n s t e a d o f T C P / I P i s a r e d u c e d p r o t o c o l o v e r h e a d . C a l -

    c u l a t i o n o f T C P c h e c k s u m s f o r e x a m p l e p u t s a s i g n i c a n t s t r a i n o n t h e s y s t e m ;

    e n o u g h t o t r y a n d o o a d t h e s e c a l c u l a t i o n s t o d e d i c a t e d h a r d w a r e . S A N s b a s e d

    o n i S C S I o f t e n e m p l o y T C P O o a d E n g i n e s ( T O E ) o r e v e n f u l l i S C S I c o n t r o l l e r s

    t o i m p r o v e p e r f o r m a n c e , h a r d w a r e n o t n e e d e d w h e n u s i n g p l a i n E t h e r n e t . S i m i -

    l a r t e c h n i q u e s e x i s t f o r S C S I b a s e d S A N s ; e i t h e r e n c a p s u l a t e F i b r e C h a n n e l o v e r

    E t h e r n e t ( F C o E ) , o r t r a n s p o r t S C S I c o m m a n d s d i r e c t l y o n E t h e r n e t f r a m e s u s -

    i n g H y p e r S C S I . T h e d o w n s i d e t o u s i n g E t h e r n e t i s t h e i n a b i l i t y t o r o u t e t h e

    e n c a p s u l a t e d p r o t o c o l , w h i c h c a n b e c o n s i d e r e d a s e c u r i t y f e a t u r e d e p e n d i n g o n

    r e q u i r e m e n t s .

    C o n t r a r y t o A o E o r i S C S I p r o t o c o l s , w h i c h e n c a p s u l a t e e x i s t i n g D A S p r o t o -

    c o l s , t h e L i n u x N e t w o r k B l o c k D e v i c e ( N B D ) u s e s a c u s t o m p r o t o c o l f o r c o m -

    m u n i c a t i n g w i t h s t o r a g e . T h e N B D l i v e s a t t h e b l o c k d e v i c e l a y e r o f t h e l o -

    c a l o p e r a t i n g s y s t e m , f o r w a r d i n g I / O r e q u e s t o v e r T C P / I P t o r e m o t e s t o r a g e

    s e r v e r s . W h i l e t h e c l i e n t k e r n e l m o d u l e i s m e a n t t o r u n o n a L i n u x s y s t e m , t h e

    u s e r - s p a c e s e r v e r c a n r u n o n a n y U n i x b a s e d o p e r a t i n g s y s t e m . A l t e r n a t i v e s

    t o N B D a r e t h e E n h a n c e d N e t w o r k B l o c k D e v i c e ( E N B D ) a n d G l o b a l N e t w o r k

    B l o c k D e v i c e ( G N B D ) . E N B D i n t r o d u c e s a d d i t i o n a l c a p a b i l i t i e s t o t h e k e r n e l

    m o d u l e , f o r e x a m p l e m u l t i c h a n n e l f a i l o v e r ; w h i l e G N B D i s t u n e d s p e c i c a l l y

    f o r s h a r e d d i s k u s a g e t o g e t h e r w i t h t h e G l o b a l F i l e S y s t e m ( G F S ) . N B D b a s e d

    s t o r a g e i n t e g r a t e s e a s i l y i n a L i n u x e n v i r o n m e n t , a l t h o u g h i t d o e s n o t h a v e t h e

    i n t e r o p e r a b i l i t y t h a t A o E a n d i S C S I o e r .

    S A N s c a n b e u s e d t o s h a r e s t o r a g e b e t w e e n m u l t i p l e c o m p u t e r s , p o s s i b l y

    e v e n w i t h c o n c u r r e n t a c c e s s . T r a d i t i o n a l S C S I d i s k s c a n b e s h a r e d b y a t t a c h i n g

    m u l t i p l e c o n t r o l l e r s t o t h e s a m e S C S I b u s . T h e s e s h a r e d d i s k s e m a n t i c s c a n a l s o

    a p p l y t o S A N s , w i t h t h e a d d e d b e n e t o f l a r g e r a r e a n e t w o r k s a l l o w i n g s h a r e d

    d i s k s t o b e p l a c e d f u r t h e r a w a y . B a c k u p s c a n b e m a d e t o r e m o t e l o c a t i o n s t o

    p r e v e n t d a t a l o s s i n c a s e o f r e . D i s k s c a n b e m i g r a t e d t o a d i e r e n t s e r v e r

    p l a t f o r m w h e n h a r d w a r e f a i l s , w i t h o u t t h e n e e d t o p h y s i c a l l y m o v e t h e d i s k .

    S h a r e d d i s k l e s y s t e m s c a n b e u s e d c o n c u r r e n t l y t o s h a r e d a t a b e t w e e n n o d e s .

    E v e n c o m m o d i t y h a r d w a r e c a n b e u s e d t o c r e a t e s h a r e d d i s k s .

    2 . 4 N e t w o r k a t t a c h e d s t o r a g e

    W h i l e s t o r a g e i n a S A N i s s h a r e d a t t h e b l o c k l e v e l , N e t w o r k A t t a c h e d S t o r a g e

    ( N A S ) i s s h a r e d a t t h e l e s y s t e m l e v e l . D i s k s a r e f o r m a t t e d w i t h a l e s y s t e m o f

    c h o i c e a n d t h e n e x p o r t e d u s i n g a n e t w o r k l e s y s t e m . A S A N t y p i c a l l y h i d e s t h e

    r e m o t e n a t u r e o f d i s k b l o c k s f r o m t h e o p e r a t i n g s y s t e m , b u t a N A S e x p l i c i t l y

    s h a r e s r e m o t e l e s . S A N p r o t o c o l s a r e i m p l e m e n t e d a s d r i v e r s , w h i l e N A S

    7

  • 8/6/2019 Virtual Shared Disk on Distributed Redundant Storage

    8/88

    p r o t o c o l s a r e i m p l e m e n t e d h i g h e r i n t h e o p e r a t i n g s y s t e m s t o r a g e i n f r a s t r u c t u r e .

    A n i n h e r e n t b e n e t o f N A S i s l e - b a s e d a c c e s s c o n t r o l : a c c e s s c a n b e g r a n t e d

    o n a p e r l e o r d i r e c t o r y b a s i s , s i m i l a r t o a r e g u l a r l e s y s t e m . T h i s m a k e s N A S

    s o l u t i o n s b e t t e r s u i t e d f o r s i m p l e l e s h a r i n g t h a n S A N s , e s p e c i a l l y i n c o n s u m e r

    s y s t e m s . S A N a n d N A S t e c h n o l o g y a r e h o w e v e r n o t m u t u a l l y e x c l u s i v e ; a n

    o p e r a t i n g s y s t e m c a n d e l i v e r N A S s e r v i c e s b a s e d o n S A N s t o r a g e .

    C u r r e n t n e t w o r k l e s y s t e m s c a n b e a s s o c i a t e d w i t h t h e p l a t f o r m t h e y w e r e

    o r i g i n a l l y d e s i g n e d f o r . S e r v e r M e s s a g e B l o c k ( S M B ) a n d C o m m o n I n t e r n e t F i l e

    S y s t e m ( C I F S ) o r i g i n a t e f r o m M i c r o s o f t W i n d o w s , C I F S b e i n g a n e v o l u t i o n o f

    t h e e a r l i e r S M B p r o t o c o l . N e t w o r k F i l e S y s t e m ( N F S ) c a n b e u s e d t o e x p o r t l e

    s y s t e m s f o u n d o n L i n u x a n d o t h e r U n i x b a s e d o p e r a t i n g s y s t e m s . T h e A p p l e

    F i l i n g P r o t o c o l ( A F P ) , o r i g i n a l l y p a r t o f t h e A p p l e T a l k p r o t o c o l s u i t e , i s a

    p r o t o c o l f o r s h a r i n g l e s i n M a c O S . A l t h o u g h d i e r e n t p r o t o c o l s , a l l b e l o n g t o

    t h e f a m i l y o f n e t w o r k l e s y s t e m s .

    I n t e r o p e r a b i l i t y b e t w e e n n e t w o r k l e s y s t e m s a n d d i e r e n t o p e r a t i n g s y s t e m s

    i s p o s s i b l e . A p r i m e e x a m p l e i s t h e S a m b a p r o j e c t : a n o p e n s o u r c e i m p l e m e n -

    t a t i o n o f t h e S M B / C I F S p r o t o c o l . A s i m i l a r e o r t e x i s t s f o r A F P . T o g e t h e r

    t h e y e n a b l e L i n u x a n d o t h e r U n i x b a s e d o p e r a t i n g s y s t e m s t o s h a r e l e s w i t h

    b o t h M i c r o s o f t W i n d o w s a n d M a c O S . M a c O S i n t u r n i s c a p a b l e o f l e s h a r i n g

    t h r o u g h S M B a n d N F S . T o g u a r a n t e e c o m p a t i b i l i t y , m o s t N A S a p p l i a n c e s w i l l

    s u p p o r t a t l e a s t S M B / C I F S , N F S a n d A F S .

    T h e a b s t r a c t i o n o f l e s y s t e m s i n a V i r t u a l F i l e S y s t e m ( V F S ) l a y e r , m a k e s

    t r a n s p a r e n t a c c e s s t o n e t w o r k l e s y s t e m s p o s s i b l e . A V F S a l l o w s u n i f o r m a c c e s s

    t o d i e r e n t c o n c r e t e u n d e r l y i n g l e s y s t e m s . A n a p p l i c a t i o n c a n n o t d i s t i n g u i s h

    b e t w e e n a c c e s s i n g a l o c a l l e s y s t e m o r o n e a c c e s s e d v i a N A S p r o t o c o l s . E v e n

    p r o t o c o l s n o t t y p i c a l l y c l a s s i e d a s n e t w o r k l e s y s t e m s , c a n b e u s e d t o i m p l e -

    m e n t a V F S . I n L i n u x f o r e x a m p l e , t h e F i l e T r a n s f e r P r o t o c o l ( F T P ) a n d S e c u r e

    S h e l l ( S S H ) p r o t o c o l c a n b e u s e d t o a c c e s s r e m o t e l e s ; t h e y a r e t y p i c a l l y i m -

    p l e m e n t e d a s a F i l e s y s t e m i n U s e r - s p a c e ( F U S E ) . W h i l e t h e o p e r a t i n g s y s t e m

    i s f u l l y a w a r e o f t h e r e m o t e n a t u r e o f s o m e l e s y s t e m s , a p p l i c a t i o n s n e e d n o t

    b e .

    2 . 5 S h a r e d d i s k l e s y s t e m s

    S h a r e d d i s k s r e q u i r e s p e c i a l i z e d l e s y s t e m s f o r c o n c u r r e n t a c c e s s . A c o n v e n -

    t i o n a l l e s y s t e m w i l l c a u s e d a t a c o r r u p t i o n w h e n u s e d s i m u l t a n e o u s l y o n d i e r -

    e n t c o m p u t e r s . U n c o o r d i n a t e d i n s t a n c e s o f a l e s y s t e m c a n i n t e r f e r e w i t h e a c h

    o t h e r w h e n u p d a t i n g d i s k b l o c k s o f s h a r e d l e s y s t e m d a t a s t r u c t u r e s . T h i s

    p r o b l e m i s o f t e n e x a c e r b a t e d b y t h e u s e o f c a c h i n g . T h e s y s t e m n e e d s t o p r e -

    v e n t s u c h c o n c u r r e n t m o d i c a t i o n s ; o f t e n b y u s i n g a d i s t r i b u t e d f o r m o f l o c k i n g .

    C o n v e n t i o n a l l o c k i n g o f l e s , m e a n t t o p r e v e n t c o n c u r r e n t a c c e s s b y l o c a l a p -

    p l i c a t i o n s , i s i n s u c i e n t . T h o s e l o c k s a r e i m p l e m e n t e d b y t h e l e s y s t e m a n d

    h e n c e s u b j e c t t o t h e s a m e l i m i t a t i o n s .

    T h e G l o b a l F i l e S y s t e m ( G F S ) i s a s h a r e d d i s k l e s y s t e m d e v e l o p e d b y

    R e d H a t . I t d e p e n d s o n t h e D i s t r i b u t e d L o c k M a n a g e r ( D L M ) f o r m a n a g i n g

    c o n c u r r e n t a c c e s s t o s h a r e d d i s k s . W h e n s h a r e d s t o r a g e i s n o t y e t a v a i l a b l e ,

    8

  • 8/6/2019 Virtual Shared Disk on Distributed Redundant Storage

    9/88

    o n e c a n u s e t h e G l o b a l N e t w o r k B l o c k D e v i c e ( G N B D ) s p e c i c a l l y d e s i g n e d f o r

    t h i s p u r p o s e . T h e O r a c l e C l u s t e r F i l e S y s t e m ( O C F S ) w a s o r i g i n a l l y c r e a t e d

    t o s t o r e d a t a b a s e l e s . I t h a s n o w b e e n e x t e n d e d t o a m o r e g e n e r a l p u r p o s e

    s h a r e d d i s k l e s y s t e m . L i k e G F S , i t u s e s D L M a s p a r t o f i t s c l u s t e r s o f t w a r e

    s t a c k . T h e Q u i c k F i l e S y s t e m ( Q F S ) f r o m S u n M i c r o s y s t e m s i s o f t e n u s e d

    i n c o n j u n c t i o n w i t h t h e i r S t o r a g e A r c h i v e M a n a g e r ( S A M ) . S A M c a n m o v e

    d a t a b e t w e e n d i e r e n t t y p e s o f s t o r a g e b a s e d o n u s a g e : a f o r m o f H i e r a r c h i c a l

    S t o r a g e M a n a g e m e n t ( H S M ) . Q F S u s e s a s i n g l e m e t a - d a t a s e r v e r t o c o o r d i n a t e

    c o n c u r r e n t a c c e s s .

    S h a r e d d i s k l e s y s t e m s u s e c l u s t e r t y p e s o f t w a r e t o s o l v e c o n c u r r e n c y p r o b -

    l e m s . G F S a n d O C F S u s e t h e D L M d i s t r i b u t e d l o c k m a n a g e r , w h i c h c o m e s a s

    p a r t o f a c l u s t e r s t a c k . Q F S u s e s t h e S u n C l u s t e r s y s t e m . A c o m m o n p r o b -

    l e m f o r c l u s t e r s a n d s u b s e q u e n t l y s h a r e d d i s k l e s y s t e m s i s d e t e c t i o n o f f a i l e d

    n o d e s . I t i s i m p o r t a n t t h a t n o d e s t h a t a p p e a r t o h a v e c r a s h e d c a n b e p r e v e n t e d

    f r o m r e s u m i n g l a t e r o n . T h i s i s c a l l e d f e n c i n g a n d r e q u i r e s h a r d w a r e s u p p o r t .

    W h e n n o c l u s t e r s t a c k i s a v a i l a b l e , t h e a b o v e l e s y s t e m s c a n s t i l l b e u s e d a s

    s t a n d a l o n e l e s y s t e m s .

    2 . 6 D i s t r i b u t e d l e s y s t e m s

    D i s t r i b u t e d l e s y s t e m s d i e r f r o m s h a r e d d i s k l e s y s t e m s i n t h e w a y d a t a

    i s s h a r e d . I n a s h a r e d d i s k l e s y s t e m , d a t a i s s h a r e d a t t h e b l o c k l e v e l b y

    u s i n g s h a r e d d i s k s ; t h e s h a r e d d i s k l e s y s t e m h a s a c o o r d i n a t i n g f u n c t i o n . I n

    a d i s t r i b u t e d l e s y s t e m , d a t a i s s h a r e d a t a h i g h e r l e v e l b y t h e d i s t r i b u t e d l e

    s y s t e m i t s e l f ; b l o c k s t o r a g e o r l e s y s t e m s a r e o n l y u s e d t o s t o r e d a t a . I n s h o r t ,

    a d i s t r i b u t e d l e s y s t e m s h a r e s d a t a s t o r e d o n d i s k s , w h i l e a s h a r e d d i s k l e

    s y s t e m s t o r e s d a t a o n s h a r e d d i s k s .

    L u s t r e i s a d i s t r i b u t e d l e s y s t e m m a i n t a i n e d b y S u n M i c r o s y s t e m s . I t s p l i t s

    t h e l e s y s t e m i n t o m e t a d a t a a n d l e d a t a . M e t a d a t a i s s t o r e d i n a s i n g l e m e t a

    d a t a t a r g e t ( M D T ) , w h i l e l e d a t a i s s t o r e d i n o n e o r m o r e o b j e c t s t o r a g e t a r g e t s

    ( O S T s ) . B o t h t y p e s o f t a r g e t s a r e b a c k e d b y s t a n d a l o n e l e s y s t e m s . A s e r v e r

    p r o v i d i n g a c c e s s t o t h e M D T o r O S T s i s c a l l e d a m e t a d a t a s e r v e r ( M D S ) o r

    o b j e c t s t o r a g e s e r v e r ( O S S ) , r e s p e c t i v e l y . H i g h a v a i l a b i l i t y i s a c h i e v e d b y u s i n g

    s h a r e d d i s k s , a l l o w i n g a n M D T o r O S T t o b e s h a r e d b e t w e e n t w o s e r v e r s . T h e

    s e r v e r s a r e t h e n c o n g u r e d a s a n a c t i v e / p a s s i v e p a i r : t h e p a s s i v e s e r v e r t a k e s

    o v e r w h e n t h e a c t i v e s e r v e r f a i l s . I n p r a c t i c e , t h e M D T i s a l w a y s s h a r e d : l o s i n g

    a c c e s s t o t h e M D T , m e a n s l o s i n g a c c e s s t o t h e c o m p l e t e d i s t r i b u t e d l e s y s t e m .

    A n O S T i s n o t a l w a y s s h a r e d : l o s i n g a c c e s s t o a n O S T , o n l y m e a n s l o s i n g a c c e s s

    t o t h e l e s s t o r e d o n t h a t O S T .

    G l u s t e r F S i s a d i s t r i b u t e d l e s y s t e m b a s e d o n t r a n s l a t o r s , a n i d e a i n s p i r e d

    b y t h e G N U / H e r d o p e r a t i n g s y s t e m . C l i e n t s a c c e s s s t o r a g e o n t h e s e r v e r s

    t h r o u g h a s e r i e s o f t r a n s l a t o r s , w h i c h d e t e r m i n e t h e b e h a v i o r o f t h e s y s t e m .

    T r a n s l a t o r s a r e s p e c i e d i n a v o l u m e l e a n d c a n b e m a d e t o r u n o n b o t h c l i e n t s

    a n d s e r v e r s . G l u s t e r F S u s e s P O S I X b a s e d l e s y s t e m s a s a s t a r t i n g p o i n t t o

    s t o r e l e s : d i r e c t o r i e s c a n b e i m p o r t e d u s i n g t h e p o s i x t r a n s l a t o r . T h e r e a r e

    l o t s o f a d d i t i o n a l t r a n s l a t o r s a v a i l a b l e : t o s e r v e o r a c c e s s v o l u m e s o v e r a n e t -

    9

  • 8/6/2019 Virtual Shared Disk on Distributed Redundant Storage

    10/88

    w o r k , d i s t r i b u t e l e s o v e r m u l t i p l e s e r v e r s , r e a d a h e a d o r w r i t e b e h i n d , s t r i p e o r

    m i r r o r v o l u m e s , f a i l o v e r b e t w e e n s e r v e r s , e t c . I t i s l e f t u p t o t h e u s e r t o w r i t e

    i n t e r o p e r a b l e v o l u m e l e s f o r b o t h c l i e n t s a n d s e r v e r s .

    S i n c e d i s t r i b u t e d l e s y s t e m s s h a r e d a t a a t a h i g h e r l e v e l , o f t e n a b o v e t h e l e

    s y s t e m l e v e l , i t i s p o s s i b l e t o u s e o t h e r s t o r a g e t e c h n i q u e s a s b a c k i n g s t o r a g e . A s

    m e n t i o n e d e a r l i e r , L u s t r e u s e s s h a r e d d i s k s t o i n c r e a s e a v a i l a b i l i t y . G l u s t e r F S

    c o u l d p o t e n t i a l l y u s e s h a r e d d i s k l e s y s t e m s t o i m p r o v e a v a i l a b i l i t y o f l e s w h e n

    a s e r v e r g o e s d o w n . M o s t d i s t r i b u t e d l e s y s t e m s w i l l a l s o u s e R A I D o r L V M

    a t s o m e p o i n t t o i n c r e a s e r e l i a b i l i t y a n d e x i b i l i t y . I t r e a l l y s h o w s h o w s t o r a g e

    s y s t e m s c a n b e s t a c k e d .

    1 0

  • 8/6/2019 Virtual Shared Disk on Distributed Redundant Storage

    11/88

    3 U s e c a s e s o f a v i r t u a l s h a r e d d i s k

    T h i s s e c t i o n p r e s e n t s u s e c a s e s f o r a v i r t u a l s h a r e d d i s k . S i n c e i t c a n r e p l a c e

    c o n v e n t i o n a l s h a r e d d i s k s , w e l o o k a t s o m e t y p i c a l a p p l i c a t i o n s . A v i r t u a l s h a r e d

    d i s k s h o u l d b e a b l e t o f u n c t i o n c o r r e c t l y i n t h e s e s e t t i n g s . F i r s t i s s i m p l e n e t w o r k

    s h a r i n g o f b l o c k s t o r a g e i n s e c t i o n 3 . 1 . T h e n c o m e s p e r f o r m a n c e i m p r o v e m e n s b y

    u s i n g m u l t i p a t h i n s e c t i o n 3 . 2 . F i n a l l y s e c t i o n 3 . 3 s h o w s a p r a c t i c a l a p p l i c a t i o n

    o f s h a r e d d i s k s t o i m p r o v e a v a i l a b i l i t y o f s e r v i c e s .

    3 . 1 S h a r e d d i s k

    A v i r t u a l s h a r e d d i s k c a n r e p l a c e h a r d w a r e s o l u t i o n s f o r s h a r e d d i s k a p p l i c a t i o n s :

    s t o r i n g s t a n d a l o n e l e s y s t e m s , s h a r e d d i s k l e s y s t e m s , d i s t r i b u t e d l e s y s t e m s ,

    e t c . S h a r i n g a c c e s s t o s t o r a g e i m p r o v e s d a t a a v a i l a b i l i t y o n s e r v e r f a i l u r e . F o r

    s t a n d a l o n e l e s y s t e m s t h i s m e a n s a n o t h e r s e r v e r c a n m o u n t t h e l e s y s t e m ,

    w h i l e f o r s h a r e d a n d d i s t r i b u t e d l e s y s t e m s i t m e a n s o t h e r s e r v e r s c a n m a i n t a i n

    a c c e s s t o t h e l e s y s t e m . T h i s i s n o d i e r e n t f o r v i r t u a l s h a r e d d i s k s t h a n i t

    i s f o r h a r d w a r e s h a r e d d i s k s o l u t i o n s ; v i r t u a l s h a r e d d i s k s o f t w a r e c a n a c t a s a

    d r o p - i n r e p l a c e m e n t f o r s h a r e d d i s k h a r d w a r e .

    T h e a d d e d b e n e t o f v i r t u a l s h a r e d d i s k s i s s t o r a g e r e l i a b i l i t y . S i n g l e s h a r e d

    d i s k s c a n r e d u c e t h e i m p a c t o f s e r v e r f a i l u r e , b u t d o n o t p r o t e c t a g a i n s t s t o r a g e

    f a i l u r e . R e d u n d a n t h a r d w a r e s o l u t i o n s e x i s t b u t a r e g e n e r a l l y e x p e n s i v e . A v i r -

    t u a l s h a r e d d i s k c a n b e c o n s t r u c t e d u s i n g c o m m o d i t y h a r d w a r e , r e m o v i n g t h e

    n e e d t o r e l y o n p r o p r i e t a r y i m p l e m e n t a t i o n s . T h i s i s a l s o t r u e f o r u n d e r l y i n g

    l o g i c a l v o l u m e m a n a g e m e n t a n d R A I D i m p l e m e n t a t i o n s : p r o p r i e t a r y i m p l e m e n -

    t a t i o n s c a n c o m p l i c a t e d a t a r e c o v e r y . V i r t u a l s h a r e d d i s k s p r o t e c t a g a i n s t b o t h

    s e r v e r a n d s t o r a g e f a i l u r e s u s i n g c o m m o d i t y h a r d w a r e a n d s o f t w a r e .

    3 . 2 M u l t i p a t h

    V i r t u a l s h a r e d d i s k s h a v e i n h e r e n t p a r a l l e l i s m w h i c h c a n b e e x p l o i t e d f o r p e r -

    f o r m a n c e a n d r e l i a b i l i t y . H a r d w a r e - b a s e d s h a r e d d i s k s o l u t i o n s c a n h a v e b o t h

    i n t e r n a l a n d e x t e r n a l r e d u n d a n c y . I n t e r n a l l y t h e r e i s r e d u n d a n t s t o r a g e t o p r e -

    v e n t d a t a l o s s , w h i l e e x t e r n a l l y t h e r e i s r e d u n d a n t a c c e s s t o p r e v e n t c o m m u -

    n i c a t i o n f a i l u r e . B o t h r e l i a b i l i t y a n d p e r f o r m a n c e a r e i n c r e a s e d b y i n s t r u c t i n g

    h i g h e r l e v e l p r o t o c o l s t o u s e t h e m u l t i p l e e x t e r n a l a c c e s s p o r t s . T h i s t e c h n i q u e i s

    c a l l e d m u l t i p a t h : s t o r a g e c o m m a n d s a r e d i s t r i b u t e d o v e r p o r t s t o i n c r e a s e p e r -

    f o r m a n c e , o r c a n f a i l - o v e r t o o t h e r p o r t s t o i n c r e a s e r e l i a b i l i t y . V i r t u a l s h a r e d

    d i s k s c a n b e a c c e s s e d i n t h e s a m e p a r a l l e l m a n n e r .

    A v i r t u a l s h a r e d d i s k d i s t r i b u t e s d a t a o v e r m u l t i p l e l o c a t i o n s . T h i s i n a

    s e n s e c o m b i n e s t h e i n t e r n a l a n d e x t e r n a l r e d u n d a n c y o f h a r d w a r e s o l u t i o n s :

    e a c h l o c a t i o n a c t s a s b o t h r e d u n d a n t s t o r a g e a n d a c c e s s p o r t . S A N a n d N A S

    t e c h n i q u e s c a n e x p l o i t t h i s p a r a l l e l i s m t o i n c r e a s e r e l i a b i l i t y a n d p e r f o r m a n c e .

    F o r e x a m p l e , i S C S I c a n u s e m u l t i p a t h t e c h n i q u e s t o a c c e s s v i r t u a l s h a r e d d i s k s

    a t t h e S A N / b l o c k l e v e l . P a r a l l e l C I F S a n d N F S s o l u t i o n s i n c o m b i n a t i o n w i t h

    a s h a r e d d i s k l e s y s t e m o r d i s t r i b u t e d l e s y s t e m c a n e x p l o i t t h e p a r a l l e l i s m

    1 1

  • 8/6/2019 Virtual Shared Disk on Distributed Redundant Storage

    12/88

    a t t h e N A S / l e l e v e l . T h e i n h e r e n t p a r a l l e l i s m o f v i r t u a l s h a r e d d i s k s c o m b i n e s

    n a t u r a l l y w i t h h i g h e r - l e v e l p r o t o c o l s .

    3 . 3 H i g h a v a i l a b i l i t y c l u s t e r

    C o n c u r r e n t a c c e s s t o s h a r e d d i s k s n e e d s t o b e c o o r d i n a t e d . A l t h o u g h s h a r e d

    d i s k s a l l o w m u l t i p l e s e r v e r s t o a c c e s s d a t a i n p a r a l l e l , d o i n g s o m i g h t c o r r u p t

    t h e o v e r a l l d a t a s t r u c t u r e . S t a n d a l o n e l e s y s t e m s f o r e x a m p l e a r e n o t m e a n t

    t o b e u s e d c o n c u r r e n t l y , w h i l e s h a r e d d i s k a n d d i s t r i b u t e d l e s y s t e m s u s e l o c k s

    t o p r e v e n t c o n c u r r e n t a c c e s s w h e r e i t i s u n s a f e . W h e n a s e r v e r f a i l s , a l l i t s l o c k s

    n e e d t o b e r e l e a s e d t o a l l o w f a i l - o v e r t o a n o t h e r s e r v e r . T h e r e a l s o n e e d s t o b e

    a g u a r a n t e e t h a t t h e f a i l e d p r o c e s s d o e s n o t r e s u m e o p e r a t i o n l a t e r o n . T h e

    p r o b l e m b e c o m e s o n e o f d e t e c t i n g f a i l e d p r o c e s s e s .

    A h i g h a v a i l a b i l i t y c l u s t e r p r o v i d e s t h e n e c e s s a r y i n f r a s t r u c t u r e f o r f a i l - o v e r .

    I n a n a s y n c h r o n o u s n e t w o r k , l i k e E t h e r n e t , i t i s i m p o s s i b l e t o d i s t i n g u i s h b e -

    t w e e n f a i l e d a n d s l o w p r o c e s s e s . T o g e t a f o r m o f f a i l u r e d e t e c t i o n , a h i g h

    a v a i l a b i l i t y c l u s t e r u s e s h e a r t b e a t m e s s a g e s : i f a s e r v e r s t o p s r e s p o n d i n g t o

    h e a r t b e a t m e s s a g e s i t i s c o n s i d e r e d t o h a v e f a i l e d . T h e r e i s h o w e v e r n o g u a r -

    a n t e e o f f a i l u r e : t h e s e r v e r c o u l d j u s t a s w e l l h a v e b e e n s l o w . T o p r e v e n t t h e

    s e r v e r f r o m r e s u m i n g l a t e r o n , i t i s f e n c e d . F e n c i n g m e a n s t h e c l u s t e r r e m o v e s

    t h e p r e s u m e d f a u l t y s e r v e r f r o m t h e s y s t e m b y f o r e x a m p l e c u t t i n g i t s p o w e r ,

    o r i n s t r u c t i n g t h e s t o r a g e s y s t e m t o d e n y f u r t h e r a c c e s s . H a r d w a r e s u p p o r t i s

    r e q u i r e d f o r r e l i a b l e f e n c i n g .

    F e n c i n g c a n l e a d t o p r o b l e m s w h e n t h e c l u s t e r s p l i t s u p . I t i s p o s s i b l e f o r

    p a r t s o f t h e s y s t e m t o g e t i s o l a t e d f r o m o n e a n o t h e r d u e t o n e t w o r k p a r t i t i o n s .

    T h i s s i t u a t i o n i s c a l l e d a s p l i t - b r a i n : t h e d i e r e n t p a r t s c o n t i n u e t o o p e r a t e

    a n d s t a r t t o m a k e p o s s i b l y c o n i c t i n g d e c i s i o n s . P a r t i t i o n s c a n f o r e x a m p l e

    s t a r t f e n c i n g e a c h o t h e r , b r i n g i n g t h e w h o l e c l u s t e r d o w n . A v i r t u a l s h a r e d d i s k

    i m p l e m e n t e d u s i n g t h e c l u s t e r i n f r a s t r u c t u r e , c o u l d r e c e i v e d i e r e n t w r i t e s f o r

    e a c h p a r t i t i o n . I t i s v e r y d i c u l t t o d e c i d e w h i c h v e r s i o n o f t h e d i s k t o u s e

    w h e n t h e c l u s t e r p a r t i t i o n s a r e r e c o m b i n e d . T o p r e v e n t t h e s e p r o b l e m s f r o m

    h a p p e n i n g , a q u o r u m i s u s e d : o n l y p a r t i t i o n s c o n t a i n i n g a m a j o r i t y o f c l u s t e r

    n o d e s c a n m a k e d e c i s i o n s .

    A v i r t u a l s h a r e d d i s k c a n o p e r a t e i n d e p e n d e n t o f t h e c l u s t e r i n f r a s t r u c t u r e .

    A p p l y i n g R A I D t o s h a r e d d i s k s w o u l d r e q u i r e s p e c i a l f a i l - o v e r f a c i l i t i e s t o p r e -

    v e n t c o n c u r r e n t a c c e s s t o R A I D m e m b e r s . V i r t u a l s h a r e d d i s k s n a t i v e l y i n -

    c o r p o r a t e q u o r u m a n d c a n d o w i t h o u t f a i l u r e d e t e c t i o n . T h i s i s b e c a u s e t h e

    c o n s e n s u s n e e d e d t o d e t e r m i n e f a i l e d n o d e s i s a s t r o n g e r p r i m i t i v e t h a n t h e

    s e q u e n t i a l c o n s i s t e n c y n e e d e d t o a l l o w c o n c u r r e n t a c c e s s . T h e b e n e t i s t h a t

    v i r t u a l s h a r e d d i s k s c a n b e u s e d c o n c u r r e n t l y i n a h i g h a v a i l a b i l i t y c l u s t e r .

    1 2

  • 8/6/2019 Virtual Shared Disk on Distributed Redundant Storage

    13/88

    4 S u r v e y o f r e l a t e d w o r k

    T h i s s e c t i o n e x p l o r e s t h e t h e o r y n e e d e d t o c o n s t r u c t a v i r t u a l s h a r e d d i s k . I t

    a l s o l o o k s a t t h e s o l u t i o n s u s e d b y c o m p e t i n g i m p l e m e n t a t i o n s . C e n t r a l t o

    t h e c o n s t r u c t i o n o f a v i r t u a l s h a r e d d i s k i s t h e i m p o s s i b i l i t y o f d e t e r m i n i s t i c

    c o n s e n s u s w h e n p r o c e s s e s c a n f a i l . S e c t i o n 4 . 1 l o o k s a t t h e p r o b l e m i n m o r e

    d e t a i l . S e c t i o n 4 . 2 i n v e s t i g a t e s w h y t h i s i s s u e d o e s n o t s e e m t o a e c t a t o m i c

    r e g i s t e r s i n t h e i r a b i l i t y t o p r o v i d e s h a r e d a c c e s s t o a s i n g l e v a l u e . A p r o m i s i n g

    a v e n u e f o r c o n s t r u c t i o n o f a v i r t u a l s h a r e d d i s k .

    B u t w h a t k i n d o f b e h a v i o u r s h o u l d w e e x p e c t f r o m a v i r t u a l s h a r e d d i s k ?

    S e c t i o n 4 . 3 l o o k s a t m o d e l s f o r d i e r e n t t y p e s o f c o n s i s t e n t b e h a v i o u r , f o l l o w e d

    b y s e c t i o n 4 . 4 d e s c r i b i n g t h e c h o i c e o f m o d e l m a d e f o r v i r t u a l s h a r e d d i s k s . T h i s

    l e a v e s s e c t i o n 4 . 5 t o i n v e s t i g a t e c o m p e t i n g s o l u t i o n s f o r s h a r e d d i s k s e m a n t i c s .

    4 . 1 D i s t r i b u t e d c o n s e n s u s

    D e t e r m i n i s t i c c o n s e n s u s i s i m p o s s i b l e i n a n a s y n c h r o n o u s d i s t r i b u t e d s y s t e m

    w i t h e v e n o n e f a u l t y p r o c e s s . T h i s i m p o r t a n t t h e o r e m i s p r o v e d b y F i s c h e r

    a n d o t h e r s [ 2 0 ] . T h e r e a r e h o w e v e r o t h e r m e t h o d s o f r e a c h i n g c o n s e n s u s i n a

    d i s t r i b u t e d s y s t e m , g e n e r a l l y b y c h a n g i n g t h e a s s u m p t i o n s o f t h e i m p o s s i b i l i t y

    p r o o f .

    F o r e x a m p l e p a r t i a l s y n c h r o n y [ 1 8 ] a s s u m e s s o m e u n k n o w n o r f u t u r e u p p e r

    b o u n d s e x i s t f o r m e s s a g e l a t e n c y a n d r e l a t i v e s p e e d s o f p r o c e s s e s . I n s o m e

    c a s e s f a i l u r e d e t e c t o r s [ 1 ] c a n b e u s e d t o d i s t i n g u i s h b e t w e e n s l o w a n d f a u l t y

    p r o c e s s e s . O n e c a n a l s o w e a k e n t h e p r o p e r t y o f g u a r a n t e e d t e r m i n a t i o n t o

    p r o b a b i l i s t i c t e r m i n a t i o n [ 1 2 ] .

    C o n t r a r y t o a t o m i c r e g i s t e r s h o w e v e r , d e t e r m i n i s t i c c o n s e n s u s c a n n o t b e

    m a d e f a u l t - t o l e r a n t i n a n a s y n c h r o n o u s s y s t e m .

    4 . 1 . 1 I m p o s s i b i l i t y o f d e t e r m i n i s t i c c o n s e n s u s

    A f u n d a m e n t a l p r o b l e m i n d i s t r i b u t e d c o m p u t i n g i s t h a t o f r e a c h i n g a g r e e m e n t

    b e t w e e n a s y n c h r o n o u s p r o c e s s e s . T a k e a s y s t e m o f p r o c e s s e s , w i t h d i v e r g e n t

    i n p u t v a l u e s , a n d m a k e t h e m d e c i d e o n a c o m m o n o u t p u t v a l u e . A c o n s e n s u s

    p r o t o c o l s o l v i n g t h i s p r o b l e m m u s t b e c o n s i s t e n t : a l l d e c i d i n g p r o c e s s e s a g r e e

    o n t h e s a m e v a l u e . T h e p r o t o c o l m u s t b e t e r m i n a t i n g : a l l c o r r e c t p r o c e s s e s

    m u s t d e c i d e . A n d n a l l y t h e p r o t o c o l m u s t b e n o n - t r i v i a l : t h e d e c i s i o n s h o u l d

    d e p e n d o n t h e i n p u t . T h e p r o o f o f F i s c h e r , L y n c h a n d P a t e r s o n [ 2 0 ] s h o w s t h e

    i m p o s s i b i l i t y o f s u c h a p r o t o c o l w h e n c o n f r o n t e d w i t h e v e n o n e f a u l t y p r o c e s s .

    C o n s i d e r a s y s t e m o f p r o c e s s e s t r y i n g t o r e a c h c o n s e n s u s o v e r a b o o l e a n

    v a l u e . P r o c e s s e s c a n d e c i d e 0 o r 1 . T h e c o m b i n e d s t a t e s o f t h e i n d i v i d u a l p r o -

    c e s s e s a n d m e s s a g e c h a n n e l d e n e t h e c o n g u r a t i o n o f t h e s y s t e m . A t r a n s i t i o n

    f r o m o n e c o n g u r a t i o n t o t h e n e x t i s a c h i e v e d b y a p p l y i n g e v e n t s : t h e r e c e p t i o n

    o f a m e s s a g e b y a p r o c e s s a n d t h e r e s u l t i n g r e s p o n s e . T h e r e c e i v i n g p r o c e s s

    s e n d s a n i t e n u m b e r o f m e s s a g e s a n d p o s s i b l y d e c i d e s o n a v a l u e , i n e i t h e r

    w a y e n d i n g t h e t r a n s i t i o n . C o n g u r a t i o n s a r e 0 - v a l e n t w h e n , s t a r t i n g f r o m t h e

    1 3

  • 8/6/2019 Virtual Shared Disk on Distributed Redundant Storage

    14/88

    c o n g u r a t i o n , o n l y 0 c a n e v e n t u a l l y b e d e c i d e d ; 1 - v a l e n t w h e n o n l y 1 c a n b e

    d e c i d e d . W h e n b o t h 0 a n d 1 c a n s t i l l b e d e c i d e d , t h e c o n g u r a t i o n i s c a l l e d

    b i v a l e n t .

    A s s u m e a p r o t o c o l e x i s t s f o r r e a c h i n g d e t e r m i n i s t i c c o n s e n s u s i n a n a s y n -

    c h r o n o u s s y s t e m . A p r o o f b y i n d u c t i o n w i l l s h o w a c o n t r a d i c t i o n w h e n e v e n

    o n e p r o c e s s i s a l l o w e d t o c r a s h . A s t h e b a s e c a s e , i t c a n b e s h o w n t h a t t h e r e

    i s a b i v a l e n t c o n g u r a t i o n i n t h e g r o u p o f i n i t i a l c o n g u r a t i o n s . F o r t h e i n -

    d u c t i o n s t e p p i c k a n e v e n t , t h e n w e c a n d i v i d e r e a c h a b l e c o n g u r a t i o n s i n t w o

    g r o u p s . O n e g r o u p w i l l b e r e a c h a b l e b y a p p l y i n g t h e e v e n t a t s o m e p o i n t , t h e

    o t h e r w i t h o u t a p p l y i n g t h e e v e n t . T h e r s t o f t h e s e g r o u p s w i l l a g a i n c o n t a i n a

    b i v a l e n t c o n g u r a t i o n .

    S t a r t i n g f r o m a b i v a l e n t i n i t i a l c o n g u r a t i o n , i t i s p o s s i b l e t o o n l y a p p l y

    e v e n t s t h a t t r a n s i t i o n t o a n o t h e r b i v a l e n t c o n g u r a t i o n . P i c k a n e v e n t t h a t w i l l

    b e d e l a y e d i n d e n i t e l y b e c a u s e o f a p r o c e s s c r a s h . A c c o r d i n g t o t h e i n d u c t i o n -

    s t e p , t h e r e i s a s e q u e n c e o f e v e n t s a f t e r w h i c h a p p l y i n g e v e n t e w o u l d y i e l d a

    b i v a l e n t c o n g u r a t i o n . A p p l y t h e r s t e v e n t o f t h i s s e q u e n c e t o r e a c h a n o t h e r

    b i v a l e n t c o n g u r a t i o n .

    T h e s y s t e m c a n c o n n e i t s e l f t o b i v a l e n t c o n g u r a t i o n s : n o d e c i s i o n i s e v e r

    m a d e . T h i s c o n t r a d i c t s t h e t e r m i n a t i o n p r o p e r t y o f t h e a s s u m e d c o n s e n s u s

    p r o t o c o l . T h e r e i s n o d e t e r m i n i s t i c o n e - c r a s h r e s i l i e n t c o n s e n s u s p r o t o c o l .

    4 . 1 . 2 P a x o s

    P a x o s [ 3 2 , 3 0 ] i s a p r o t o c o l f o r r e a c h i n g p r o b a b i l i s t i c d i s t r i b u t e d c o n s e n s u s u s i n g

    c l o c k s . T o r e a c h a g r e e m e n t , v o t e s a r e c a s t i n m u l t i p l e r o u n d s , c a l l e d b a l l o t s .

    E a c h b a l l o t r e q u i r e s a u n i q u e n u m b e r , a q u o r u m t h a t w i l l o v e r l a p w i t h o t h e r

    b a l l o t s , a n d a d e c r e e i d e n t i c a l t o t h e m o s t r e c e n t d e c r e e a q u o r u m n o d e p r e v i -

    o u s l y v o t e d f o r . W h e n n o p r e v i o u s d e c r e e i s a v a i l a b l e a n e w o n e c a n b e c r e a t e d .

    A d e c r e e i s a c c e p t e d w h e n a l l n o d e s i n a q u o r u m v o t e f o r i t .

    B a l l o t s c o n s i s t o f r o u g h l y t w o p h a s e s . D u r i n g t h e b a l l o t s , n o d e s k e e p t r a c k

    o f t h e l a s t b a l l o t n u m b e r s t a r t e d , t h e l a s t b a l l o t n u m b e r r e c e i v e d , a n d t h e l a s t

    v o t e c a s t . A v o t e c o n s i s t s o f a n o d e ' s i d e n t i t y , a b a l l o t n u m b e r a n d a d e c r e e .

    E a c h b a l l o t n u m b e r c a n b e e x t e n d e d w i t h t h e i d e n t i t y o f t h e n o d e t h a t c r e a t e d

    i t . T h i s p r e v e n t s d u p l i c a t e b a l l o t n u m b e r s w h e n m u l t i p l e n o d e s c o n c u r r e n t l y

    s t a r t a n e w r o u n d . M a j o r i t i e s a r e u s e d t o e n s u r e q u o r u m s o f b a l l o t s h a v e a t

    l e a s t o n e n o d e i n c o m m o n .

    A r o u n d s t a r t s w i t h a n o d e c h o o s i n g a n e w b a l l o t n u m b e r , g r e a t e r t h a n t h e

    o n e i t u s e d l a s t t i m e . T h e n i t s e n d s a m e s s a g e c o n t a i n i n g t h i s n e w n u m b e r

    t o a l l o r p o s s i b l y a s u b s e t o f n o d e s . N o d e s o n l y r e s p o n d t o t h e m e s s a g e w h e n

    t h e b a l l o t n u m b e r i s l a r g e r t h a n t h e l a s t b a l l o t n u m b e r t h e y r e c e i v e d . I f t h i s

    i s t r u e , t h e n o d e w i l l a l s o r e c o r d t h e b a l l o t n u m b e r . T h e r e s p o n s e c o n t a i n s t h e

    b a l l o t n u m b e r a n d t h e l a s t v o t e t h e n o d e c a s t i n o l d e r b a l l o t s . E v e n t u a l l y t h e

    i n i t i a t i n g n o d e w i l l l e a r n o f t h e p r e v i o u s v o t e s c a s t f o r a m a j o r i t y o f n o d e s i n

    t h e s y s t e m .

    W h e n a m a j o r i t y h a s r e s p o n d e d , t h e i n i t i a t i n g n o d e c a n s t a r t t h e a c t u a l

    b a l l o t . I t s e n d s i t s d e c r e e a n d b a l l o t n u m b e r t o t h e o t h e r n o d e s , u s i n g t h e s a m e

    1 4

  • 8/6/2019 Virtual Shared Disk on Distributed Redundant Storage

    15/88

    m a j o r i t y a s i t s q u o r u m . T h e d e c r e e m u s t b e i d e n t i c a l t o t h e l a s t v o t e c a s t b y

    a n y o f t h e q u o r u m n o d e s . I f n o v o t e s h a v e b e e n p r e v i o u s l y c a s t , t h e n o d e c a n

    c h o o s e a d e c r e e o f i t s o w n . N o d e s o n l y r e s p o n d t o t h e m e s s a g e w h e n t h e b a l l o t

    n u m b e r e q u a l s t h e b a l l o t n u m b e r r e c o r d e d e a r l i e r . I f t h i s i s t r u e , t h e n o d e w i l l

    a l s o r e c o r d i t s v o t e . T h e r e s p o n s e c o n t a i n s t h e b a l l o t n u m b e r a n d t h e i d e n t i t y

    o f t h e n o d e . E v e n t u a l l y t h e i n i t i a t i n g n o d e c a n r e c e i v e v o t e s f r o m a m a j o r i t y o f

    n o d e s i n t h e s y s t e m .

    W h e n t h e q u o r u m h a s v o t e d f o r t h e d e c r e e , t h e i n i t i a t i n g n o d e r e c o r d s t h e

    d e c r e e a n d i n f o r m s a l l o t h e r n o d e s o f i t s s u c c e s s . T h e r e i s h o w e v e r n o g u a r a n t e e

    t h a t a l l t h e n o d e s i n t h e q u o r u m w i l l r e s p o n d : n o d e s m i g h t h a v e c r a s h e d . T h e

    p r o t o c o l , a s d e s c r i b e d , e n s u r e s s a f e t y b u t n o t l i v e n e s s . B a l l o t s h a v e t o b e s t a r t e d

    r e p e a t e d l y u n t i l o n e s u c c e e d s . T o o m a n y c o n c u r r e n t b a l l o t s c a n h o w e v e r p r e v e n t

    p r o g r e s s .

    I n i t i a t i n g a b a l l o t w i t h a h i g h b a l l o t n u m b e r , w i l l p r e v e n t n o d e s f r o m p a r t i c i -

    p a t i n g i n p r e v i o u s b a l l o t s . T h i s c a n p r e v e n t a n y p r e v i o u s b a l l o t f r o m s u c c e e d i n g .

    T o p r e v e n t t h i s f r o m h a p p e n i n g , t i m e r s a r e u s e d t o s t a r t n e w b a l l o t s w h e n t h e

    p r e v i o u s o n e d i d n o t r e a c h i t s q u o r u m . B a s e d o n m a x i m u m m e s s a g e a n d p r o -

    c e s s i n g d e l a y , t h e y l i m i t t h e r a t e a t w h i c h b a l l o t s c a n b e i n i t i a t e d . A d d i t i o n a l l y

    a p r e s i d e n t c a n b e c h o s e n t o i n i t i a t e b a l l o t s , p r e v e n t i n g c o n c u r r e n c y .

    4 . 2 A t o m i c r e g i s t e r s

    T r a d i t i o n a l l y a c c e s s t o s h a r e d d a t a s t r u c t u r e s i s c o n t r o l l e d u s i n g l o c k s . L o c k s

    p r e v e n t c o n c u r r e n t o p e r a t i o n s t h a t c o u l d o t h e r w i s e i n t e r f e r e w i t h e a c h o t h e r :

    l i k e r e a d i n g w h i l e w r i t i n g . T h i s h o w e v e r , g i v e s r i s e t o a p r o b l e m o f m u t u a l

    e x c l u s i o n , w h e r e o n e p r o c e s s b l o c k s a c c e s s f o r a l l o t h e r p r o c e s s e s . P e t e r s o n

    [ 3 8 , 3 9 ] s h o w s h o w c o n c u r r e n t a c c e s s t o l a r g e d a t a s t r u c t u r e s c a n i n s t e a d b e

    m a d e w a i t - f r e e . W a i t - f r e e m e a n s t h a t o p e r a t i o n s t a k e a n i t e n u m b e r s o f s t e p s ,

    i n d e p e n d e n t u p o n t h e s p e e d o f o t h e r p r o c e s s e s . T h i s p r e v e n t s a p r o c e s s f r o m

    l o c k i n g o u t o t h e r s .

    T h e s i m p l e s t o f s h a r e d d a t a s t r u c t u r e s i s t h e s h a r e d r e g i s t e r , w h i c h s t o r e s

    o n l y a s i n g l e v a r i a b l e . L a m p o r t [ 3 1 ] d e s c r i b e s h o w o n e c a n c o n s t r u c t s u c h a r e g -

    i s t e r a n d w h a t p r o p e r t i e s i t m i g h t h a v e . T h e s e p r o p e r t i e s c a n b e s t r e n g t h e n e d

    b y i m p l e m e n t i n g n e w r e g i s t e r s o n t o p o f w e a k e r o n e s . T h e p r o p o s e d a t o m i c

    r e g i s t e r s a r e h o w e v e r s i n g l e - w r i t e r a n d n o a t o m i c m u l t i - r e a d e r r e g i s t e r i s c o n -

    s t r u c t e d .

    A t o m i c r e g i s t e r s b e h a v e a s i f t h e r e i s a s e q u e n t i a l o r d e r o n o p e r a t i o n s : a s i f

    a l l c o n c u r r e n t a c c e s s c a n b e l i n e a r i z e d . T h e p r o b l e m o f a n a t o m i c s i n g l e - w r i t e r

    m u l t i - r e a d e r r e g i s t e r i s s o l v e d i n [ 4 ] f o r e x p o n e n t i a l t i m e a n d i m p r o v e d u p o n i n

    [ 4 3 ] t o p o l y n o m i a l t i m e . O t h e r s o l u t i o n s a r e p r e s e n t e d i n [ 3 8 , 7 , 3 6 ] .

    A s o l u t i o n f o r a t o m i c m u l t i - w r i t e r m u l t i - r e a d e r r e g i s t e r s i s r s t p r o p o s e d i n

    [ 4 5 ] b u t f o u n d t o b e i n c o r r e c t . L a t e r s o l u t i o n s i n c l u d e [ 3 9 , 3 4 , 1 5 ] . A n o p t i m a l

    a t o m i c m u l t i - w r i t e r m u l t i - r e a d e r r e g i s t e r i s c o n s t r u c t e d b y I s r a e l i a n d S h a h a m

    [ 2 8 ] u s i n g p r e c e d e n c e g r a p h s .

    A l t h o u g h a t o m i c r e g i s t e r s a r e w a i t - f r e e , t h e y a r e s t i l l s u s c e p t i b l e t o u n a v a i l -

    a b i l i t y o f u n d e r l y i n g r e g i s t e r s . W a i t - f r e e n e s s o n l y a p p l i e s t o t h e r e l a t i v e s p e e d

    1 5

  • 8/6/2019 Virtual Shared Disk on Distributed Redundant Storage

    16/88

    o f r e a d e r s a n d w r i t e r s u s i n g t h e c o n s t r u c t e d r e g i s t e r , n o t t o t h e s p e e d o f t h e

    r e g i s t e r s i t i s c o n s t r u c t e d o n . T h i s i s e s p e c i a l l y i m p o r t a n t w h e n r e a d e r a n d

    w r i t e r p r o c e s s e s a l s o i m p l e m e n t t h e u n d e r l y i n g r e g i s t e r s ; a s l o w r e g i s t e r c o u l d

    s t a l l o t h e r p r o c e s s e s , n e g a t i n g t h e b e n e t s o f a w a i t - f r e e a l g o r i t h m . A t t i y a a n d

    o t h e r s [ 6 ] s h o w h o w a n a t o m i c s i n g l e - w r i t e r m u l t i - r e a d e r r e g i s t e r c a n b e c o n -

    s t r u c t e d , w h i l e o n l y c o m m u n i c a t i n g w i t h a m a j o r i t y o f p r o c e s s e s . T h i s e n a b l e s

    w a i t - f r e e a l g o r i t h m s , b a s e d o n s i n g l e - w r i t e r m u l t i - r e a d e r r e g i s t e r s , t o r u n i n d i s -

    t r i b u t e d s y s t e m s w i t h f a u l t y p r o c e s s e s . F o r a s i m i l a r t e c h n i q u e u s i n g t h e m o r e

    g e n e r a l c o n c e p t o f q u o r u m s e e H e r l i h y [ 2 4 ] , w h o u s e s o v e r l a p p i n g p r o c e s s g r o u p s

    t o r e p l i c a t e o b j e c t s . W h e n a r e g u l a r q u o r u m i s n o t a v a i l a b l e , g h o s t p r o c e s s e s

    [ 4 4 ] c a n b e t e m p o r a r i l y i n t r o d u c e d t o m a i n t a i n a v a i l a b i l i t y . S i n c e a t o m i c r e g i s -

    t e r s c a n b e m a d e f a u l t - t o l e r a n t u s i n g m a j o r i t i e s o r q u o r u m , s o c a n t h e r e g i s t e r s

    c o n s t r u c t e d o n t o p o f t h e m .

    T h e p e r f o r m a n c e o f a t o m i c s i n g l e - w r i t e r r e g i s t e r s c a n b e i m p r o v e d b y l i m -

    i t i n g t h e n u m b e r o f r e a d e r s . D u t t a a n d o t h e r s [ 1 7 ] s h o w h o w b o t h r e a d s a n d

    w r i t e s c a n b e a c c o m p l i s h e d i n o n e c o m m u n i c a t i o n r o u n d - t r i p f o r s i n g l e - w r i t e r

    r e g i s t e r s , a n d w h y t h i s i s i m p o s s i b l e f o r m u l t i - w r i t e r o n e s . A t o m i c r e g i s t e r s

    w h e r e r e a d s a n d w r i t e s o n l y t a k e o n e r o u n d - t r i p a r e c a l l e d f a s t . S o c a l l e d s e m i

    f a s t [ 2 2 ] i m p l e m e n t a t i o n s d o n o t l i m i t t h e n u m b e r o f r e a d e r s : r e a d s t r y t o u s e

    o n e r o u n d - t r i p , b u t c a n f a l l b a c k o n a s e c o n d r o u n d - t r i p w h e n u n s u c c e s s f u l . T h e

    r e s u l t i n g t r a d e - o b e t w e e n f a u l t - t o l e r a n c e a n d p e r f o r m a n c e i s f u r t h e r s t u d i e d

    b y G e o r g i o u a n d o t h e r s [ 2 1 ] .

    4 . 2 . 1 S i n g l e - w r i t e r m u l t i - r e a d e r r e g i s t e r

    W a i t - f r e e a l g o r i t h m s b a s e d o n a t o m i c r e g i s t e r s i n s h a r e d m e m o r y c a n b e e m u -

    l a t e d i n m e s s a g e p a s s i n g s y s t e m s . A t t i y a , B a r - N o y a n d D o l e v [ 6 ] s h o w h o w t o

    c o n s t r u c t a c r a s h - r e s i l i e n t w a i t - f r e e s i n g l e - w r i t e r m u l t i - r e a d e r r e g i s t e r f o r t h i s

    p u r p o s e .

    P r o c e s s e s i m p l e m e n t i n g t h i s r e g i s t e r , c o m m u n i c a t e b y s e n d i n g a m e s s a g e

    t o a l l p a r t i c i p a t i n g p r o c e s s e s , i n c l u d i n g t h e s e n d i n g p r o c e s s i t s e l f . T h e y t h e n

    w a i t f o r a c k n o w l e d g m e n t s f r o m a m a j o r i t y o f p r o c e s s e s . T h e c o m m u n i c a t i o n

    p r o c e d u r e u s e s a p i n g - p o n g m e c h a n i s m t o e n s u r e o n l y o n e m e s s a g e a t a t i m e

    i s i n t r a n s i t b e t w e e n t w o p r o c e s s e s . T h i s e n s u r e s r e c e i v e d a c k n o w l e d g m e n t s

    r e f e r t o t h e l a s t m e s s a g e s e n t . A n a c k n o w l e d g m e n t m a y c o n t a i n a d d i t i o n a l

    i n f o r m a t i o n .

    T o w r i t e a n e w v a l u e t h e p r o c e s s c o m m u n i c a t e s t h i s v a l u e t o a m a j o r i t y o f

    p r o c e s s e s . E a c h w r i t e i s l a b e l e d , e n a b l i n g a p r o c e s s t o r e c o g n i z e a n d s t o r e o n l y

    t h e m o s t r e c e n t w r i t e . F o r s i m p l i c i t y , a w r i t e i s i d e n t i e d w i t h i t s l a b e l i n s t e a d

    o f i t s v a l u e .

    T o r e a d f r o m t h e r e g i s t e r , a p r o c e s s r e q u e s t s t h e l a b e l s f r o m a m a j o r i t y o f

    p r o c e s s e s . I t r e t u r n s t h e m o s t r e c e n t w r i t e a m o n g t h e r e s u l t s , b u t n o t b e f o r e

    c o m m u n i c a t i n g t h i s v a l u e t o a n o t h e r m a j o r i t y o f p r o c e s s e s . E l s e i t w o u l d b e

    p o s s i b l e f o r a r e a d t o r e t u r n t h e l a b e l o f a c o n c u r r e n t w r i t e , a n d a s u b s e q u e n t

    r e a d t o r e t u r n a n e a r l i e r l a b e l .

    B o t h r e a d a n d w r i t e o p e r a t i o n s t e r m i n a t e i f a n d o n l y i f t h e i r c o m m u n i c a t i o n s

    1 6

  • 8/6/2019 Virtual Shared Disk on Distributed Redundant Storage

    17/88

    c o m p l e t e . T h i s i s t h e c a s e w h e n a m a j o r i t y o f p r o c e s s e s a c k n o w l e d g e t h e c o m -

    m u n i c a t i o n . S i n c e n o n - f a u l t y p r o c e s s e s a l w a y s a c k n o w l e d g e i n c o m i n g m e s s a g e s ,

    t h i s m a j o r i t y i s s u c i e n t t o m a k e t h e a l g o r i t h m w a i t - f r e e .

    4 . 2 . 2 M u l t i - w r i t e r m u l t i - r e a d e r r e g i s t e r

    U s i n g s i n g l e - w r i t e r m u l t i - r e a d e r a t o m i c r e g i s t e r s , i t i s p o s s i b l e t o c o n s t r u c t a

    m u l t i - w r i t e r m u l t i - r e a d e r a t o m i c r e g i s t e r . O n e s o l u t i o n b y I s r a e l i a n d S h a h a m

    [ 2 8 ] b u i l d s a p r e c e d e n c e g r a p h u s i n g i n f o r m a t i o n s t o r e d i n s i n g l e - w r i t e r m u l t i -

    r e a d e r r e g i s t e r s . S u c h a g r a p h s e r i a l i z e s w r i t e o p e r a t i o n s a n d c a n s u b s e q u e n t l y

    s e r i a l i z e r e a d o p e r a t i o n s , m o d e l i n g t h e b e h a v i o r a m u l t i - w r i t e r m u l t i - r e a d e r r e g -

    i s t e r .

    A p r e c e d e n c e g r a p h i s a d i r e c t e d i n - t r e e : e d g e s p o i n t t o w a r d s t h e r o o t o f t h e

    t r e e . T h e r o o t i s a s p e c i a l v i r t u a l n o d e ; a l l o t h e r n o d e s a r e s t o r e d i n r e g i s t e r s .

    A d i r e c t e d e d g e i n t h e g r a p h f r o m n o d e

    bt o n o d e

    a, i n d i c a t e s t h a t

    ap r e c e d e s

    b. H o w e v e r , w h e n a n e d g e f r o m n o d e

    ct o n o d e

    ai s a d d e d , p r e c e d e n c e b e t w e e n

    ba n d

    ci s u n d e n e d .

    T h e a l g o r i t h m s t o r e s n o d e s a n d e d g e s o f t h e p r e c e d e n c e g r a p h u s i n g s i n g l e -

    w r i t e r m u l t i - r e a d e r a t o m i c r e g i s t e r s . B e s i d e s t h e i n h e r e n t i d e n t i t y o f t h e w r i t e r ,

    e a c h n o d e h a s b e e n a s s i g n e d a n a d d r e s s . A r e g i s t e r c a n t h e n b e u s e d t o s t o r e

    a l a b e l : a c o m b i n a t i o n o f a n o d e a n d a n o u t g o i n g e d g e . T h e n o d e i s d e n e d

    b y i t s a d d r e s s . T h e o u t g o i n g e d g e i s d e n e d b y t h e i d e n t i t y a n d a d d r e s s o f t h e

    n o d e i t p o i n t s t o . N o t i c e t h e i d e n t i t y o f t h e n o d e ' s w r i t e r i s s t o r e d i m p l i c i t l y ; a

    c o n s e q u e n c e o f u s i n g s i n g l e - w r i t e r r e g i s t e r s .

    T h e n o t i o n o f l o c a l p r e c e d e n c e i s u s e d t o d e t e r m i n e p r e c e d e n c e w h e n t w o

    n o d e s h a v e t h e s a m e p a r e n t n o d e . W h e n t h e n o d e s a r e c r e a t e d b y t h e s a m e

    w r i t e r , t h e o l d e r n o d e t a k e s l o c a l p r e c e d e n c e . F o r n o d e s f r o m d i e r e n t w r i t e r s ,

    t h e n o d e w i t h t h e h i g h e s t i d e n t i t y h a s l o c a l p r e c e d e n c e . A f r o n t a l b r a n c h c a n

    t h e n b e d e n e d b y r e c u r s i v e l y f o l l o w i n g e d g e s f r o m t h e r o o t t o w a r d s t h e l e a v e s :

    a l w a y s c h o o s e t h e n o d e t h a t i s l o c a l l y p r e c e d e d b y a l l o t h e r c h i l d n o d e s . T h e

    l e a f n o d e o f t h e f r o n t a l b r a n c h i s c a l l e d t h e l a s t n o d e o f t h e g r a p h .

    A p r e c e d e n c e g r a p h c a n b e u s e d t o c o n s t r u c t a s i m p l e s e q u e n t i a l r e g i s t e r .

    O n l y c o n s e c u t i v e r e a d a n d w r i t e o p e r a t i o n s a r e c o n s i d e r e d f o r s u c h a r e g i s t e r .

    R e g i s t e r s a r e i n i t i a l i z e d w i t h l a b e l s p o i n t i n g b a c k t o t h e m s e l v e s , w h i c h r e s u l t s

    i n a f r o n t a l b r a n c h t h a t i s l i m i t e d t o t h e v i r t u a l r o o t n o d e .

    T h e s e q u e n t i a l w r i t e p r o t o c o l s t a r t s b y c o l l e c t i n g t h e l a b e l s f r o m a l l t h e

    r e g i s t e r s , a n d c o n s t r u c t i n g t h e p r e c e d e n c e g r a p h . A n e w n o d e i s a d d e d t o t h e

    g r a p h b y c o n n e c t i n g i t t o t h e f r o n t a l b r a n c h : i t s e d g e p o i n t s t o t h e n o d e w i t h

    t h e l a r g e s t i d e n t i t y i n t h e b r a n c h , s m a l l e r t h a n t h e i d e n t i t y o f t h e w r i t e r . N o t i c e

    t h a t t h i s c r e a t e s a n e w f r o n t a l b r a n c h .

    T h e s e q u e n t i a l r e a d p r o t o c o l c o l l e c t s t h e l a b e l s f r o m a l l r e g i s t e r s , a n d c o n -

    s t r u c t s t h e p r e c e d e n c e g r a p h . T h e n i t s i m p l y r e t u r n s t h e l a s t n o d e o f t h e f r o n t a l

    b r a n c h .

    U s i n g t h e s e q u e n t i a l p r o t o c o l i n a c o n c u r r e n t s e t t i n g w i l l f a i l . A n u n u s e d

    a d d r e s s a t t h e s t a r t o f a w r i t e , m i g h t h a v e b e c o m e r e f e r e n c e d a t t h e e n d o f

    t h e w r i t e . T h i s c a n r e s u l t i n a n i n c o r r e c t p r e c e d e n c e g r a p h : a n o l d n o d e i s

    1 7

  • 8/6/2019 Virtual Shared Disk on Distributed Redundant Storage

    18/88

    p r e c e d e d b y t h e n e w n o d e . T o p r e v e n t t h i s v i o l a t i o n o f t h e s e q u e n t i a l o r d e r , t h e

    c o n c u r r e n t w r i t e p r o t o c o l s t o r e s t w o l a b e l s p e r r e g i s t e r . A c u r r e n t l a b e l e q u a l

    t o t h a t o f t h e s e q u e n t i a l a l g o r i t h m , a n d a n e w l a b e l t o s t a g e a p e n d i n g w r i t e .

    T h e c o n c u r r e n t w r i t e p r o t o c o l s t a r t s b y c o n s t r u c t i n g t h e p r e c e d e n c e g r a p h

    f r o m t h e c u r r e n t l a b e l s i n t h e r e g i s t e r s , s i m i l a r t o t h e s e q u e n t i a l a l g o r i t h m .

    W h e n c h o o s i n g a f r e e a d d r e s s f o r t h e n e w n o d e , e d g e s o f b o t h n e w a n d c u r r e n t

    l a b e l s a r e c o n s i d e r e d . T h i s e n s u r e s t h a t n o c u r r e n t o r p e n d i n g l a b e l h a s a n

    e d g e r e f e r e n c i n g t h e n e w n o d e . T h e n e w n o d e i s r s t w r i t t e n a s a n e w l a b e l .

    T h e w r i t e p r o t o c o l s u b s e q u e n t l y r e a d s t h e r e g i s t e r o f t h e r e f e r e n c e d n o d e , a n d

    c h e c k s i f i t h a s c h a n g e d . T h e n o d e r e f e r e n c e d b y t h e n e w l a b e l m i g h t h a v e b e e n

    o v e r w r i t t e n . T h e c u r r e n t l a b e l i s t h e n u p d a t e d : i f n o c h a n g e s w e r e d e t e c t e d , i t

    i s u p d a t e d t o t h e n e w l a b e l , e l s e t o t h e n e w l a b e l m o d i e d t o r e f e r e n c e i t s e l f .

    T h e c o n c u r r e n t r e a d p r o t o c o l i s l e s s i n t u i t i v e . T h e p r o t o c o l s t a r t s b y c o n -

    s e c u t i v e l y c o n s t r u c t i n g t h r e e p r e c e d e n c e g r a p h s . T h e r s t a n d t h i r d g r a p h s

    a r e c o n s t r u c t e d n o r m a l l y : b y s e q u e n t i a l l y r e a d i n g t h e r e g i s t e r s , s t a r t i n g f r o m

    t h e l o w e s t , g o i n g u p t o t h e h i g h e s t . T h e s e c o n d g r a p h h o w e v e r , i s c o n s t r u c t e d

    b a c k w a r d s : s t a r t i n g f r o m t h e h i g h e s t r e g i s t e r , g o i n g d o w n t o t h e l o w e s t . D u e

    t o c o n c u r r e n c y , i t i s p o s s i b l e n o n e o f t h e t h r e e g r a p h s a r e c o n s i s t e n t . T h e t h r e e

    g r a p h s a r e t h e r e f o r e c o m p a r e d t o d e t e r m i n e a c o r r e c t r e s p o n s e .

    4 . 3 C o n s i s t e n c y m o d e l s

    I n a n a s y n c h r o n o u s s y s t e m t h e r e i s n o g l o b a l c l o c k t o s e r i a l i z e o p e r a t i o n s o n

    s h a r e d o b j e c t s . O p e r a t i o n s s t i l l n e e d t o b e h a v e i n s o m e p r e d i c t a b l e m a n n e r f o r

    t h e s y s t e m t o b e o f u s e , e s p e c i a l l y i n t h e f a c e o f c o n c u r r e n c y . S u c h b e h a v i o r c a n

    b e d e s c r i b e d u s i n g a c o n s i s t e n c y m o d e l : a g u a r a n t e e t h a t t h e s y s t e m b e h a v e s

    a c c o r d i n g t o c e r t a i n r u l e s . D i e r e n t c o n s i s t e n c y m o d e l s a r e a v a i l a b l e t o d e n e

    c o n s i s t e n t b e h a v i o r f o r a d i s t r i b u t e d s y s t e m .

    O p e r a t i o n s i n d i s t r i b u t e d s y s t e m s a r e n o t i n s t a n t b u t a r e e x e c u t e d d u r i n g

    a n i n t e r v a l : t h e t i m e b e t w e e n i n v o c a t i o n a n d r e s p o n s e o f a n o p e r a t i o n . O v e r -

    l a p p i n g i n t e r v a l s i n d i c a t e c o n c u r r e n t o p e r a t i o n s , w h i l e n o n - o v e r l a p p i n g i n t e r v a l s

    i n d i c a t e s e q u e n t i a l o p e r a t i o n s . T h e a b s o l u t e t i m i n g o f t h e s e o p e r a t i o n s i s h o w -

    e v e r n o t a v a i l a b l e t o i n d i v i d u a l n o d e s i n a n a s y n c h r o n o u s s y s t e m ; n o d e s c a n

    a d o p t c o m p e t i n g v i e w s d u e t o m e s s a g e d e l a y s . S o m e c o o r d i n a t i o n i s r e q u i r e d

    t o e n s u r e c o n s i s t e n t b e h a v i o r .

    T h e b e h a v i o r o f a s y s t e m c a n b e j u s t i e d a s c o n s i s t e n t u s i n g a h i s t o r y : a

    g l o b a l o r d e r f o r i n v o c a t i o n a n d r e s p o n s e e v e n t s . O p e r a t i o n s s h o u l d b e h a v e i n

    a c c o r d a n c e w i t h a h i s t o r y a n d m a i n t a i n o b j e c t s e m a n t i c s . F o r e x a m p l e , i t e m s

    f r o m a s t a c k o b j e c t c a n o n l y b e p o p p e d w h e n t h e y h a v e b e e n p u s h e d e a r l i e r .

    T o s i m p l i f y r e a s o n i n g a b o u t o b j e c t s e m a n t i c s , h i s t o r i e s a r e o f t e n l i m i t e d t o

    s e q u e n t i a l o p e r a t i o n s .

    I n a s e q u e n t i a l h i s t o r y , o p e r a t i o n s c a n b e c o n s i d e r e d a t o m i c . L a c k o f c o n c u r -

    r e n c y e n s u r e s p e n d i n g o p e r a t i o n s a r e i n v i s i b l e : o p e r a t i o n s s e e m t o t a k e e e c t

    i n s t a n t a n e o u s l y . I n a s e q u e n t i a l h i s t o r y e v e r y i n v o c a t i o n e v e n t i s d i r e c t l y f o l -

    l o w e d b y t h e c o r r e s p o n d i n g r e s p o n s e e v e n t . T h i s r e q u i r e s s o m e r e o r d e r i n g o f

    e v e n t s , r e l a t i v e t o t h e i r a b s o l u t e t i m e o c c u r r e n c e s .

    1 8

  • 8/6/2019 Virtual Shared Disk on Distributed Redundant Storage

    19/88

    O f t e n m u l t i p l e h i s t o r i e s a r e a v a i l a b l e t o j u s t i f y s y s t e m b e h a v i o r . F o r e x -

    a m p l e , t h e v a l u e o f a s h a r e d v a r i a b l e i s o n l y i m p o r t a n t o n a r e a d o p e r a t i o n ;

    p r e c e d i n g w r i t e o p e r a t i o n s c a n b e o r d e r e d a r b i t r a r i l y w h e n t h e y a r e o v e r w r i t -

    t e n b e f o r e t h e n e x t r e a d . A c o n s i s t e n c y m o d e l o n l y s t a t e s w h i c h h i s t o r i e s a r e

    a c c e p t a b l e . I t i s n o t n e c e s s a r y t o p i c k a s p e c i c o n e .

    C o n s i s t e n c y m o d e l s c a n l i m i t t h e a m o u n t o f r e o r d e r i n g a l l o w e d t o c r e a t e a

    s e q u e n t i a l h i s t o r y ; r e o r d e r i n g i s r e l a t i v e t o t h e o r i g i n a l o r d e r o f e v e n t s i n a b s o l u t e

    t i m e . A n e x a m p l e i s t o n o t r e o r d e r e v e n t s o f o r i g i n a l l y s e q u e n t i a l o p e r a t i o n s .

    T h e e x a c t l i m i t a t i o n s d e p e n d o n t h e s p e c i c c o n s i s t e n c y m o d e l . H o w a s y s t e m

    m a n a g e s t o c o m p l y w i t h t h e c o n s i s t e n c y m o d e l i s o f n o c o n c e r n t o t h e m o d e l .

    T h e r e a r e d i e r e n t c o n s i s t e n c y m o d e l s t o p i c k f r o m w h e n d e s i g n i n g a s y s t e m .

    S o m e e x a m p l e s a r e : s t r i c t c o n s i s t e n c y , s e q u e n t i a l c o n s i s t e n c y , l i n e a r i z a b i l i t y ,

    q u i e s c e n t c o n s i s t e n c y , s e r i a l i z a b i l i t y a n d c a u s a l c o n s i s t e n c y . W e w i l l l o o k a t

    t h e s e m o d e l s i n m o r e d e t a i l :

    S t r i c t c o n s i s t e n c y r e q u i r e s o p e r a t i o n s t o t a k e e e c t i m m e d i a t e l y , c o n s i s t e n t

    w i t h t h e i r o c c u r r e n c e i n a b s o l u t e t i m e . A n a t u r a l t f o r s y n c h r o n o u s s y s t e m s ,

    w h e r e o p e r a t i o n s c a n b e e x e c u t e d i n t h e o r d e r t h e y w e r e i n v o k e d ; b u t t o o m u c h

    o f a c o n s t r a i n t f o r a s y n c h r o n o u s s y s t e m s , w h e r e l a c k o f a g l o b a l c l o c k p r o h i b i t s

    i m p l e m e n t a t i o n . S t r i c t c o n s i s t e n c y c a n r e o r d e r r e s p o n s e e v e n t s t o r e m o v e c o n -

    c u r r e n c y .

    S e q u e n t i a l c o n s i s t e n c y [ 2 9 ] r e q u i r e s o p e r a t i o n s t o b e e x e c u t e d i n t h e i r o r i g i -

    n a l p r o g r a m o r d e r f o r e a c h s e p a r a t e p r o c e s s . T h i s r e m o v e s t h e n e e d f o r a g l o b a l

    c l o c k , s i n c e o p e r a t i o n s f r o m d i e r e n t p r o c e s s e s a r e n e v e r c o m p a r e d u s i n g a b s o -

    l u t e t i m e . A s a r e s u l t , s e q u e n t i a l o p e r a t i o n s f r o m d i e r e n t p r o c e s s e s c a n b e h a v e

    c o u n t e r - i n t u i t i v e w h e n p r o c e s s e s p a r t i a l l y s y n c h r o n i z e . S e q u e n t i a l c o n s i s t e n c y

    c a n r e o r d e r e v e n t s w h e n t h e y b e l o n g t o d i e r e n t p r o c e s s e s .

    L i n e a r i z a b i l i t y [ 2 5 ] r e q u i r e s t h e p a r t i a l o r d e r o f o r i g i n a l l y s e q u e n t i a l o p e r -

    a t i o n s t o b e p r e s e r v e d . T h i s i s c a l l e d a t o m i c i t y f o r r e a d a n d w r i t e o b j e c t s .

    L i n e a r i z a b i l i t y i s a s t r o n g e r p r o p e r t y t h a n s e q u e n t i a l c o n s i s t e n c y , w h i c h o n l y

    p r e s e r v e s t h i s p a r t i a l o r d e r p e r p r o c e s s . C o n t r a r y t o s e q u e n t i a l c o n s i s t e n c y ,

    l i n e a r i z a b i l i t y i s a l o c a l [ 4 6 ] p r o p e r t y : i f o p e r a t i o n s f o r e a c h s e p a r a t e o b j e c t

    a r e l i n e a r i z a b l e , t h e n a l l o p e r a t i o n s a r e l i n e a r i z a b l e . L i n e a r i z a b i l i t y c a n r e o r d e r

    e v e n t s w h e n t h e y b e l o n g t o c o n c u r r e n t o p e r a t i o n s .

    Q u i e s c e n t c o n s i s t e n c y [ 5 , 4 2 ] r e q u i r e s o p e r a t i o n s s e p a r a t e d b y q u i e s c e n c e t o

    r e m a i n i n t h e i r o r i g i n a l o r d e r . Q u i e s c e n c e i s a l a c k o f p e n d i n g o p e r a t i o n s o n

    a n o b j e c t : a l l i n v o c a t i o n e v e n t s h a v e h a d a c o r r e s p o n d i n g r e s p o n s e e v e n t . T h i s

    c o n s i s t e n c y m o d e l d i e r s f r o m l i n e a r i z a b i l i t y a n d s e q u e n t i a l c o n s i s t e n c y i n t h a t

    p r o g r a m o r d e r i s n o t n e c e s s a r i l y p r e s e r v e d . Q u i e s c e n t c o n s i s t e n c y c a n r e o r d e r

    e v e n t s b e l o n g i n g t o o p e r a t i o n s n o t s e p a r a t e d b y q u i e s c e n c e .

    S e r i a l i z a b i l i t y [ 3 7 ] r e q u i r e s s e q u e n t i a l c o n s i s t e n c y o f t r a n s a c t i o n s . W h e n

    t r a n s a c t i o n s a r e a l s o l i n e a r i z a b l e , t h i s i s c a l l e d s t r i c t s e r i a l i z a b i l i t y . T r