Move bitcoind datadir from host to VM storage
This commit is contained in:
parent
756382ec9f
commit
bc11301782
@ -5,7 +5,7 @@ node.default['bitcoin']['usergroup'] = 'bitcoin'
|
|||||||
node.default['bitcoin']['network'] = 'mainnet'
|
node.default['bitcoin']['network'] = 'mainnet'
|
||||||
node.default['bitcoin']['conf_path'] = '/home/satoshi/.bitcoin/bitcoin.conf'
|
node.default['bitcoin']['conf_path'] = '/home/satoshi/.bitcoin/bitcoin.conf'
|
||||||
node.default['bitcoin']['walletdir'] = '/home/satoshi/.bitcoin'
|
node.default['bitcoin']['walletdir'] = '/home/satoshi/.bitcoin'
|
||||||
node.default['bitcoin']['datadir'] = '/mnt/data/bitcoin'
|
node.default['bitcoin']['datadir'] = '/home/satoshi/.bitcoin'
|
||||||
node.default['bitcoin']['blocksdir'] = '/mnt/data/blocks'
|
node.default['bitcoin']['blocksdir'] = '/mnt/data/blocks'
|
||||||
node.default['bitcoin']['blocksdir_mount_type'] = 'cifs'
|
node.default['bitcoin']['blocksdir_mount_type'] = 'cifs'
|
||||||
|
|
||||||
|
@ -3,27 +3,6 @@
|
|||||||
# Recipe:: source
|
# Recipe:: source
|
||||||
#
|
#
|
||||||
|
|
||||||
# TODO move to custom kosmos cookbook before publishing bitcoin cookbook
|
|
||||||
systemd_unit "mnt-data-bitcoin.mount" do
|
|
||||||
content({
|
|
||||||
Unit: {
|
|
||||||
Description: 'Bitcoin Core data directory',
|
|
||||||
},
|
|
||||||
Mount: {
|
|
||||||
What: '/var/lib/vmshare-bitcoin',
|
|
||||||
Where: '/mnt/data/bitcoin',
|
|
||||||
Type: '9p',
|
|
||||||
Options: 'trans=virtio,version=9p2000.L'
|
|
||||||
},
|
|
||||||
Install: {
|
|
||||||
WantedBy: 'multi-user.target'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
verify false
|
|
||||||
triggers_reload true
|
|
||||||
action [:create, :enable, :start]
|
|
||||||
end
|
|
||||||
|
|
||||||
build_essential
|
build_essential
|
||||||
include_recipe 'ark'
|
include_recipe 'ark'
|
||||||
|
|
||||||
@ -126,7 +105,7 @@ systemd_unit 'bitcoind.service' do
|
|||||||
Service: {
|
Service: {
|
||||||
User: bitcoin_user,
|
User: bitcoin_user,
|
||||||
Type: 'simple',
|
Type: 'simple',
|
||||||
ExecStart: "bitcoind -conf=#{bitcoin_conf_path} -datadir=#{bitcoin_datadir} #{bitcoind_blocksdir_argument} -walletdir=#{bitcoin_walletdir} -pid=#{bitcoin_datadir}/bitcoind.pid",
|
ExecStart: "bitcoind -conf=#{bitcoin_conf_path} -datadir=#{bitcoin_datadir} -walletdir=#{bitcoin_walletdir} #{bitcoind_blocksdir_argument} -pid=#{bitcoin_datadir}/bitcoind.pid",
|
||||||
PIDFile: "#{bitcoin_datadir}/bitcoind.pid",
|
PIDFile: "#{bitcoin_datadir}/bitcoind.pid",
|
||||||
Restart: 'always',
|
Restart: 'always',
|
||||||
PrivateTmp: true,
|
PrivateTmp: true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user