coreos / torus

Torus Distributed Storage
https://coreos.com/blog/torus-distributed-storage-by-coreos.html
Apache License 2.0
1.78k stars 172 forks source link

Allow Volumes to be Resized #289

Open beh9540 opened 8 years ago

beh9540 commented 8 years ago

Resize volumes per issue #177

barakmich commented 8 years ago

Close; it does change the spec on how big the volume is, but it doesn't actually change the volume size.

You'll want to use *File.Truncate() which appropriately grows or shrinks the file, and then writes the newly minted inode structure back.

I can adapt if you'd like, but you're most of the way there.

beh9540 commented 8 years ago

@barakmich I'll fix it