Kitten: a sleeping cat curled on a stack of servers
kitten

Resize your disk.The cat doesn't flinch.

Kitten is a GPL-3.0 tool, written in Rust, that rearranges the partitions on your disk in place. One reboot, no live USB. Every step is journaled and every chunk verified, so a power cut at any moment cannot cost you a byte: the move resumes exactly where it stopped.

under active development. not yet for a disk you can't lose.

shrink a partition, then cut the power mid-move.

kitten /dev/nvme0n1journaled move
drag me
journal @ lba 2048
no entries yet
drag the white boundary to plan a resize
KT-500power

$ man gparted

Disk surgery, as currently practiced.

Today a resize means finding a USB stick, flashing a live image, booting from it, and then this. One long, uninterruptible write, with nothing on disk to say how far it got.

Moving /dev/sda2 (43%)×

DO NOT turn off the computer.

Cancelling this operation or losing power before it completes will most likely cause SEVERE data loss and an unbootable system.

Elapsed: 1:47:12. Remaining: unknown.

Cancel

the industry standard, since 2004.

$ kitten apply

rearranging your disk ...

If the power goes out, just turn the computer back on.

kitten's entire disaster-recovery manual.

The difference is the journal. Kitten commits every chunk as it goes, so an interruption is a pause, not a disaster. Power cut, kernel panic, cat on the power strip: turn the machine back on and the move resumes from the exact chunk it was copying.

$ kitten plan --explain

One reboot. Six steps.

running: your OS
▸
▸
system
media
plan
plan + journal live on the disk, not in RAM
map changes only after the data is in place
z z z
  1. step 1 of 6

    You plan it from your desk

    Pick the new layout while your OS is running. Kitten checks the plan against the real disk and refuses anything it cannot prove safe, before a single byte is written.

  2. step 2 of 6

    The plan goes onto the disk itself

    Kitten writes the plan and a journal to the disk. From this point the disk carries its own instructions. RAM, the OS, even Kitten itself can vanish without losing the thread.

  3. step 3 of 6

    One reboot, into the mover

    The machine restarts into a tiny Rust recovery environment, about two megabytes, running before any operating system. No live USB. Nothing else is awake to interfere.

  4. step 4 of 6

    Chunks move one at a time

    Each chunk is copied to its new home, read back, verified against the source, and committed to the journal. Only then does the next chunk move.

  5. step 5 of 6

    The table updates last

    Data first, table last. The partition map changes only after every byte is already in place, so there is never an instant when the map lies about where your data lives.

  6. step 6 of 6

    Your OS boots. Same files, new shape.

    To the filesystem, nothing happened. To you, the disk finally has the layout you wanted. Total downtime: one reboot and the move itself.

$ kitten verify

A power cut pauses the move. It cannot corrupt it.

At every instant during a move, each chunk of your data exists intact in at least one place on the disk, and the journal knows which place that is. Kill the power at the worst possible moment and nothing is lost: on the next boot the mover reads the journal, re-copies the one chunk that was mid-flight, verifies it, and keeps going as if nothing happened.

t−2.1schunk 11 copied, verified, committed
t−0.4schunk 12 copy begins
t+0.0s power lost
on diskjournal intact. chunks 1..11 committed. chunk 12 source untouched.
rebootjournal read. chunk 12 recopied, verified. resumed.

At no point during a move is your data in only one place on the disk.

$ kitten migrate --to new-hardware

coming soon, not yet released

Next: the whole machine moves.

Machine-to-machine live migration. Copy a running machine onto new hardware while it keeps working, then cut over to a verified, byte-for-byte copy. Same journal discipline, bigger jump.

in development, not released yet.

$ cat SPEC.md

Crash-safe by design, not by luck.

Kitten is written against a strict data-safety specification. These are its invariants, in human terms.

refuse before writing
Every plan is validated against the disk as it actually is. A plan that cannot be proven safe never writes its first byte.
verify every chunk
A copy does not count until it reads back identical to its source. Trust nothing, not even the disk's own acknowledgement.
the journal is the truth
On boot, the mover believes the journal over everything, including its own memory of what it was doing. Memory lies after a crash. The journal doesn't.
data first, table last
The partition map is updated only after every byte is in its new home. The map never points at data that isn't there.
crash-tested on purpose
The test harness kills the mover at every step boundary, thousands of times, and expects a byte-perfect resume after each one.
small enough to read
The mover is a small, focused piece of Rust under GPL-3.0. Don't take our word for any of this. Read it.

Kitten is under active development. run it on VMs and machines you can reinstall, not yet on a disk you can't lose.