[Samba] CTDB - deleting database entries
Orlando Richards
orlando.richards at ed.ac.uk
Wed Dec 12 04:16:56 MST 2012
On 12/12/12 09:00, Orlando Richards wrote:
> On 11/12/12 10:17, Bjoern Baumbach wrote:
>> Hi Orlando!
>>
>> On 12/10/2012 04:01 PM, Orlando Richards wrote:
>>> Is there any way to remove entries in a CTDB cluster once they have been
>>> created, short of shutting down all nodes, editing each tdb manually,
>>> then starting them back up?
>>
>> Yes! You can use the undocumented dbwrap_tool.
>>
>> USAGE: dbwrap_tool <database> <op> [<key> [<type> [<value>]]]
>> ops: fetch, store, delete, erase, listkeys, listwatchers
>> types: int32, uint32, string, hex
>>
>> Example:
>> # list all the keys
>> dbwrap_tool yourdb.tdb listkeys
>>
>> # remove the record by key
>> dbwrap_tool yourdb.tdb delete "name of the key"
>>
>> Best regards
>> Björn
>>
>
> Excellent - thanks Bjoern, I'll give that a go.
Worked perfectly - though I had to rebuild the sernet src rpm to get the
binaries, since they're not included in the rpm packages you guys build
(btw - thanks again for providing them!), but that was easy enough.
I also had slight confusion because the "listkeys" will spit out
"S-12345...-1234/00" and "GID 12345/00" - and it took me a while to
realise that I had to drop the "/00" part when calling the "delete".
Thanks again Björn - and everyone at Sernet :)
--
--
Dr Orlando Richards
Information Services
IT Infrastructure Division
Unix Section
Tel: 0131 650 4994
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
More information about the samba
mailing list