Can I change data folder at any time? or just new nodes?

Hi Cockroach gurus,

I’m thinking ahead to having to upgrade to block storage for my cockroach db droplets on digital ocean. Is it possible to shut down a cockroach node, move the data folder and then restart the node specifying the new folder?

will that work? or should I start with block storage right away so I do not have to move my data at any point?

Thanks,

Tom

Hi Tom,

moving data should work as you describe. A data directory isn’t tied to its location or the underlying file system (well, shouldn’t be and we’ve never seen any bugs with that regard in our testing). Perhaps the only thing to be cognizant of is that the total amount of disk space can influence replica placement (for example, if the disk is nearly full, CockroachDB will try to move data elsewhere). But that isn’t a concern in your case where supposedly that new disk you’re moving to is large enough.

Best,

Tobias

1 Like

thank you very much for confirming that. happy to hear that I don’t need to be psychic :slight_smile: