You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by onmstester onmstester <on...@zoho.com> on 2018/06/24 04:23:15 UTC

copy sstables while cassandra is running

Hi I'm using two directories on different disks as cassandra data storage, the small disk is 90% full and the bigger diskis 30% full (the bigger one was added later that we find out we need more storage!!), so i want to move all data to the big disk, one way is to stop my application and copy all sstables from small disk to big one, but it would take some hours and not acceptable due to QoS. I thought maybe i could copy the big sstables (the one that won't be compact in weeks) to the big disk (near casssandra data but not right there) while cassandra and my app are still running , then stop cassandra and my app, move big file to exact directory of cassandra data on big disk (would take a few seconds) and then move remained small sstables from  small disk to big one. Are there all of sstables related file immutable and (data, index, summary, ...) would only be changed by compactions? Any better workaround for this scenario would be appriciated? Thanks in Advance Sent using Zoho Mail

Re: copy sstables while cassandra is running

Posted by Jeff Jirsa <jj...@gmail.com>.
rsync while running. Stop. Rsync again. Start.



-- 
Jeff Jirsa


> On Jun 24, 2018, at 1:05 PM, Nitan Kainth <ni...@gmail.com> wrote:
> 
> Yeah you are right Pradeep. I overlooked the point there. 
> 
> Sent from my iPhone
> 
>> On Jun 24, 2018, at 1:10 PM, Pradeep Chhetri <pr...@stashaway.com> wrote:
>> 
>> I doubt mv will run instantly because copy is across two different filesystems
>> 
>>> On Sun, 24 Jun 2018 at 9:26 PM, Nitan Kainth <ni...@gmail.com> wrote:
>>> To be safe you could follow below prices on each node one at a time:
>>> Stop Cassandra
>>> Move sstable— mv will do it instantly
>>> Start Cassandra
>>> 
>>> If you do it online and a read trust comes for sane data that is being moved will fail.
>>> 
>>>> On Jun 23, 2018, at 11:23 PM, onmstester onmstester <on...@zoho.com> wrote:
>>>> 
>>>> Hi 
>>>> I'm using two directories on different disks as cassandra data storage, the small disk is 90% full and the bigger diskis 30% full (the bigger one was added later that we find out we need more storage!!),
>>>> so i want to move all data to the big disk, one way is to stop my application and copy all sstables from small disk to big one, but it would take some hours and not acceptable due to QoS.
>>>> I thought maybe i could copy the big sstables (the one that won't be compact in weeks) to the big disk (near casssandra data but not right there) while cassandra and my app are still running
>>>> , then stop cassandra and my app, move big file to exact directory of cassandra data on big disk (would take a few seconds) and then move remained small sstables from  small disk to big one.
>>>> Are there all of sstables related file immutable and (data, index, summary, ...) would only be changed by compactions? Any better workaround for this scenario would be appriciated?
>>>> Thanks in Advance
>>>> 
>>>> Sent using Zoho Mail
>>>> 
>>>> 
>>>> 

Re: copy sstables while cassandra is running

Posted by Nitan Kainth <ni...@gmail.com>.
Yeah you are right Pradeep. I overlooked the point there. 

Sent from my iPhone

> On Jun 24, 2018, at 1:10 PM, Pradeep Chhetri <pr...@stashaway.com> wrote:
> 
> I doubt mv will run instantly because copy is across two different filesystems
> 
>> On Sun, 24 Jun 2018 at 9:26 PM, Nitan Kainth <ni...@gmail.com> wrote:
>> To be safe you could follow below prices on each node one at a time:
>> Stop Cassandra
>> Move sstable— mv will do it instantly
>> Start Cassandra
>> 
>> If you do it online and a read trust comes for sane data that is being moved will fail.
>> 
>>> On Jun 23, 2018, at 11:23 PM, onmstester onmstester <on...@zoho.com> wrote:
>>> 
>>> Hi 
>>> I'm using two directories on different disks as cassandra data storage, the small disk is 90% full and the bigger diskis 30% full (the bigger one was added later that we find out we need more storage!!),
>>> so i want to move all data to the big disk, one way is to stop my application and copy all sstables from small disk to big one, but it would take some hours and not acceptable due to QoS.
>>> I thought maybe i could copy the big sstables (the one that won't be compact in weeks) to the big disk (near casssandra data but not right there) while cassandra and my app are still running
>>> , then stop cassandra and my app, move big file to exact directory of cassandra data on big disk (would take a few seconds) and then move remained small sstables from  small disk to big one.
>>> Are there all of sstables related file immutable and (data, index, summary, ...) would only be changed by compactions? Any better workaround for this scenario would be appriciated?
>>> Thanks in Advance
>>> 
>>> Sent using Zoho Mail
>>> 
>>> 
>>> 

Re: copy sstables while cassandra is running

Posted by Pradeep Chhetri <pr...@stashaway.com>.
I doubt mv will run instantly because copy is across two different
filesystems

On Sun, 24 Jun 2018 at 9:26 PM, Nitan Kainth <ni...@gmail.com> wrote:

> To be safe you could follow below prices on each node one at a time:
> Stop Cassandra
> Move sstable— mv will do it instantly
> Start Cassandra
>
> If you do it online and a read trust comes for sane data that is being
> moved will fail.
>
> On Jun 23, 2018, at 11:23 PM, onmstester onmstester <on...@zoho.com>
> wrote:
>
> Hi
> I'm using two directories on different disks as cassandra data storage,
> the small disk is 90% full and the bigger diskis 30% full (the bigger one
> was added later that we find out we need more storage!!),
> so i want to move all data to the big disk, one way is to stop my
> application and copy all sstables from small disk to big one, but it would
> take some hours and not acceptable due to QoS.
> I thought maybe i could copy the big sstables (the one that won't be
> compact in weeks) to the big disk (near casssandra data but not right
> there) while cassandra and my app are still running
> , then stop cassandra and my app, move big file to exact directory of
> cassandra data on big disk (would take a few seconds) and then move
> remained small sstables from  small disk to big one.
> Are there all of sstables related file immutable and (data, index,
> summary, ...) would only be changed by compactions? Any better workaround
> for this scenario would be appriciated?
> Thanks in Advance
>
> Sent using Zoho Mail <https://www.zoho.com/mail/>
>
>
>

Re: copy sstables while cassandra is running

Posted by Nitan Kainth <ni...@gmail.com>.
To be safe you could follow below prices on each node one at a time:
Stop Cassandra
Move sstable— mv will do it instantly
Start Cassandra

If you do it online and a read trust comes for sane data that is being moved will fail.

> On Jun 23, 2018, at 11:23 PM, onmstester onmstester <on...@zoho.com> wrote:
> 
> Hi 
> I'm using two directories on different disks as cassandra data storage, the small disk is 90% full and the bigger diskis 30% full (the bigger one was added later that we find out we need more storage!!),
> so i want to move all data to the big disk, one way is to stop my application and copy all sstables from small disk to big one, but it would take some hours and not acceptable due to QoS.
> I thought maybe i could copy the big sstables (the one that won't be compact in weeks) to the big disk (near casssandra data but not right there) while cassandra and my app are still running
> , then stop cassandra and my app, move big file to exact directory of cassandra data on big disk (would take a few seconds) and then move remained small sstables from  small disk to big one.
> Are there all of sstables related file immutable and (data, index, summary, ...) would only be changed by compactions? Any better workaround for this scenario would be appriciated?
> Thanks in Advance
> 
> Sent using Zoho Mail
> 
> 
>