Wiping data directory break vnodes with read_block_error

2013-02-27 Thread Jonas Lindmark
Hi,

I'm looking for a way to manually wipe the data off of a single-node riak
installation. I'm using riak (1.3.0 2013-02-19) Debian x86_64 with the
riak_kv_eleveldb_backend.

What I'm currently doing is:


   - riak stop
   - rm -rf /var/lib/riak
   - mkdir riak
   - chown riak:riak riak
   - start riak

Riak starts ok but a riak-admin vnode-status gives me:

Backend: riak_kv_eleveldb_backend
Status:
[{stats,<<"   Compactions\nLevel  Files
Size(MB) Time(sec) Read(MB)
Write(MB)\n--\n">>},
 {read_block_error,<<"0">>}]

For each vnode.

It seems to me that there is something more I need to wipe for this to work
but I can't find which files that would be.

/Jonas
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Wiping data directory break vnodes with read_block_error

2013-02-28 Thread Jonas Lindmark
I realize now that read_block_error, <<"0">> means that there was not an
error...

I still get problems when running my integration tests:
{insufficient_vnodes,0,need,2}
status code 0

Could it be a timing issue where I start my integration tests too early
after 'riak start'?


On 28 February 2013 08:55, Jonas Lindmark  wrote:

> Hi,
>
> I'm looking for a way to manually wipe the data off of a single-node riak
> installation. I'm using riak (1.3.0 2013-02-19) Debian x86_64 with the
> riak_kv_eleveldb_backend.
>
> What I'm currently doing is:
>
>
>- riak stop
>- rm -rf /var/lib/riak
>- mkdir riak
>- chown riak:riak riak
>- start riak
>
> Riak starts ok but a riak-admin vnode-status gives me:
>
> Backend: riak_kv_eleveldb_backend
> Status:
> [{stats,<<"   Compactions\nLevel  Files
> Size(MB) Time(sec) Read(MB)
> Write(MB)\n--\n">>},
>  {read_block_error,<<"0">>}]
>
> For each vnode.
>
> It seems to me that there is something more I need to wipe for this to
> work but I can't find which files that would be.
>
> /Jonas
>



-- 
/Jonas
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Wiping data directory break vnodes with read_block_error

2013-03-01 Thread Jonas Lindmark
Thanks for the advice, I'll be sure to try it out soon and report back.

/jonas
On Feb 28, 2013 7:01 PM, "Brian Shumate"  wrote:

> Hello Jonas,
>
> I think the issue is that you actually wiped out too much by removing
> the entire /var/lib/riak directory.
>
> Typically when resetting the data directories on a Riak node, you'd remove
> the contents of only those backend directories which correspond to the ones
> defined in your app.config.
>
> For example, if you are using the Bitcask backend, you'd want to only do
> something like:
>
> riak stop
> sudo rm -rf /var/lib/riak/bitcask/*
> riak start
>
> This removes all Bitcask data but preserves the node's ring state.
>
> If you wanted to reset _both_ the Bitcask data and the ring state you'd do:
>
> riak stop
> sudo rm -rf /var/lib/riak/bitcask/*
> sudo rm -rf /var/lib/riak/ring/*
> riak start
>
> This would essentially reset the node back to a new state while retaining
> any configuration changes you already specified in app.config or vm.args.
>
> I hope this helps.
>
> Regards,
>
> Brian Shumate
>
> On Feb 28, 2013, at 2:55 AM, Jonas Lindmark wrote:
>
> > Hi,
> >
> > I'm looking for a way to manually wipe the data off of a single-node
> riak installation. I'm using riak (1.3.0 2013-02-19) Debian x86_64 with the
> riak_kv_eleveldb_backend.
> >
> > What I'm currently doing is:
> >
> >   • riak stop
> >   • rm -rf /var/lib/riak
> >   • mkdir riak
> >   • chown riak:riak riak
> >   • start riak
> > Riak starts ok but a riak-admin vnode-status gives me:
> >
> > Backend: riak_kv_eleveldb_backend
> > Status:
> > [{stats,<<"   Compactions\nLevel  Files
> Size(MB) Time(sec) Read(MB)
> Write(MB)\n--\n">>},
> >  {read_block_error,<<"0">>}]
> >
> > For each vnode.
> >
> > It seems to me that there is something more I need to wipe for this to
> work but I can't find which files that would be.
> >
> > /Jonas
> > ___
> > riak-users mailing list
> > riak-users@lists.basho.com
> > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Wiping data directory break vnodes with read_block_error

2013-03-06 Thread Jonas Lindmark
Hi, tested and while only wiping leveldb and ring helped ultimately I
modified my wipe script to

riak stop
rm -rf /var/lib/riak/ring/*
rm -rf /var/lib/riak/leveldb/*
riak start
riak-admin wait-for-service riak_kv riak@127.0.0.1

Which worked like a charm.

Regards
Jonas


On 1 March 2013 20:46, Jonas Lindmark  wrote:

> Thanks for the advice, I'll be sure to try it out soon and report back.
>
> /jonas
> On Feb 28, 2013 7:01 PM, "Brian Shumate"  wrote:
>
>> Hello Jonas,
>>
>> I think the issue is that you actually wiped out too much by removing
>> the entire /var/lib/riak directory.
>>
>> Typically when resetting the data directories on a Riak node, you'd remove
>> the contents of only those backend directories which correspond to the
>> ones
>> defined in your app.config.
>>
>> For example, if you are using the Bitcask backend, you'd want to only do
>> something like:
>>
>> riak stop
>> sudo rm -rf /var/lib/riak/bitcask/*
>> riak start
>>
>> This removes all Bitcask data but preserves the node's ring state.
>>
>> If you wanted to reset _both_ the Bitcask data and the ring state you'd
>> do:
>>
>> riak stop
>> sudo rm -rf /var/lib/riak/bitcask/*
>> sudo rm -rf /var/lib/riak/ring/*
>> riak start
>>
>> This would essentially reset the node back to a new state while retaining
>> any configuration changes you already specified in app.config or vm.args.
>>
>> I hope this helps.
>>
>> Regards,
>>
>> Brian Shumate
>>
>> On Feb 28, 2013, at 2:55 AM, Jonas Lindmark wrote:
>>
>> > Hi,
>> >
>> > I'm looking for a way to manually wipe the data off of a single-node
>> riak installation. I'm using riak (1.3.0 2013-02-19) Debian x86_64 with the
>> riak_kv_eleveldb_backend.
>> >
>> > What I'm currently doing is:
>> >
>> >   • riak stop
>> >   • rm -rf /var/lib/riak
>> >   • mkdir riak
>> >   • chown riak:riak riak
>> >   • start riak
>> > Riak starts ok but a riak-admin vnode-status gives me:
>> >
>> > Backend: riak_kv_eleveldb_backend
>> > Status:
>> > [{stats,<<"   Compactions\nLevel  Files
>> Size(MB) Time(sec) Read(MB)
>> Write(MB)\n--\n">>},
>> >  {read_block_error,<<"0">>}]
>> >
>> > For each vnode.
>> >
>> > It seems to me that there is something more I need to wipe for this to
>> work but I can't find which files that would be.
>> >
>> > /Jonas
>> > ___
>> > riak-users mailing list
>> > riak-users@lists.basho.com
>> > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>
>>


-- 
/Jonas
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com