![Page 1: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/1.jpg)
ViewBoxIntegrating Local File Systems with
Cloud Storage Services
Yupu Zhang+, Chris Dragga+*,
Andrea Arpaci-Dusseau+, Remzi Arpaci-Dusseau+
+University of Wisconsin – Madison
*NetApp, Inc.
2/18/2014 1
![Page 2: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/2.jpg)
Personal Cloud Storage Services
• Exploding in popularity• Numerous providers: Dropbox, Google Drive, SkyDrive …
• Large user base: Dropbox has more than 100 million users
• Promising benefit• Reliable backup on the cloud
• Automatic synchronization across clients/devices
2/18/2014 2
There are so many copies…My data must be safe... Really?
![Page 3: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/3.jpg)
Is Your Data Really Safe?
• Data corruption• Uploaded from local machine to cloud
• Propagated to other devices/clients
2/18/2014 3
![Page 4: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/4.jpg)
1
• Crash inconsistency• Inconsistent data ends up everywhere
• “Out-of-sync” synchronization
111
Is Your Data Really Safe?
2/18/2014 4
1
1
after reboot
sync client thinks everything is in sync
![Page 5: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/5.jpg)
Is Your Data Really Safe?
• Causal inconsistency• Files are uploaded out of order
• Cloud state does not match a valid FS state
2/18/2014 5
thumbnail
![Page 6: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/6.jpg)
2/18/2014 6
Many copies do NOT
make your data safe
![Page 7: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/7.jpg)
• Local file system is the weakest link
• Corruption and inconsistency are exposed
Why? – File Systems
2/18/2014 7
≠file system state correct state
![Page 8: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/8.jpg)
• Ad-hoc synchronization is harmful
• Sync client sees what regular application sees, but not what file system sees
Why? – Sync Services
2/18/2014 8
≠cloud state file system state
![Page 9: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/9.jpg)
Can we achieve
with existing systems?
2/18/2014 9
cloud state file system state correct state= =
![Page 10: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/10.jpg)
Our solution: ViewBox
• Local detection + Cloud-aided recovery• Rely on strong local file system to detect problems
• Utilize cloud data to recover from local failures
• Orchestrated synchronization based on views• In-memory snapshots of valid file system state
• Sync client sees what file system sees
2/18/2014 10
integrated file system and cloud storage
file system state = correct state
cloud state = file system state
![Page 11: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/11.jpg)
Results
• ViewBox runs on top of existing systems• Enhance ext4 with data checksumming
• Work with unmodified Dropbox and modified Seafile
• ViewBox provides better reliability• No global data pollution
• Automatic recovery with cloud data
• ViewBox incurs minimal overhead • Less than 5% overhead for most workloads
• Up to 30% reduction of synchronization time in some cases
2/18/2014 11
![Page 12: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/12.jpg)
Outline
• Introduction
• Motivation• Data Corruption
• Crash Inconsistency
• Causal Inconsistency
• Design and Implementation
• Evaluation
• Conclusion
2/18/2014 12
![Page 13: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/13.jpg)
Experiment Setup
• File systems (on Linux)• ext4 w/ ordered journaling
• ext4 w/ data journaling
• ZFS
• Synchronization services• Dropbox
• ownCloud
• Seafile
2/18/2014 13
![Page 14: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/14.jpg)
File SystemD1File System
• Inject corruption to a synchronized file on disk
• Perform various workloads• data writes, metadata changes (touch, chmod, etc.)
• Check if corruption is propagated
D2
Data Corruption – Method
2/18/2014 14Regular Write Fault Injection
M MD1 D2 D3 D1 D2 D3x
D2 M
![Page 15: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/15.jpg)
Data Corruption – Results
2/18/2014 15
FS Service Data WritesMetadata Changes
mtime ctime atime
ext4
Dropbox L G L G L G L
ownCloud L G L G L L
Seafile L G L G L G L G
L: local corruption G: global corruption D: detected R: recovered
Corruption is uploaded even when there is no data change
![Page 16: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/16.jpg)
Data Corruption – Results
2/18/2014 16
FS Service Data WritesMetadata Changes
mtime ctime atime
ZFS
Dropbox D D D L
ownCloud D D L L
Seafile D D D D
No automatic recovery using cloud data
L: local corruption G: global corruption D: detected R: recovered
Corruption is detected when it is read
![Page 17: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/17.jpg)
Data Corruption – Lessons
• Where do synchronization services fail?• Rely on file-level monitoring mechanism, e.g., inotify
• Have to read whole file to identify changes
• Cannot tell between legitimate changes and corruption
• Where do file systems fail?• Many file systems do not checksum data
2/18/2014 17
![Page 18: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/18.jpg)
Outline
• Introduction
• Motivation• Data Corruption
• Crash Inconsistency
• Causal Inconsistency
• Design and Implementation
• Evaluation
• Conclusion
2/18/2014 18
![Page 19: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/19.jpg)
D3 D4
• A file is synchronized at V0 on disk and cloud
• Update the file from V0 to V1
• Inject a crash and observe sync client’s behavior
Crash Inconsistency - Method
2/18/2014 19
M
M
D1 D2 D3
D1 D2
V0 V1
M D1 D2
D3
a mix of V0 and V1
![Page 20: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/20.jpg)
Crash Inconsistency – Results
2/18/2014 20
FS ServiceUpload
Local VersionDownload
Cloud VersionOut of Sync
ext4 (ordered)
Dropbox YES NO YES
ownCloud YES YES YES
Seafile N/A N/A N/A
Inconsistent local version gets uploaded
Fails to synchronize local changes
YES: occurred NO: did not occur N/A: no result Erratic behaviors
![Page 21: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/21.jpg)
Crash Inconsistency – Results
2/18/2014 21
FS ServiceUpload
Local VersionDownload
Cloud VersionOut of Sync
ext4 (data)or
ZFS
Dropbox YES NO NO
ownCloud YES YES NO
Seafile YES NO NO
Local version is always consistent
May violate causal consistency
YES: occurred NO: did not occur N/A: no result
![Page 22: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/22.jpg)
Crash Inconsistency – Lessons
• Where do synchronization services fail?• Depend on their own metadata tracking
• Inconsistent with file system metadata upon crash
• Where do file systems fail?• Metadata journaling cannot provide data consistency
2/18/2014 22
![Page 23: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/23.jpg)
Outline
• Introduction
• Motivation• Data Corruption
• Crash Inconsistency
• Causal Inconsistency
• Design and Implementation
• Evaluation
• Conclusion
2/18/2014 23
![Page 24: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/24.jpg)
Causal Inconsistency – Method
• Write a series of files in a specified order
• See if these files are synchronized in correct order
2/18/2014 24
Local Cloud
a
b
c
![Page 25: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/25.jpg)
Causal Inconsistency – Results
• The causal ordering can be violated in all three services on both ZFS and ext4
2/18/2014 25
May not directly use data on cloud for recovery
Cloud
a
b
c
Local
![Page 26: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/26.jpg)
Causal Inconsistency – Lessons
• Where do synchronization services fail?• Synchronize files out of order
• Where do file systems fail?• No efficient mechanism to provide a static and
consistent view to sync services
2/18/2014 26
![Page 27: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/27.jpg)
Summary
• Both file systems and sync services are responsible for these failures• Many file systems lack strong reliability mechanisms
• What sync clients see is different from what local file systems see
2/18/2014 27
file system state correct state≠
cloud state file system state≠
cloud state file system state correct state≠ ≠
![Page 28: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/28.jpg)
Summary (cont.)
• Not all problems can be avoided by switching to advanced file systems
• No automatic recovery with cloud data
2/18/2014 28
File SystemCorruption Detection
Crash Consistency
Causal Consistency
Recoveryusing Cloud
ext4 (metadata)
ext4 (data)
ZFS
![Page 29: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/29.jpg)
Outline
• Introduction
• Motivation
• Design and Implementation• ViewBox Overview
• Local Detection & Cloud-aided Recovery
• View-based Synchronization
• Evaluation
• Conclusion
2/18/2014 29
![Page 30: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/30.jpg)
ViewBox Overview
• Local detection• No corruption/inconsistency is spread
• Cloud-aided Recovery• Restore file system to correct state upon failure
• View-based Synchronization• Present file system’s view to sync service
• Basis for consistency and correct recovery
2/18/2014 30
ext4-cksum
View Manager
Cloud Helper
![Page 31: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/31.jpg)
Dropbox Client
File System
Dropbox Architecture
2/18/2014 31
Local Cloud
inotify
![Page 32: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/32.jpg)
1
Dropbox Client
inotify File System
11
1
1
file 1modified
Dropbox Architecture
2/18/2014 32
Local Cloud
1
FileVersioning
![Page 33: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/33.jpg)
Dropbox Client
File System
Dropbox Architecture
2/18/2014 33
Local Cloud
inotify
OtherApplications
1
1
1
1
Dropbox client sees the same file system state as other applications
![Page 34: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/34.jpg)
File Systemext4-cksum
ViewBox Architecture
2/18/2014 34
Local Cloud
inotify
Dropbox Client
ViewManager
FS’s view
OtherApplications
ViewBox presents FS’s view to Dropbox client
Other applications’ view remains the same
ext4-cksum is dedicated to the entire sync folder
![Page 35: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/35.jpg)
Dropbox Client
ext4-cksum
1 21 2
1 2
FS’s view1 2
1 2
1 2
inotify
ViewManager
file 1modified
file 2modified
ViewBox Architecture
2/18/2014 35
Local Cloud
File-systemSnapshot
![Page 36: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/36.jpg)
ext4-cksum
211x
2x
FS’s view
Cloud Helper
1 2
ViewBox Architecture
2/18/2014 36
Local Cloud
1 2
inotify
Dropbox Client
ViewManager
2
![Page 37: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/37.jpg)
Outline
• Introduction
• Motivation
• Design and Implementation• ViewBox Overview
• Local Detection & Cloud-aided Recovery
• View-based Synchronization
• Evaluation
• Conclusion
2/18/2014 37
![Page 38: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/38.jpg)
ext4-cksum – Local Detection
• Checksum region• Pre-allocated space (~0.1% overhead)
• 32-bit CRC checksum per 4KB block
• 128KB checksum region for a 128MB block group
• Each checksum maps to a data block in the block group
• Detect data corruption & inconsistency• More details in the paper
2/18/2014 38
SuperblockGroup
DescriptorsBlock
BitmapInode
BitmapInodeTable
ChecksumRegion
DataBlocks
![Page 39: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/39.jpg)
Cloud Helper – Cloud-aided Recovery
• A user-level daemon• Talks to local FS through ioctl
• Communicates with the server through web API
• Upon data corruption• Fetches correct block from cloud
• After crash, two types of recovery• Recovers inconsistent files
• Rolls back entire file system to the latest synced view
2/18/2014 39
![Page 40: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/40.jpg)
Outline
• Introduction
• Motivation
• Design and Implementation• ViewBox Overview
• Local Detection & Cloud-aided Recovery
• View-based Synchronization
• Evaluation
• Conclusion
2/18/2014 40
![Page 41: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/41.jpg)
View Manager – View-based Sync
• Create file system views
• Upload views to cloud through sync client
• Challenge 1 - How to provide consistency?• ext4-cksum still runs in ordered mode• Cloud journaling
• Challenge 2 - How to create views efficiently?• No support from ext4-cksum• Incremental snapshotting
2/18/2014 41
![Page 42: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/42.jpg)
Challenge 1:How to Guarantee Consistency?
• Cloud journaling• Treat cloud storage as external journal• Synchronize local changes to cloud at FS epochs
• i.e., when ext4-cksum performs a journal commit
• Three types of views• Active view (local) => Current FS state• Frozen view (local) => Last FS snapshot in memory• Synced views (on cloud) => Previously uploaded views
• Roll back to the latest synced view upon failure
2/18/2014 42
![Page 43: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/43.jpg)
Cloud Journaling Example
2/18/2014 43
E0 E1 E2 E3
Synced Views
Frozen View
Active View 5
FS Epoch
4
4
![Page 44: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/44.jpg)
Cloud Journaling Example
2/18/2014 44
E0 E1 E2 E3
Synced Views
Frozen View
Active View
FS Epoch
4
5
54
![Page 45: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/45.jpg)
Cloud Journaling Example
2/18/2014 45
E0 E1 E2 E3
Synced Views
Frozen View
Active View
FS Epoch
4
6
5
5
• Frozen view 5 has been uploaded completely
• Cannot freeze view 6 at this time
![Page 46: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/46.jpg)
Cloud Journaling Example
2/18/2014 46
E0 E1 E2 E3
Synced Views
Frozen View
Active View
FS Epoch
4
5
5
6
• Create a new frozen view• after the previous frozen view is synchronized• and when FS reaches an epoch
6
![Page 47: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/47.jpg)
Cloud Journaling Example
2/18/2014 47
E0 E1 E2 E3
Synced Views
Frozen View
Active View
FS Epoch
4 5
6
• Upon crash• Roll back to from cloud
6
5
![Page 48: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/48.jpg)
Server-side Changes
• Single-client scenario• Always one-direction synchronization (client to cloud)
• No server-side changes are necessary
• ViewBox + Dropbox (unmodified)
• Multi-client scenario• Server cannot propagate a partially-uploaded view
• Client must handle conflicts carefully
• ViewBox + Seafile (open-source, modified)
2/18/2014 48
![Page 49: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/49.jpg)
Challenge 2:How to Efficiently Freeze a View?
• A frozen view is short-lived and kept only in memory
• Requirements
• No changes to FS’s on-disk structures
• No delay to on-going FS operations
• Minimal memory overhead
• Incremental snapshotting
• Decouple namespace and data
2/18/2014 49
![Page 50: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/50.jpg)
55
Incremental Snapshotting Example
2/18/2014 50
E0
Synced Views
Frozen View
Active View
FS Epoch
4
4
E1 E2
• Maintain last frozen view 4 in memory• Only namespace is preserved
![Page 51: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/51.jpg)
changed file
namespace
5
Incremental Snapshotting Example
2/18/2014 51
E0
Synced Views
Frozen View
Active View
FS Epoch
4
4
• Track updates in local FS through active view 5• Log namespace changes and data changes in memory
E1 E2
![Page 52: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/52.jpg)
changed file
namespace
5
Incremental Snapshotting Example
2/18/2014 52
E0
Synced Views
Frozen View
Active View
FS Epoch
4
4
• Freeze current active view 5• Apply namespace changes to last frozen view 4
• File data is still kept in local FS, but marked COW
E1 E2
5(COW)
![Page 53: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/53.jpg)
6
Incremental Snapshotting Example
2/18/2014 53
E0
Synced Views
Frozen View
Active View
FS Epoch
4
• At the same time, active view 6 starts immediately• On-going FS operations are not interrupted
• COWed data is copied over to frozen view 5 if necessary
E1 E2
5changed file
namespace
changed file
namespace
5(COW)
![Page 54: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/54.jpg)
6
Incremental Snapshotting Example
2/18/2014 54
E0
Synced Views
Frozen View
Active View
FS Epoch
4
• Upload frozen view 5• Re-generate inotify events
• Trick sync client to upload changes from frozen view 5
E1 E2
5changed file
namespace
changed file
namespace
6(COW)
![Page 55: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/55.jpg)
Outline
• Introduction
• Motivation
• Design and Implementation
• Evaluation
• Conclusion
2/18/2014 55
![Page 56: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/56.jpg)
Evaluation
• Questions to answer• Can ViewBox offer integrity, consistency, and recoverability?
• What is the overhead of ViewBox during user workloads?
• Setup (for both server and client machines)• 3.3GHz Intel Quad Core CPU, 16 GB memory
• 1TB Hitachi hard drive
• Linux kernel 3.6.11 (64-bit), ~7000 LOC added/modified
• Dropbox client 1.6.0
• Seafile client and server 1.8.0
2/18/2014 56
![Page 57: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/57.jpg)
Reliability• Data Corruption
• Crash consistency
• Causal ordering is preserved
2/18/2014 57
ServiceData
Writes
Metadata Changes
mtime ctime atime
ViewBox w/Dropbox D R D R D R D R
ViewBox w/Seafile D R D R D R D R
ServiceUpload
Local Ver.Download Cloud Ver.
Out-of-sync (no sync)
ViewBox w/Dropbox NO YES NO
ViewBox w/Seafile NO YES NO
L: Local corruption G: Global corruptionD: Detected R: Recovered
YES: occurred NO: did not occur
![Page 58: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/58.jpg)
Performance - Photo Viewing
0
20
40
60
80
100
120
140
160
180
Dropbox Seafile
Ru
nti
me
(sec
)
ext4 ViewBox
2/18/2014 58
• iphoto_view from iBench [Harter2011]
• Sequentially view 400 photos
• Read-dominant
• Runtime• Time taken to finish the workload
• ViewBox has <5% overhead
• Memory overhead• < 20MB
![Page 59: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/59.jpg)
Performance - Photo Viewing
0
100
200
300
400
500
600
700
Dropbox Seafile
Syn
c ti
me
(sec
)
ext4 ViewBox
2/18/2014 59
• Sync time• Time taken to finish synchronizing
• Huge increase in sync time with ViewBox + Dropbox
• View metadata for Dropbox• A list of {pathname, version
number} • Remote walk ~1200 dirs (~1200
RTT) due to lack of proper server support
• View metadata for Seafile• Its internal commit ID
![Page 60: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/60.jpg)
Performance - Photo Editing
2/18/2014 60
• iphoto_edit from iBench [Harter2011]
• Sequentially edit 400 photos
• Reads:Writes = 7:3
• 30% reduction in sync time with ViewBox + Seafile
• Reduced interference from foreground update• Original Seafile may delay
uploading
• ViewBox keeps uploading changes from frozen views
0
500
1000
1500
2000
2500
3000
Dropbox Seafile
Syn
c ti
me
(sec
)
ext4 ViewBox
![Page 61: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/61.jpg)
Conclusion
• Problem: Cloud storage services and file systems fail to protect data
• Many copies do NOT always make data safe
• Solution: ViewBox
• Enhance local file systems with data checksumming
• Present file system’s view to sync service
• Tighter integration => more than reliability?2/18/2014 61
cloud state file system state correct state≠ ≠
cloud state file system state correct state= =
![Page 62: Integrating Local File Systems with Cloud Storage Services · Integrating Local File Systems with Cloud Storage Services Yupu Zhang +, Chris Dragga *, Andrea Arpaci-Dusseau+, Remzi](https://reader031.vdocument.in/reader031/viewer/2022022622/5bb50d9009d3f2b4158b805a/html5/thumbnails/62.jpg)
Thanks! Questions?
Advanced Systems Lab (ADSL)
University of Wisconsin-Madison
http://www.cs.wisc.edu/adsl
Wisconsin Institute on Software-defined Datacenters in Madison
http://wisdom.cs.wisc.edu/
2/18/2014 62
ViewBox: Integrating Local File Systems with Cloud Storage Services