allada / eth-archive-snapshot

Free public Ethereum Archive Snapshot
Apache License 2.0
61 stars 10 forks source link

invalid vdev specification #5

Closed 0xSheller closed 1 year ago

0xSheller commented 1 year ago

Getting the following error:

+ aws s3 ls --request-payer=requester s3://public-blockchain-snapshots
                           PRE bsc/
                           PRE eth/
                           PRE nimbus/
+ source /root/.cargo/env
++ case ":${PATH}:" in
+ setup_drives
+ set -euxo pipefail
+ zfs list tank
cannot open 'tank': dataset does not exist
+ DEVICES=($(lsblk --fs --json | jq -r '.blockdevices[] | select(.children == null and .fstype == null) | .name'))
++ lsblk --fs --json
++ jq -r '.blockdevices[] | select(.children == null and .fstype == null) | .name'
+ DEVICES_FULLNAME=()
+ for DEVICE in "${DEVICES[@]}"
+ DEVICES_FULLNAME+=("/dev/$DEVICE")
+ for DEVICE in "${DEVICES[@]}"
+ DEVICES_FULLNAME+=("/dev/$DEVICE")
+ for DEVICE in "${DEVICES[@]}"
+ DEVICES_FULLNAME+=("/dev/$DEVICE")
+ for DEVICE in "${DEVICES[@]}"
+ DEVICES_FULLNAME+=("/dev/$DEVICE")
+ for DEVICE in "${DEVICES[@]}"
+ DEVICES_FULLNAME+=("/dev/$DEVICE")
+ for DEVICE in "${DEVICES[@]}"
+ DEVICES_FULLNAME+=("/dev/$DEVICE")
+ for DEVICE in "${DEVICES[@]}"
+ DEVICES_FULLNAME+=("/dev/$DEVICE")
+ for DEVICE in "${DEVICES[@]}"
+ DEVICES_FULLNAME+=("/dev/$DEVICE")
+ zpool create -o ashift=12 tank /dev/loop0 /dev/loop1 /dev/loop2 /dev/loop3 /dev/loop4 /dev/loop5 /dev/loop6 /dev/nvme1n1
invalid vdev specification
use '-f' to override the following errors:
/dev/loop0 contains a filesystem of type 'squashfs'
/dev/loop1 contains a filesystem of type 'squashfs'
/dev/loop2 contains a filesystem of type 'squashfs'
/dev/loop3 contains a filesystem of type 'squashfs'
/dev/loop4 contains a filesystem of type 'squashfs'
/dev/loop5 contains a filesystem of type 'squashfs'
/dev/loop6 contains a filesystem of type 'squashfs'

image

using recommended instance in recommended region. Ubuntu 20. Any advice on how to fix this would be awesome!

0xSheller commented 1 year ago

Fixed!

For those who run into this in the future,

run:

lsblk --fs --json | jq -r '.blockdevices[] | select(.children == null and .fstype == null) | .name'

this will list all drives/partitions.

edit line 141 of the script and hardcode your drive inplace of ${DEVICES_FULLNAME[@]}

IE: zpool create -o ashift=12 tank "${DEVICES_FULLNAME[@]}"

In my case becomes: zpool create -o ashift=12 tank "nvme1n1"

allada commented 1 year ago

Interesting it is capturing your loop devices with that query. I will loop as a blacklist to the script.