How to move sync's data to another partition after run Bitcoind for a while?

1

I have download a new bitcoin package from official site. And then I ran it with daemon mode also with default configuration (Default means not bitcoin.conf file was created in ~/.bitcoin/.bitcoin.conf). After ran 2 hours. I got stuck, and the process exit. When I checked my disk with:

df -lh

And then, I got those:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        20G   20G  118M 100% /
devtmpfs        3.9G     0  3.9G   0% /dev
tmpfs           3.9G     0  3.9G   0% /dev/shm
tmpfs           3.9G  233M  3.6G   6% /run
tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/vdb        800G  7.7G  792G   1% /data
tmpfs           783M     0  783M   0% /run/user/1000
tmpfs           783M     0  783M   0% /run/user/1001

And I googled for a while, but could't find a good way to move all sync's data to the /dev/vdb. I understand what my mistake came from, but I just fixed it by move data and then put a new configuration with --data-dir=/dev/vdb. and then keep sync it.

So, How do I reach that?

Frank AK

Posted 2018-07-19T08:39:45.723

Reputation: 141

Rather than adding —data-dir to the config file, try starting bitcoind by running bitcoind —data-dir=[your directory] [whatever other commands you want to run].chytrik 2018-07-19T08:46:55.443

@chytrik Did you mean run the bitcoind with --data-dir like ./bitcoind --data-dir=/data?Frank AK 2018-07-19T08:48:29.137

^yea! Sorry I accidentally submitted my comment half-written, and had to edit to add the rest. Mobile keyboard problems :pchytrik 2018-07-19T08:49:53.423

Anyway, Thank you so much. And could you also point me how to move the old data to the new place?Frank AK 2018-07-19T08:52:04.750

1best way on unixoide systems to copy data over different media is rsync in a terminal. I usually go "rsync -rpogDtW <source_dir> <target_dir>". Further details are not bitcoin relevant, and should then be asked in another stackexchange forum.pebwindkraft 2018-07-23T06:59:12.707

Answers

0

I have try to ran the bitcoind -data-dir=/data/db -daemon , but it's not write the data to the path where I specify. Actually, The right way to do that with :

bitcoind -datadir=/data/db -daemon

Attention

   -data-dir --> -datadir

Frank AK

Posted 2018-07-19T08:39:45.723

Reputation: 141