Author

Topic: howto share .bitcoin/blocks directory (Read 2158 times)

Zz
legendary
Activity: 1820
Merit: 1077
October 28, 2016, 08:46:47 PM
#10
Hello All,
I gave up.
I found partial solution
we lost 240GB Sad

write this script :

Code:
#!/bin/bash
#
rsync -avzh /root/.bitcoin --exclude=wallet.dat --exclude=bitcoin.conf /home/user1/.bitcoin
chown user1:user1 -R /home/user1/.bitcoin
#
rsync -avzh /root/.bitcoin --exclude=wallet.dat --exclude=bitcoin.conf /home/user2/.bitcoin
chown user2:user2 -R /home/user1/.bitcoin
#
rsync -avzh /root/.bitcoin --exclude=wallet.dat --exclude=bitcoin.conf /home/user3/.bitcoin
chown user3:user3 -R /home/user1/.bitcoin

Zz
legendary
Activity: 1820
Merit: 1077
October 24, 2016, 12:50:41 AM
#9
Multiple instances of Bitcoin Core on the same computer cannot share the same blocks (or data directory) folder. They will run into simultaneous write issues and corrupt the data on the disk.
Wouldn't that not be a problem in this case because OP said 3 accounts on the same computer, and to switch accounts, you need to log off, closing all running programs. Bitcoin Core would never be writing at the same time with other instances, so nothing would be corrupted.
They're being run simultaneously from 3 shells.
We use the same computer 3 people
3 shell accounts;



yes simultaneously 3 user.
https://www.ncomputing.com/en/products/lseries/overview
this linux Vspace server. (works fine.)


staff
Activity: 3458
Merit: 6793
Just writing some code
October 23, 2016, 04:57:28 PM
#8
Multiple instances of Bitcoin Core on the same computer cannot share the same blocks (or data directory) folder. They will run into simultaneous write issues and corrupt the data on the disk.
Wouldn't that not be a problem in this case because OP said 3 accounts on the same computer, and to switch accounts, you need to log off, closing all running programs. Bitcoin Core would never be writing at the same time with other instances, so nothing would be corrupted.
They're being run simultaneously from 3 shells.
We use the same computer 3 people
3 shell accounts;
legendary
Activity: 2772
Merit: 3284
October 23, 2016, 04:53:03 PM
#7
Multiple instances of Bitcoin Core on the same computer cannot share the same blocks (or data directory) folder. They will run into simultaneous write issues and corrupt the data on the disk.
Wouldn't that not be a problem in this case because OP said 3 accounts on the same computer, and to switch accounts, you need to log off, closing all running programs. Bitcoin Core would never be writing at the same time with other instances, so nothing would be corrupted.
staff
Activity: 3458
Merit: 6793
Just writing some code
October 23, 2016, 04:09:59 PM
#6
new setup:
create 3 bitcoin adress on one bitcoind (run as root)
works fine but only one rpc user??
I need 3 rpc user?
if I can create 3 rpc users for 3 bitcoin adresses, users runs bitcoin-cli

You only need one rpc user. However, you should not do this. Bitcoin sent from one address will end up in a change address. Bitcoin Core does not know that the three addresses are meant for three separate users. It thinks that they are all part of the same wallet (because they are) and treat them as such. Thus you will end up with one user accidentally spending the Bitcoin of another user. The only way around this is to use raw transactions and that can be a dangerous if you don't know what you are doing.
Zz
legendary
Activity: 1820
Merit: 1077
October 23, 2016, 04:05:50 PM
#5
Multiple instances of Bitcoin Core on the same computer cannot share the same blocks (or data directory) folder. They will run into simultaneous write issues and corrupt the data on the disk.

Well,
exchanges or web wallets are how it works?
They are probably not using Bitcoin Core and are probably using a proprietary system which allows them to have multiple wallets on the same instance of the software. Or they are using Bitcoin Core for purely the P2P part (not the wallet) and using an external wallet software which can interact with Bitcoin Core in order to conduct P2P operations (i.e. sending and receiving transactions).

new setup:
create 3 bitcoin adress on one bitcoind (run as root)
works fine but only one rpc user??
I need 3 rpc user?
if I can create 3 rpc users for 3 bitcoin adresses, users runs bitcoin-cli
staff
Activity: 3458
Merit: 6793
Just writing some code
October 23, 2016, 03:48:18 PM
#4
Multiple instances of Bitcoin Core on the same computer cannot share the same blocks (or data directory) folder. They will run into simultaneous write issues and corrupt the data on the disk.

Well,
exchanges or web wallets are how it works?
They are probably not using Bitcoin Core and are probably using a proprietary system which allows them to have multiple wallets on the same instance of the software. Or they are using Bitcoin Core for purely the P2P part (not the wallet) and using an external wallet software which can interact with Bitcoin Core in order to conduct P2P operations (i.e. sending and receiving transactions).
Zz
legendary
Activity: 1820
Merit: 1077
October 23, 2016, 03:46:35 PM
#3
Multiple instances of Bitcoin Core on the same computer cannot share the same blocks (or data directory) folder. They will run into simultaneous write issues and corrupt the data on the disk.

Well,
exchanges or web wallets are how it works?
staff
Activity: 3458
Merit: 6793
Just writing some code
October 23, 2016, 03:42:06 PM
#2
Multiple instances of Bitcoin Core on the same computer cannot share the same blocks (or data directory) folder. They will run into simultaneous write issues and corrupt the data on the disk.
Zz
legendary
Activity: 1820
Merit: 1077
October 23, 2016, 03:40:04 PM
#1
Hello,
We use the same computer 3 people
3 shell accounts;
user1@kutaypc : /home/user1/.bitcoin
user2@kutaypc : /home/user2/.bitcoin
user3@kutaypc : /home/user1/.bitcoin

we have jointly directory ~/.bitcoin/blocks

our setup :

add bitcoiners group
users add bitcoiners group
mkdir /home/blocks
chown root:bitcoiners /usr/bin/bitcoind
chown root:bitcoiners /usr/bin/bitcoin-qt
ln -fs /home/blocks /root/.bitcoin/blocks
run bitcoind -daemon
control debug.log bitcoind is fine!

and switch user1
echo "listen=0" > /home/user1/.bitcoin/bitcoin.conf

and run second bitcoind at user1 account. works fine.
stop bitcoind
rm -rf /home/user1/.bitcoin/blocks
ln -fs /home/blocks /home/user1/blocks
newgrp bticoiners (switch to bitcoiners group)
and run second bitcoind at user1 account.

program crashed!

any solutions ?
Jump to: