Author

Topic: bitcoind unable to read settings.json on external ssd (Read 226 times)

legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
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)

If you only need to read the drive, you could always install driver for linux filesystem on Windows. But if you also need to modify the drive, OP should choose btrfs since AFAIK only btrfs driver for windows is actively developed.
HCP
legendary
Activity: 2086
Merit: 4361
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
jr. member
Activity: 55
Merit: 67
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
Activity: 2086
Merit: 4361
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)
hero member
Activity: 714
Merit: 1010
Crypto Swap Exchange
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.
jr. member
Activity: 55
Merit: 67
I deleted everything on the drive and formatted in ext4.
HCP
legendary
Activity: 2086
Merit: 4361
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
jr. member
Activity: 55
Merit: 67
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!!
jr. member
Activity: 55
Merit: 67
Not sure I got a drive with 400 GB of space lying around but that would indeed be a good idea.
jr. member
Activity: 55
Merit: 67
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.
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
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.
HCP
legendary
Activity: 2086
Merit: 4361
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
jr. member
Activity: 55
Merit: 67
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.
legendary
Activity: 3374
Merit: 3095
Playbet.io - Crypto Casino and Sportsbook
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.
jr. member
Activity: 55
Merit: 67
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
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
It could be that only root can write to disk, not the admins (the adm group). You should navigate to /run/media/ and execute chgrp adm followed by chmod g+w. You can find the UUID of your partition with fdisk -l and blkid commands.
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
Did you give the file write permissions?

chmod 644 settings.json? That gives you the permission to read and write to file.
jr. member
Activity: 55
Merit: 67
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
Jump to: