Bitcoin Forum
April 28, 2024, 03:02:19 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: bitcoind unable to read settings.json on external ssd  (Read 197 times)
defa1 (OP)
Jr. Member
*
Offline Offline

Activity: 55
Merit: 67


View Profile
June 29, 2021, 02:28:26 PM
 #1

I installed ubuntu server on my pi and attached and mounted an external ssd which already contains a bitcoin datadirectory. When I run:

bitcoind -datadir=/media/external/bitcoin-datadir -conf=/media/external/bitcoin-datadir/bitcoin.conf

I get as a result:

Error: Failed saving settings file:
- Error: Unable to open settings file /media/external/bitcoin-datadir/settings.json.tmp for writing

I'd be grateful is anyone can assist with this.

edit: I was using the SSD before with bitcoin-qt if that makes any difference
Every time a block is mined, a certain amount of BTC (called the subsidy) is created out of thin air and given to the miner. The subsidy halves every four years and will reach 0 in about 130 years.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
ranochigo
Legendary
*
Offline Offline

Activity: 2954
Merit: 4165


View Profile
June 29, 2021, 03:25:50 PM
 #2

Did you give the file write permissions?

chmod 644 settings.json? That gives you the permission to read and write to file.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
NotATether
Legendary
*
Offline Offline

Activity: 1582
Merit: 6697


bitcoincleanup.com / bitmixlist.org


View Profile WWW
June 29, 2021, 05:25:07 PM
 #3

It could be that only root can write to disk, not the admins (the adm group). You should navigate to /run/media/<the uuid of the partition> and execute chgrp adm followed by chmod g+w. You can find the UUID of your partition with fdisk -l and blkid commands.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
defa1 (OP)
Jr. Member
*
Offline Offline

Activity: 55
Merit: 67


View Profile
June 29, 2021, 10:48:59 PM
 #4

I can create .txt files on the ssd using sudo touch so I can write to disk. If I run blkid I get the following:

/dev/mmcblk0p1: LABEL_FATBOOT="system-boot" LABEL="system-boot" UUID="4D3B-86C0" TYPE="vfat" PARTUUID="4ec8ea53-01"
/dev/mmcblk0p2: LABEL="writable" UUID="79af43d1-801b-4c28-81d5-724c930bcc83" TYPE="ext4" PARTUUID="4ec8ea53-02"
/dev/sda: LABEL_FATBOOT="bitcoin" LABEL="bitcoin" UUID="E440-25BD" TYPE="vfat"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/loop4: TYPE="squashfs"
/dev/loop5: TYPE="squashfs"

with /dev/sda being the ssd. "cd /run/media/E440-25BD" gets me "-bash: cd: /run/media/E440-25BD: No such file or directory"

fdisk -l doesn't give me the UUID for the ssd either, only:

Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: Tech           
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

and more information about other partitions
BitMaxz
Legendary
*
Offline Offline

Activity: 3234
Merit: 2943


Block halving is coming.


View Profile WWW
June 29, 2021, 11:34:56 PM
 #5

Can you follow the guide from this link below on how to configure the external drive for your raspi

- https://howchoo.com/bitcoin/run-bitcoin-full-node-raspberry-pi#configure-the-external-hard-drive

It needs to configure the external drive first before you are able to use and write data to your external drive. I don't know if there is a difference between using HDD and SSD.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
defa1 (OP)
Jr. Member
*
Offline Offline

Activity: 55
Merit: 67


View Profile
June 29, 2021, 11:37:04 PM
 #6

Thanks, but I've been looking at that guide all night already. Problem seems to be that I cannot change permissions or owners of the files on the drive.
I'm thinking about formatting the drive and just downloading the blockchain again.
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
June 30, 2021, 12:29:25 AM
 #7

I can create .txt files on the ssd using sudo touch so I can write to disk.
No... you're using sudo... so the root account can write to the disk. I suspect that you're not running bitcoind as root (and you shouldn't be!) which is why it errors out saying that it can't write the temp file.


Problem seems to be that I cannot change permissions or owners of the files on the drive.
It would appear that it is indeed most likely a permissions issue... but I'm surprised that a sudo chown and sudo chgrp won't let you modify the permissions tho? Huh

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
NotATether
Legendary
*
Offline Offline

Activity: 1582
Merit: 6697


bitcoincleanup.com / bitmixlist.org


View Profile WWW
June 30, 2021, 07:18:04 AM
 #8

It would appear that it is indeed most likely a permissions issue... but I'm surprised that a sudo chown and sudo chgrp won't let you modify the permissions tho? Huh

Apparently, sudo actions are done with the sudo group, not the adm group: https://superuser.com/questions/86347/whats-difference-between-group-admin-and-adm

I can create .txt files on the ssd using sudo touch so I can write to disk. If I run blkid I get the following:

~

with /dev/sda being the ssd. "cd /run/media/E440-25BD" gets me "-bash: cd: /run/media/E440-25BD: No such file or directory"

Try checking /etc/fstab if the UUID is in there, if the disk is mounted on boot then it should surely be there.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
defa1 (OP)
Jr. Member
*
Offline Offline

Activity: 55
Merit: 67


View Profile
June 30, 2021, 03:11:36 PM
 #9

Thanks for the help everyone. I'm going to connect this drive to my linux laptop and format it using the nice and easy gui. I'll have to redownload the blockchain but that's not a big deal.
defa1 (OP)
Jr. Member
*
Offline Offline

Activity: 55
Merit: 67


View Profile
July 01, 2021, 10:32:19 PM
 #10

Not sure I got a drive with 400 GB of space lying around but that would indeed be a good idea.
defa1 (OP)
Jr. Member
*
Offline Offline

Activity: 55
Merit: 67


View Profile
July 02, 2021, 05:41:46 PM
 #11

I formatted the drive to ext4 and it still wouldn't work, but now I was able to chown /mnt/bitcoin so I finally started IBD!!
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
July 02, 2021, 11:28:29 PM
 #12

I formatted the drive to ext4 and it still wouldn't work, but now I was able to chown /mnt/bitcoin so I finally started IBD!!
That is a very strange outcome... when you "formatted" it, did you completely remove all the partitions and start from scratch, or did you just format the existing partition? Huh

I'm guessing that the old vfat system just wasn't handling the file permissions properly... glad you at least managed to get the IBD underway! Wink

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
defa1 (OP)
Jr. Member
*
Offline Offline

Activity: 55
Merit: 67


View Profile
July 03, 2021, 09:00:09 AM
 #13

I deleted everything on the drive and formatted in ext4.
Cricktor
Hero Member
*****
Offline Offline

Activity: 742
Merit: 1077


Crypto Swap Exchange


View Profile
July 03, 2021, 12:06:09 PM
 #14

Initially your drive was formatted as VFAT which I wouldn't consider the best option to use with a Raspi. Though I assume you could've saved the setup by giving an appropriate owner and group option in fstab, so that after mounting bitcoind would be happy and would've write access to it.

Anyway, reformatting to ext4 or any better supported filesystem for Linux where you can properly set permissions and ownership is the better option.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
July 03, 2021, 10:31:52 PM
 #15

Yeah, I assume the VFAT option was originally chosen for compatibility with Windows? Huh

In any case, one of the more linux-centric filesystems is definitely the better option going forward (assuming you don't need the ability to read the drive on a Windows system)

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
defa1 (OP)
Jr. Member
*
Offline Offline

Activity: 55
Merit: 67


View Profile
July 04, 2021, 06:03:11 PM
 #16

Yeah, I assume the VFAT option was originally chosen for compatibility with Windows? Huh

No I only used the drive with Raspberry Pi OS before. Just plugged it in and it worked although maybe they formatted it for Windows by default during production.
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
July 05, 2021, 08:37:19 PM
 #17

Ahhhh ok. Yeah, most external drives tend to be formatted for use with Windows by default. There are some exceptions where I have seen drives that are marketed as "OSX external drives" etc.

I actually purchased a fairly typical 1TB External HDD yesterday. Works fine with Windows, but when I connected it to the Pi it was completely unreadable unless I formatted the thing Roll Eyes

Yay for "standards" Roll Eyes

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!