| Internet-Draft | MyClerk VFS | December 2025 |
| Arcan | Expires 13 June 2026 | [Page] |
This document specifies the MyClerk Virtual File System (VFS), a distributed storage system designed for family networks. The VFS provides end-to-end encrypted, redundant storage across heterogeneous nodes using adaptive chunking and Reed-Solomon erasure coding [REED-SOLOMON]. Metadata synchronization uses Conflict-free Replicated Data Types (CRDTs) [CRDT] with a hybrid LWW-Register and OR-Set approach.¶
The system supports tiered storage, automatic health monitoring with self-healing capabilities, and federation between separate family installations. It is designed to be accessible to non-technical users while providing enterprise-grade data durability.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 4 June 2026.¶
Copyright (c) 2025 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document.¶
Modern families have storage devices distributed across multiple locations: a primary home with NAS, a vacation house with a mini-PC, grandparents with a Raspberry Pi, and mobile devices requiring remote access. The MyClerk VFS unifies these resources into a coherent, redundant file system.¶
The VFS operates on top of the MyClerk Protocol (draft-myclerk-protocol) for all communication. This document specifies the storage layer, including data organization, redundancy mechanisms, and metadata synchronization.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
The VFS consists of four layers:¶
The VFS uses adaptive chunk sizes based on file size to optimize storage efficiency:¶
| File Size | Chunk Size | Rationale |
|---|---|---|
| < 1 MB | No chunking | Avoid overhead |
| 1-100 MB | 4 MB | Good balance |
| > 100 MB | 16 MB | Fewer fragments |
Files smaller than 1 MB are stored as a single unit. This avoids the overhead of chunk management for small configuration files and documents.¶
The VFS uses Reed-Solomon erasure coding to provide redundancy. Each chunk is encoded into k data fragments plus m parity fragments. Any k fragments are sufficient to reconstruct the original chunk.¶
| Profile | k | m | Overhead | Tolerance | Use Case |
|---|---|---|---|---|---|
| Economy | 4 | 1 | 25% | 1 node | Non-critical data |
| Standard | 3 | 2 | 67% | 2 nodes | Recommended default |
| Critical | 4 | 4 | 100% | 4 nodes | Important documents |
| Paranoid | 4 | 5+ | >125% | 5+ nodes | Maximum security |
The Standard profile with k=3, m=2 is RECOMMENDED for most use cases. It provides tolerance for two simultaneous node failures with reasonable storage overhead.¶
Fragments MUST be distributed across different nodes to maximize fault tolerance. The distribution algorithm SHOULD:¶
The VFS continuously monitors fragment availability and takes corrective action when necessary.¶
| Status | Condition | Wait Time | Action |
|---|---|---|---|
| GREEN | >= k+2 online | - | No action |
| YELLOW | k+1 online | 6 hours | Warning, then redistribute |
| ORANGE | k online | 30 minutes | Immediate redistribution |
| RED | < k online | 0 | Emergency recovery |
When a node becomes unreachable, the following escalation timeline applies:¶
The VFS uses Conflict-free Replicated Data Types (CRDTs) for metadata synchronization across nodes. This ensures eventual consistency without coordination.¶
The VFS employs a hybrid CRDT strategy:¶
This combination provides optimal semantics for file system operations: LWW-Register ensures the latest file version wins, while OR-Set correctly handles concurrent file creation and deletion in directories.¶
The following CDDL [RFC8610] schema defines the LWW-Register structure. Values are encoded using CBOR [RFC8949].¶
lww-register<T> = {
value: T,
timestamp: uint, ; Unix microseconds
node-id: bstr .size 16, ; Writer node ID
}
; Merge rule: Higher timestamp wins
; Tie-breaker: Lexicographically higher node-id wins
¶
or-set<T> = {
elements: [* or-set-element<T>],
}
or-set-element<T> = {
value: T,
add-id: bstr .size 16, ; Unique ID for this add operation
removed: bool, ; Tombstone flag
}
; Add: Create new element with unique add-id
; Remove: Set removed=true for all elements with matching value
; Merge: Union of all elements, removed flags propagate
¶
file-metadata = {
id: bstr .size 16, ; Unique file ID
name: lww-register<tstr>, ; File name
parent: lww-register<bstr .size 16>, ; Parent directory ID
content-hash: lww-register<bstr .size 32>, ; BLAKE3 hash
size: lww-register<uint>, ; File size in bytes
mtime: lww-register<uint>, ; Modification time
chunks: lww-register<[* chunk-ref]>, ; Chunk references
tags: or-set<tstr>, ; User tags
permissions: or-set<permission>, ; Access permissions
}
chunk-ref = {
hash: bstr .size 32, ; BLAKE3 hash of chunk
offset: uint, ; Offset in file
size: uint, ; Chunk size
ec-profile: tstr, ; Erasure coding profile
}
permission = {
principal: bstr .size 16, ; User or group ID
access: uint, ; Access flags (read, write, etc.)
}
¶
directory-metadata = {
id: bstr .size 16, ; Unique directory ID
name: lww-register<tstr>, ; Directory name
parent: lww-register<bstr .size 16>, ; Parent directory ID
children: or-set<bstr .size 16>, ; Child file/directory IDs
mtime: lww-register<uint>, ; Modification time
permissions: or-set<permission>, ; Access permissions
}
¶
All data is encrypted end-to-end using ChaCha20-Poly1305 [RFC8439]. Storage nodes never see plaintext.¶
Keys are derived hierarchically using HKDF [RFC5869]:¶
Family Master Key (FMK)
|
+-- Folder Key: /family/photos/
| |
| +-- File Key: photo.jpg
| |
| +-- Chunk Key: a1b2c3...
|
+-- Folder Key: /family/documents/
|
+-- Session Keys (for Federation)
¶
folder_key = HKDF-SHA256(
IKM = family_master_key,
salt = folder_id,
info = "myclerk-vfs-folder-v0",
L = 32
)
file_key = HKDF-SHA256(
IKM = folder_key,
salt = file_id,
info = "myclerk-vfs-file-v0",
L = 32
)
chunk_key = HKDF-SHA256(
IKM = file_key,
salt = chunk_index (4 bytes, big-endian),
info = "myclerk-vfs-chunk-v0",
L = 32
)
¶
Each encryption operation requires a unique 96-bit nonce:¶
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Timestamp (32 bits) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Random (32 bits) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Counter (32 bits) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+¶
This construction provides collision probability less than 2^-80 per year at 1 million operations per second.¶
Nodes are classified based on their reliability:¶
| Type | Criteria | Role |
|---|---|---|
| Core Node | >95% uptime (30 days), <100ms latency | Guaranteed fragment storage (k fragments) |
| Bonus Node | Variable availability | Additional redundancy when online |
Classification is automatic based on observed metrics. A node that has been offline for more than 72 hours is automatically downgraded from Core to Bonus.¶
Data is automatically migrated between storage tiers based on access patterns:¶
| Tier | Storage Type | Latency | Content |
|---|---|---|---|
| Hot | NVMe/SSD | <100ms | Last 7 days |
| Warm | SSD/HDD | <500ms | 7-30 days |
| Cold | HDD/Archive | >1s | >30 days |
VFS operations use operation codes in the range 0x0500-0x05CF of the MyClerk Protocol.¶
| Code | Name | Description |
|---|---|---|
| 0x0500 | VFS_MOUNT | Mount VFS |
| 0x0501 | VFS_UNMOUNT | Unmount VFS |
| 0x0502 | VFS_STAT | Get file/directory info |
| 0x0503 | VFS_LIST | List directory contents |
| 0x0504 | VFS_READ | Read file data |
| 0x0505 | VFS_WRITE | Write file data |
| 0x0506 | VFS_CREATE | Create file/directory |
| 0x0507 | VFS_DELETE | Delete file/directory |
| 0x0508 | VFS_RENAME | Rename/move |
| 0x0509 | VFS_SYNC | Force sync |
| Code | Name | Description |
|---|---|---|
| 0x0510 | CHUNK_STORE | Store chunk |
| 0x0511 | CHUNK_RETRIEVE | Retrieve chunk |
| 0x0512 | CHUNK_VERIFY | Verify integrity |
| 0x0513 | CHUNK_DELETE | Delete chunk |
| 0x0514 | CHUNK_LOCATE | Find chunk locations |
| 0x0515 | CHUNK_REPLICATE | Replicate chunk |
| Code | Name | Description |
|---|---|---|
| 0x0520 | FRAGMENT_STORE | Store fragment |
| 0x0521 | FRAGMENT_RETRIEVE | Retrieve fragment |
| 0x0522 | FRAGMENT_STATUS | Get fragment status |
| 0x0523 | FRAGMENT_REDISTRIBUTE | Redistribute |
| 0x0524 | FRAGMENT_HEALTH_REPORT | Health report |
| Code | Name | Description |
|---|---|---|
| 0x0530 | META_SYNC_REQUEST | Request metadata sync |
| 0x0531 | META_SYNC_DIFF | Send diff |
| 0x0532 | META_CONFLICT_RESOLVE | Resolve conflict |
| 0x0533 | META_SNAPSHOT | Create snapshot |
| 0x0534 | META_RESTORE | Restore from snapshot |
| Code | Name | Description |
|---|---|---|
| 0x05C0 | EMERGENCY_REVOKE | Immediate revocation |
| 0x05C1 | EMERGENCY_KEY_INVALIDATE | Invalidate all keys |
| 0x05C2 | EMERGENCY_CACHE_WIPE | Request cache wipe |
| 0x05C3 | EMERGENCY_CONFIRM | Client confirmation |
| 0x05C4 | EMERGENCY_STATUS | Query cut-off status |
| 0x05C5 | EMERGENCY_RESTORE | Restore access |
The VFS supports sharing between separate installations (families). Two sharing modes exist:¶
All data is encrypted with ChaCha20-Poly1305 before leaving the client. Storage nodes never see plaintext. Key compromise affects only the specific folder/file/chunk level in the hierarchy.¶
Nonce reuse with the same key completely compromises security. The timestamp+random+counter construction ensures collision probability below 2^-80 per year.¶
CRDT operations are authenticated using the MyClerk Protocol's session keys. Unauthorized nodes cannot inject or modify metadata.¶
Federation uses separate session keys. Emergency Cut-Off can immediately revoke all access. Cached data becomes cryptographically inaccessible when keys are rotated.¶
This document has no IANA actions.¶
This specification is part of the MyClerk project, a privacy-first family orchestration platform currently in development. For more information, visit https://myclerk.eu.¶