PlotFS is a fuse filesystem for efficient storage of Chia plot files.

Related tags

Miscellaneous PlotFS
Overview

PlotFS

PlotFS is a fuse filesystem for efficient storage of Chia plot files.

PlotFS is not a traditional filesystem. It is mounted read only for farming/harvesting, but all other interactions, such as adding/removing plots, is achieved via the plotfs command line tool.

PlotFS writes plot files directly and contiguously to raw block devices, partitions, or files. Metadata, such as, file offsets and size are recorded in a separate "geometry" file which is stored on the OS drive. Plots can be split into "shards" and spread across multiple disks to achieve maximum storage density.

Please consider dontating:

xch1hsyyclxn2v59ysd4n8nk577sduw64sg90nr8z26c3h8emq7magdqqzq9n5

WARNING

This software is beta quality... at best. Use at your own risk. The author is not responsible for any loss of data that may occur.

Project Goals

Modern file systems, while amazing, all have some drawbacks when storing Chia plots. A filesystem designed specifically for plots will have a much different usage pattern. It must:

  • Have zero (or close to zero) space overhead
  • Maintain operation upon the failure of any number of disks
  • Lose the fewest number of plots possible upon loss of a disk
  • Allow for unmacthed disk sizes
  • Combine fractional remainder space across disk to maximize the number of plots
  • Be fast enough

It doesn't care about:

  • Directories
  • Frequent deletes
  • Write performance
  • Large number of small files
  • Rendundancy
  • Convenience
  • Windows
  • Humans in general

Installing

sudo apt update && sudo apt -y upgrade
sudo apt install -y git cmake build-essential pkg-config libfuse3-dev libflatbuffers-dev
git clone https://github.com/szatmary/PlotFS.git
cd PlotFS && cmake . && make && sudo make install

Note: Ubuntu 20.04 and earlier has a verson of flatc that is too old. Update to a newer Ubuntu (Which you really should do... Your farmer is not mission critical enterprise distributed infrastrcture, and LTS does not mean its better supported, It means its running old software but still gets security patches) Or, install flatbuffers from source.

sudo apt purge libflatbuffers-dev
git clone https://github.com/google/flatbuffers.git && cd flatbuffers && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release && make && make install

Getting started

Create a place to store our geometry file

sudo mkdir -p /var/local/plotfs
sudo chown $USER /var/local/plotfs

Create the geometry file

plotfs --init

This will create the file /var/local/plotfs/plotfs.bin

Note: It is VERY important that you back up this file frequently! if you lose this file, you lose your plots! (It may be possible to rebuild this file later by scanning the dirves/partitions but I have not written a tool to do that yet)

Create a mount point

sudo mkdir /farm

Mount the filesystem:

sudo mount.plotfs /farm

Add this directory to chia client. Use the GUI; or from yor chia install directory run:

 . ./activate && chia plots add -d /farm

Add a disk or partition to the plotfs pool. Repeat for multiple disks/partitions. Pools can be expanded at any time by adding more disks/partitions. Note: This will erase the data on the disk/partition!

sudo plotfs --add_device /dev/disk/by-id/[your disk or partition]

Optional: Configure the filesystem to mount at boot. My personal favorite approach is using cron.

sudo crontab -e

Add the line

@reboot /usr/local/bin/mount.plotfs /farm

Start adding plots:

sudo plotfs --add_plot /path/to/[plot file.plot]

plotfs CLI usage

$ plotfs

--init

Initialize the plotfs filesystem. Creates a file at `/var/local/plotfs/plotfs.bin`. Back this file up!
combine with --force to clear the entire geometry file and start over.

--list_devices

List the devices that are currently being used by plotfs.

--add_device [device path]

Add a new device or partition to the filesystem.
Combine with --force to erase and reuse an existing device or partition.

--remove_device [device id]

Remove a device or partition from the filesystem.

--list_plots

List the plots that are currently stored in the filesystem.

--add_plot [plot path]

Add a plot to the filesystem.

--remove_plot [plot id]

Remove a plot from the filesystem.

$ mount.plotfs [mount point]

Mounts the filesystem at the given mount point.

FAQ

Q. Wow this is great! How can I give you all my Chia?

A. xch1hsyyclxn2v59ysd4n8nk577sduw64sg90nr8z26c3h8emq7magdqqzq9n5

Q. Will this work on Raspberry Pi?

A. I haven't tested yet, but it should. If it doesn't let me know, I'll fix it.

Q. Why do the filenames not have the date?

A. Plotfs does not have the concept of filenames. It uses the plot id and k value from the plot header as the file name. The plot header does not record the date created.

Q. What happens when/if chia releases plot compression?

A. You can compress a plot, then delete and add it back via the cli.. To minimize fragmentation it's best to do this in a specific order. I will document more if/when plot compression is available.

Q. I lost my config file! Can you release the recovery tool?

A. I haven't written it yet. PlotFS is just a side project and my day job keeps me busy. Greasing the wheels wouldn't hurt though: xch1hsyyclxn2v59ysd4n8nk577sduw64sg90nr8z26c3h8emq7magdqqzq9n5

Q. Windows when?

A. Literally never. Use linux.

Q. How can I get in contact with you?

A. email: [email protected] twitter: @m3u8

Comments
  • remove_device does not work

    remove_device does not work

    First off, thanks for your contribution to the Chia community. I have been using plotfs with success for a while now. However, I had a drive fail on me and I cannot remove it from my plotfs. See below. Also, this seems to have made almost 27 TiB of plots inaccessible, when the drive was only 10 TB.

    Thanks, Alex

    [email protected]:~$ sudo plotfs --list_devices
    7ce6104e6ad0231eaaad1cfe02a14354004eebd3a15b7f4d73109cfadca38ef4 97998776336/10000831347712 100% /dev/sdc
    99f6ae42f11358798420901181c44e734b58fd0eab7794cfdcccd5b18fddffe1 98039569205/10000831347712 100% /dev/sde
    3d454efd30e5eeb6bccb64561246a4c615fd10f5c255003552743bedbd9731eb 98106850283/10000831347712 100% /dev/disk/by-id/scsi-35000cca26adc15a8
    a5bdc1e6917da8d09781e79a23e19f52f6349118595ac71dc755a319ab5b2a80 98020101981/10000831347712 100% /dev/disk/by-id/scsi-35000cca26ac910c8
    662a9dbcdaa75a18a3aded81c9a3ffb8eb2df8ad1a0eeadd15215b7c46f52aee 98204709647/10000831347712 100% /dev/disk/by-id/scsi-35000cca2680a3914
    c9d774b200f3fb0cc7f0768ef204cb8e248ebe10f4845b6a5379cb53f75cffda 97882776446/10000831347712 100% /dev/disk/by-id/scsi-35000cca273182358
    e5f7c1c0e6b064ff0f03c8a0e1cf6d5ac4cebc8bda82cff50667aa2c500899c9 98161792755/10000831347712 100% /dev/disk/by-id/scsi-35000cca26639f894
    cd5325b9f8cb1df2bf944ecb51df0b5d0a08568422733b26d993bca5feb1e0a7 97954067756/10000831347712 100% /dev/disk/by-id/scsi-35000cca251705d94
    f7626c4621208ba9f7e3ba748847cde9cc487bb865cf20edd2f59f68b0772070 98192338028/10000831347712 100% /dev/disk/by-id/scsi-35000cca251705fe4
    a2265c5cb559d01877d92cf8268ed02fdf0550090e5ec665c521e7ac78c1ee1e 97796336218/10000831347712 100% /dev/disk/by-id/scsi-35000cca256496060
    48ed4b384c52d75f1cff2eae903e69109228a3db49f591b66bbb0edeb0e09f9d 98162060215/10000831347712 100% /dev/disk/by-id/scsi-35000cca2515826fc
    db603ed352748fbb201144fc58b3210eb812a1bb8a833270276aca6da60f9d10 98156714690/10000831347712 100% /dev/disk/by-id/scsi-35000cca2515f8b28
    6d1e52f12f7546e25f3522ae509a411fd5a8af320733017850a61dec4ad8ad63 28756155949/9931038129152 100% /dev/disk/by-id/scsi-35000cca25142dc50
    c71d1d1760f35b1d9c0ad92225acb7e825474c257fe00076d138b970331addcf 28193172425/9931038129152 100% /dev/disk/by-id/scsi-35000cca25141a100
    1b57272739ecc2328e09e46110582076864f61fbe8fcb459134aa0643fb54b68 28445681143/9931038129152 100% /dev/disk/by-id/scsi-35000cca2514436a4
    751ff67a6d810ff101fdf2adcbf02a925ca356d124cd7c4a39a84d631b41325c 28391543827/9931038129152 100% /dev/disk/by-id/scsi-35000cca2513e2d84
    eb4c70e89051a10700acd9af56fb2cba23d90cd2698d41ffbb0f8dfc5ccb627b 57589814118/8001563220992 100% /dev/disk/by-id/ata-ST8000DM004-2CX188_ZR10HJDW
    52722503e49b60d4bf75070e3709a5ccd90cdae2f8f9e72c4399e857b308ea3c 29902981067/12000138624000 100% /dev/disk/by-id/usb-WD_easystore_264D_35504A4C41385345-0:0
    4a0a9566910095bc48a51dec8b2ace13b36a5c7682a587cf2054bcab4811cf9d 29302236602/12000138624000 100% /dev/disk/by-id/usb-WD_easystore_264D_35504A4D45455644-0:0
    2a335b1f1651f4f2ecd451cdb27a5a27b0bd8d50a410b38ea1b3aab73966b3cf 57436489869/8001563220480 100% /dev/disk/by-id/usb-Seagate_Expansion_SW_00000000NAC81LWM-0:0
    8e8c8bd9fc577176cfa4538fd5a1adfb0095677f859c296b70e3b41f7dad5af9 57510345035/8001563220480 100% /dev/disk/by-id/usb-Seagate_Expansion_SW_00000000NAC81LWS-0:0
    3d51133ccc5d1f73c52fc7bdba334fbea511e4980f482a062ca7aff3af4406ce 98139700312/10000831347712 100% /dev/disk/by-id/scsi-35000cca251791150
    [email protected]:~$ sudo plotfs --remove_device /dev/disk/by-id/scsi-35000cca273182358
    [email protected]:~$ sudo plotfs --list_devices
    7ce6104e6ad0231eaaad1cfe02a14354004eebd3a15b7f4d73109cfadca38ef4 97998776336/10000831347712 100% /dev/sdc
    99f6ae42f11358798420901181c44e734b58fd0eab7794cfdcccd5b18fddffe1 98039569205/10000831347712 100% /dev/sde
    3d454efd30e5eeb6bccb64561246a4c615fd10f5c255003552743bedbd9731eb 98106850283/10000831347712 100% /dev/disk/by-id/scsi-35000cca26adc15a8
    a5bdc1e6917da8d09781e79a23e19f52f6349118595ac71dc755a319ab5b2a80 98020101981/10000831347712 100% /dev/disk/by-id/scsi-35000cca26ac910c8
    662a9dbcdaa75a18a3aded81c9a3ffb8eb2df8ad1a0eeadd15215b7c46f52aee 98204709647/10000831347712 100% /dev/disk/by-id/scsi-35000cca2680a3914
    c9d774b200f3fb0cc7f0768ef204cb8e248ebe10f4845b6a5379cb53f75cffda 97882776446/10000831347712 100% /dev/disk/by-id/scsi-35000cca273182358
    e5f7c1c0e6b064ff0f03c8a0e1cf6d5ac4cebc8bda82cff50667aa2c500899c9 98161792755/10000831347712 100% /dev/disk/by-id/scsi-35000cca26639f894
    cd5325b9f8cb1df2bf944ecb51df0b5d0a08568422733b26d993bca5feb1e0a7 97954067756/10000831347712 100% /dev/disk/by-id/scsi-35000cca251705d94
    f7626c4621208ba9f7e3ba748847cde9cc487bb865cf20edd2f59f68b0772070 98192338028/10000831347712 100% /dev/disk/by-id/scsi-35000cca251705fe4
    a2265c5cb559d01877d92cf8268ed02fdf0550090e5ec665c521e7ac78c1ee1e 97796336218/10000831347712 100% /dev/disk/by-id/scsi-35000cca256496060
    48ed4b384c52d75f1cff2eae903e69109228a3db49f591b66bbb0edeb0e09f9d 98162060215/10000831347712 100% /dev/disk/by-id/scsi-35000cca2515826fc
    db603ed352748fbb201144fc58b3210eb812a1bb8a833270276aca6da60f9d10 98156714690/10000831347712 100% /dev/disk/by-id/scsi-35000cca2515f8b28
    6d1e52f12f7546e25f3522ae509a411fd5a8af320733017850a61dec4ad8ad63 28756155949/9931038129152 100% /dev/disk/by-id/scsi-35000cca25142dc50
    c71d1d1760f35b1d9c0ad92225acb7e825474c257fe00076d138b970331addcf 28193172425/9931038129152 100% /dev/disk/by-id/scsi-35000cca25141a100
    1b57272739ecc2328e09e46110582076864f61fbe8fcb459134aa0643fb54b68 28445681143/9931038129152 100% /dev/disk/by-id/scsi-35000cca2514436a4
    751ff67a6d810ff101fdf2adcbf02a925ca356d124cd7c4a39a84d631b41325c 28391543827/9931038129152 100% /dev/disk/by-id/scsi-35000cca2513e2d84
    eb4c70e89051a10700acd9af56fb2cba23d90cd2698d41ffbb0f8dfc5ccb627b 57589814118/8001563220992 100% /dev/disk/by-id/ata-ST8000DM004-2CX188_ZR10HJDW
    52722503e49b60d4bf75070e3709a5ccd90cdae2f8f9e72c4399e857b308ea3c 29902981067/12000138624000 100% /dev/disk/by-id/usb-WD_easystore_264D_35504A4C41385345-0:0
    4a0a9566910095bc48a51dec8b2ace13b36a5c7682a587cf2054bcab4811cf9d 29302236602/12000138624000 100% /dev/disk/by-id/usb-WD_easystore_264D_35504A4D45455644-0:0
    2a335b1f1651f4f2ecd451cdb27a5a27b0bd8d50a410b38ea1b3aab73966b3cf 57436489869/8001563220480 100% /dev/disk/by-id/usb-Seagate_Expansion_SW_00000000NAC81LWM-0:0
    8e8c8bd9fc577176cfa4538fd5a1adfb0095677f859c296b70e3b41f7dad5af9 57510345035/8001563220480 100% /dev/disk/by-id/usb-Seagate_Expansion_SW_00000000NAC81LWS-0:0
    3d51133ccc5d1f73c52fc7bdba334fbea511e4980f482a062ca7aff3af4406ce 98139700312/10000831347712 100% /dev/disk/by-id/scsi-35000cca251791150
    [email protected]:~$
    
    opened by atms-team 8
  • Warnings while adding plots

    Warnings while adding plots

    hi there, any idea why am I getting these warnings?

    [email protected]:/mnt/19# plotfs --add_plot plot-k32-2022-01-28-07-51-00469acb2ef779e2cd4dc2b32936a5ae01187f48358c5845bcb422ae229c7c21.plot --remove_source
    warning: failed to open device: /
    warning: failed to open device: /
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    starting plot copy to 1 shard(s)
    writing recovery point header
    0% writing up to 1073741824 bytes from offset 0 to device d4e1a15039a783a48b98caac2403e902161e4c356c832bc16613233e0aaebe64
    
    opened by jszalkowski 7
  • remove device - Segmentation fault (core dumped)

    remove device - Segmentation fault (core dumped)

    it looks like something is wrong with the device removal

    [email protected]:~/PlotFS# plotfs --list_devices
    13095a1beb30cf39d5601a688446ccddbb746d3daff9323970f7f6de3249dd9e 0/18000207936512 100% /dev/sda
    db42bbd22867e7f245f39d99606ec1ad77c24530572effd08d915bf4c1282673 0/18000207936512 100% /dev/sdb
    c9d4c8a10df886730d996dc98636867c37384d5918b0636e8780da5fa330b1b9 34102204844/16000900660224 100% /dev/sdc
    c4edefb13936fc6170a05472ec52d255642a000cdf0cb7af9fde89caa00fe40d 31857166252/18000207936512 100% /dev/sde
    31ecb70dd24df55fc1895ba9141bee1e5d671843f6d5b238b7cf9c6cedebc29f 25589784604/16000900660224 100% /dev/sdf
    3ec2cc277a92ff4ebc274ceed7e9c7f9f67d8b2a5bcfa3e2cb999f32745f8682 0/18000207936512 100% /dev/sdg
    df163354e1ea3fbb2752dae29fde431c3bf44dd2fd229b65a03a9b30d3d805b8 318684121/16000900660224 100% /dev/sdh
    2fd5b11fa0a2510121ec0c4d6bec4343a84927b3c3e02ebd35dc59081cb17f9e 0/18000207936512 100% /dev/sdi
    405ac4aec73d3c247669edd8f55dae87ce6aba6387a420957884ffa70c870646 0/16000900660224 100% /dev/sdj
    c21834c78b89f3178de5df8a607a023461c3e87352f1e47568c25a5d4b50414c 0/16000900660224 100% /dev/sdk
    0572b6a392bd71754b0fcd5fcab64dbdea3c4d8b009185a6a645e9ac3e522a88 8149728409424/16000900660224 50% /dev/sdl
    44f14240ddd8de3b4e441565409877d1a340603949ab8a6215102048f516a884 8149475292911/16000900660224 50% /dev/sdm
    9db460f13f5a0c6955d4b33413936ca45e0cbe0d546fc7359f653bb9572ba49e 8149437528978/16000900660224 50% /dev/sdn
    c991e3d204c854a332f92937b07d58a34a1a7bac7dadc690cac1b048aa43b857 8137043903200/18000207936512 55% /dev/sdo
    6918794b2168732d6a96f0a00825b2715a3252c438ad655cdeb5a4dca8aedb4e 8196440973047/16000900660224 49% /dev/sdp
    748c560106049988a6f4be5d151fb022927b5d28fac7c1e9673d44857b56eb68 8165820578304/16000900660224 49% /dev/sdd
    0ae81946574a6870f52d2b864a4b1b6d7b93fef2a9ab8bf515d9901eb6cdc66a 8206674924928/18000207936512 55% /dev/sdq
    d4e1a15039a783a48b98caac2403e902161e4c356c832bc16613233e0aaebe64 8206574622080/18000207936512 55% /dev/sdr
    

    I'm trying to remove /dev/sda

    [email protected]:~/PlotFS# plotfs --remove_device 13095a1beb30cf39d5601a688446ccddbb746d3daff9323970f7f6de3249dd9e
    Segmentation fault (core dumped)
    [email protected]:~/PlotFS# strace plotfs --remove_device 13095a1beb30cf39d5601a688446ccddbb746d3daff9323970f7f6de3249dd9e
    execve("/usr/local/bin/plotfs", ["plotfs", "--remove_device", "13095a1beb30cf39d5601a688446ccdd"...], 0x7fff115d5e30 /* 23 vars */) = 0
    brk(NULL)                               = 0x55c65c98f000
    arch_prctl(0x3001 /* ARCH_??? */, 0x7ffef4e91bf0) = -1 EINVAL (Invalid argument)
    access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
    openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
    fstat(3, {st_mode=S_IFREG|0644, st_size=33486, ...}) = 0
    mmap(NULL, 33486, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f7826f41000
    close(3)                                = 0
    openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
    read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\341\t\0\0\0\0\0"..., 832) = 832
    fstat(3, {st_mode=S_IFREG|0644, st_size=1956992, ...}) = 0
    mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7826f3f000
    mmap(NULL, 1972224, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7826d5d000
    mprotect(0x7f7826df3000, 1290240, PROT_NONE) = 0
    mmap(0x7f7826df3000, 987136, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x96000) = 0x7f7826df3000
    mmap(0x7f7826ee4000, 299008, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x187000) = 0x7f7826ee4000
    mmap(0x7f7826f2e000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d0000) = 0x7f7826f2e000
    mmap(0x7f7826f3c000, 10240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f7826f3c000
    close(3)                                = 0
    openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
    read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\3405\0\0\0\0\0\0"..., 832) = 832
    fstat(3, {st_mode=S_IFREG|0644, st_size=104984, ...}) = 0
    mmap(NULL, 107592, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7826d42000
    mmap(0x7f7826d45000, 73728, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f7826d45000
    mmap(0x7f7826d57000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x7f7826d57000
    mmap(0x7f7826d5b000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18000) = 0x7f7826d5b000
    close(3)                                = 0
    openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
    read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360q\2\0\0\0\0\0"..., 832) = 832
    pread64(3, "\6\0\0\0\4\0\0\[email protected]\0\0\0\0\0\0\[email protected]\0\0\0\0\0\0\[email protected]\0\0\0\0\0\0\0"..., 784, 64) = 784
    pread64(3, "\4\0\0\0\20\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0", 32, 848) = 32
    pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\t\233\222%\274\260\320\31\331\326\10\204\276X>\263"..., 68, 880) = 68
    fstat(3, {st_mode=S_IFREG|0755, st_size=2029224, ...}) = 0
    pread64(3, "\6\0\0\0\4\0\0\[email protected]\0\0\0\0\0\0\[email protected]\0\0\0\0\0\0\[email protected]\0\0\0\0\0\0\0"..., 784, 64) = 784
    pread64(3, "\4\0\0\0\20\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0", 32, 848) = 32
    pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\t\233\222%\274\260\320\31\331\326\10\204\276X>\263"..., 68, 880) = 68
    mmap(NULL, 2036952, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7826b50000
    mprotect(0x7f7826b75000, 1847296, PROT_NONE) = 0
    mmap(0x7f7826b75000, 1540096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x25000) = 0x7f7826b75000
    mmap(0x7f7826ced000, 303104, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x19d000) = 0x7f7826ced000
    mmap(0x7f7826d38000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e7000) = 0x7f7826d38000
    mmap(0x7f7826d3e000, 13528, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f7826d3e000
    close(3)                                = 0
    openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
    read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\363\0\0\0\0\0\0"..., 832) = 832
    fstat(3, {st_mode=S_IFREG|0644, st_size=1369352, ...}) = 0
    mmap(NULL, 1368336, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7826a01000
    mmap(0x7f7826a10000, 684032, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf000) = 0x7f7826a10000
    mmap(0x7f7826ab7000, 618496, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xb6000) = 0x7f7826ab7000
    mmap(0x7f7826b4e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14c000) = 0x7f7826b4e000
    close(3)                                = 0
    mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f78269ff000
    arch_prctl(ARCH_SET_FS, 0x7f7826a00100) = 0
    mprotect(0x7f7826d38000, 12288, PROT_READ) = 0
    mprotect(0x7f7826b4e000, 4096, PROT_READ) = 0
    mprotect(0x7f7826d5b000, 4096, PROT_READ) = 0
    mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f78269fd000
    mprotect(0x7f7826f2e000, 45056, PROT_READ) = 0
    mprotect(0x55c65ad95000, 8192, PROT_READ) = 0
    mprotect(0x7f7826f77000, 4096, PROT_READ) = 0
    munmap(0x7f7826f41000, 33486)           = 0
    brk(NULL)                               = 0x55c65c98f000
    brk(0x55c65c9b0000)                     = 0x55c65c9b0000
    openat(AT_FDCWD, "/var/local/plotfs/plotfs.bin", O_RDWR) = 3
    flock(3, LOCK_EX)                       = 0
    lseek(3, 0, SEEK_SET)                   = 0
    fstat(3, {st_mode=S_IFREG|0644, st_size=198360, ...}) = 0
    mmap(NULL, 200704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f78269cc000
    read(3, "\f\0\0\0\10\0\f\0\4\0\10\0\10\0\0\0\270\0\3\0\4\0\0\0/\6\0\0(\0\3\0"..., 198360) = 198360
    brk(0x55c65c9d1000)                     = 0x55c65c9d1000
    brk(0x55c65c9f2000)                     = 0x55c65c9f2000
    brk(0x55c65ca13000)                     = 0x55c65ca13000
    munmap(0x7f78269cc000, 200704)          = 0
    --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x8} ---
    +++ killed by SIGSEGV (core dumped) +++
    Segmentation fault (core dumped)
    
    opened by jszalkowski 5
  • Transfer Speeds

    Transfer Speeds

    I have large farms and migrating one to PlotFS. It's taking a long time to transfer the plots. I'm looking for efficiencies as I plan migrating some other environments.

    Are there specific limitations? I've tried to start multiple jobs to transfer from multiple drives but it made everything slower.

    Anyways to parallel transfers?

    opened by johnathon-b 4
  • wildcard globbing for add-plots

    wildcard globbing for add-plots

    Thanks for spending your time to make this cool filesystem.

    I have an existing farm that has a large number of plots, and I have added some new disks to it, and have started to copy my existing plots to a PlotFs that uses these new drives. And then as I empty out an existing ext4 filesystem, I intend to move that device into the farm, and proceed to the next device. But it seems the I need to call out the plots one at a time for the --add-plots function. It sure would be nice if we could use a wildcard to be able to do multiple plots at a time, or alternatively to specify just a directory, and have it pull in all the plots in that directory.

    Just a thought

    opened by mower7 3
  • Error compiling on Ubuntu Server 20.04

    Error compiling on Ubuntu Server 20.04

     cd PlotFS && cmake . && make && sudo make install
    -- The C compiler identification is GNU 9.3.0
    -- The CXX compiler identification is GNU 9.3.0
    -- Check for working C compiler: /usr/bin/cc
    -- Check for working C compiler: /usr/bin/cc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Check for working CXX compiler: /usr/bin/c++
    -- Check for working CXX compiler: /usr/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
    -- Found FUSE3: /usr/lib/x86_64-linux-gnu/libfuse3.so  
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/me/PlotFS
    [ 16%] Generating plotfs_generated.h
    error: /home/me/PlotFS/plotfs.fbs:17: 14: error: enum value does not fit [0; -1]
    make[2]: *** [CMakeFiles/mount.plotfs.dir/build.make:62: plotfs_generated.h] Error 1
    make[1]: *** [CMakeFiles/Makefile2:77: CMakeFiles/mount.plotfs.dir/all] Error 2
    make: *** [Makefile:130: all] Error 2
    

    Just trying this out of interest on new installation of Ubuntu Server 20.04. Probably something wrong my end but posting just in case it isn't.

    opened by ghost 3
  • Make is not working

    Make is not working

    Hi,

    the make command is not working: cd PlotFS && git pull && make && sudo make install

    Result: make: *** No targets specified and no makefile found. Stop.

    Do you forget to add the makefile or something ?

    opened by HaShLo 1
  • Error in readme

    Error in readme

    Sorry, don't know how to do pull requests but just want to point out error in readme: sudo chiafs --add_device /dev/disk/by-id/[your disk or partition] I think should be: sudo plotfs --add_device /dev/disk/by-id/[your disk or partition]

    opened by ghost 1
  • Usage experience and improvements

    Usage experience and improvements

    After some time i used this project i feel that it need some upgrade.

    I need:

    1. possibility to export config file of single drive from the main config for removing drive from the pool. It should check shared parts of plots and asking to delete shared plot from pool or relocate the shard to another drive if possible.
    2. option to import exported config with mapping to the current drive link, because name of the drive may be changed when transferring to another machine.
    3. receive list of files stored on device by device id with indication if whole file stored on this drive or only part of it.
    4. option to create subfolders and assign files to it. Many forks harvesters can't work with more than 1000 plots at once. So, i need option to divide whole pool to parts.
    5. changing in fulfilment strategy. Now the tool checking only the free space on the drives and writing plots to the drive with the biggest free space. When transferring new files in parallel it creates bottleneck and slowdown the pool because all imports may go to the same drive when idle drives with compatible free space are present. It would be a great upgrade if the tool will check also if there are additional idle drives with free space for new plot are available for writing and write the file to that drive. If all the drives currently busy add possibility to create queue and starting add new plot only when idle drive/s presents.
    6. create additional command line switch for do not store plots to many shards and wait for disk with compatible free space (if there are current plot/s import/s presents) or exit.
    7. do not publish plots from the absent drive/s in the mounted directory (startup check).

    I understand the point of free time and donations, so if you want payment for those features, post price list per feature, please.

    Thanks!

    opened by rabbitii 0
  • Feature Request: Change Path of Devices

    Feature Request: Change Path of Devices

    Problem: It's not possible to recover plots if device path has changed, e.g. because:

    • Connection changed resulting in change of /dev/sdX
    • Failing disk has been cloned to a new disk resulting in change of /dev/disk/by-id/...
    • Disk has been added using /dev/sdX path accidentally

    Suggested solution: Add device will check UUIDs of files existing in geometry and change the path of the device instead of only supporting re-formatting the disk.

    opened by benengele 1
  • Re-adding device with same path formats device without --force

    Re-adding device with same path formats device without --force

    Steps:

    1. Add device
    2. Add plots
    3. Add device again
    4. Repeat 3

    Expected: Warning will be issued that device is already in geometry

    Actual: Device will be re-formatted (presumably) corrupting plots already added to the device. Inconsistent behaviour when repeated multiple times: Warning: This looks like a PlotFS partition, but it is not registered. Same device registered multiple times.

    opened by benengele 1
  • Feature Request: Not add mounted devices

    Feature Request: Not add mounted devices

    Not sure if there is a bullet proof approach, but at least some basic check if the devices is listed in /proc/mounts would be great. I accidentally added a mounted device with plots and tried to copy the very same plots into plotfs...

    opened by benengele 1
  • warning: failed to open device: /

    warning: failed to open device: /

    Reported multiple times when adding a plot.

    warning: failed to open device: /
    warning: failed to open device: /
    warning: failed to open device: /
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    warning: plot block not found in freespace
    

    Not sure how to end up with a device path / that is not reported when listing devices even assuming there is an inconsistency in the geometry file?

    / # plotfs --list_devices
    1c312c5a28012bef807530f2becd02553e7472fef175d5950a592bc8af28a32b 1077195705586/2000398932992 47% /dev/disk/by-id/scsi-SHGST_HMRP2000S5xnN7.2_P6J579SV
    2c92672f7398864aa0ee7bc3f49c54128d8d809cfdf812f657121f4449f03002 615957135138/2000398932992 70% /dev/disk/by-id/scsi-SHGST_HMRP2000S5xnN7.2_P6J1LL8V
    ff5d0d3090ea042cce67c719f34bd95edc02c36e647d66ae120fdac8fcd8ca0c 1077104675642/2000398932992 47% /dev/disk/by-id/scsi-SHGST_HMRP2000S5xnN7.2_P6HB926V
    82ccde9e4cb0d9772c8e53416ad70e525fbf620bdb6087019a801113dba6b8a0 1429974496299/2000398932992 29% /dev/disk/by-id/scsi-SHGST_HMRP2000S5xnN7.2_P5HDP7XV
    a32eabb4600a1d0f54ef5b05a1546981000fd3767e02a808ec7228f01103ca7e 1539003398463/2000398932992 24% /dev/disk/by-id/scsi-SHGST_HMRP2000S5xnN7.2_P5HDPA1V
    c2266000362d3c3ff7ddadbbf9ec02dc0adcf588356fd28203a30c2a7ee35dc6 1077261698865/2000398932992 47% /dev/disk/by-id/scsi-SHGST_HMRP2000S5xnN7.2_P6KYPY0V
    4a0966e2cc39c95a8abe3771b1b9c2ae72bfae27bf900f471788bf79801d8b4c 1077249439320/2000398932992 47% /dev/disk/by-id/scsi-SHGST_HMRP2000S5xnN7.2_P5G7PNGV
    4ca5fc39c97fe576222ec911616c23c62c2db741587e94d0b34a7332326f728b 1154557889680/3000592980992 62% /dev/disk/by-id/scsi-SSEAGATE_ST33000650SS_Z2941F8V
    
    opened by benengele 1
  • After removing the bad drive, I now get the

    After removing the bad drive, I now get the "plot block not found in free space" error when adding plots. Each plot I add ends up being corrupted (chia plots check reports it as unopenable) and it seems to usually corrupt a previously good plot as well. Do I have to start over? I have removed all the plots that the plot checker deems to be corrupted but this still happens.

        @szatmary After removing the bad drive, I now get the "plot block not found in free space" error when adding plots. Each plot I add ends up being corrupted (chia plots check reports it as unopenable) and it seems to usually corrupt a previously good plot as well. Do I have to start over? I have removed all the plots that the plot checker deems to be corrupted but this still happens.
    

    Originally posted by @ab0tj in https://github.com/szatmary/PlotFS/issues/11#issuecomment-1092994858

    opened by rabbitii 4
Owner
Matthew Szatmary
Video encoding and playback engineer
Matthew Szatmary
Spacex Storage is an offchain storage work inspector of Mannheim Network running inside TEE enclave.

Spacex Storage Spacex Storage is an offchain storage work inspector of Mannheim Network running inside TEE enclave. Contribution Thank you for conside

Mannheim Network 10 Oct 21, 2022
An efficient, small mobile key-value storage framework developed by WeChat. Works on Android, iOS, macOS, Windows, and POSIX.

中文版本请参看这里 MMKV is an efficient, small, easy-to-use mobile key-value storage framework used in the WeChat application. It's currently available on Andr

Tencent 15.3k Nov 25, 2022
OSC Calibrator and High Voltage Fuse Resetter for 8-Pin ATtinys

TinyCalibrator - OSC Calibrator and High-Voltage Fuse Resetter Because the 8-pin ATtinys only have a few GPIO pins available, they are usually operate

Stefan Wagner 39 Aug 25, 2022
A read-only, license friendly, FUSE based btrfs implementation

btrfs-fuse About This is a read-only btrfs implementation using FUSE (Filesystem in Userspace). Although btrfs is already in mainline Linux kernel, th

Qu Wenruo 10 Oct 13, 2022
FUSE file system for ZIP archives

title section header footer date MOUNT-ZIP 1 User Manual mount-zip 1.0 November 2021 NAME mount-zip - Mount a ZIP archive as a FUSE filesystem. SYNOPS

Google 45 Nov 3, 2022
This project is a fuse crash recovery framework

This project is a fuse crash recovery framework. When the fuse user mode filesystem is performing read or write operations, if it terminates abnormally, the framework can automatically restore the fuse user mode filesystem process.

null 18 Nov 8, 2022
BladeBit - Fast Chia (XCH) RAM-only k32-only Plotter

BladeBit Chia Plotter A fast RAM-only, k32-only, Chia plotter. Requirements 416 GiB of RAM are required to run it, plus a few more megabytes for stack

Harold Brenes 234 Nov 19, 2022
chia-plotter (pipelined multi-threaded)

chia-plotter (pipelined multi-threaded) This is a new implementation of a chia plotter which is designed as a processing pipeline, similar to how GPUs

Max 2.3k Nov 20, 2022
A FAT filesystem with SPI driver for SD card on Raspberry Pi Pico

no-OS-FatFS-SD-SPI-RPi-Pico Simple library for SD Cards on the Pico At the heart of this library is ChaN's FatFs - Generic FAT Filesystem Module. It a

Carl J Kugler III 121 Nov 17, 2022
mergerfs - a featureful union filesystem

% mergerfs(1) mergerfs user manual % Antonio SJ Musumeci [email protected] % 2021-10-25 NAME mergerfs - a featureful union filesystem SYNOPSIS merge

null 2.8k Nov 22, 2022
Official implementation of the tabfs-28 filesystem as an reuseable library

libtabfs This projects aims to implement TabFs-28 as an minimal dependency library so various other projects can use it as they need. License libtabfs

null 3 May 17, 2022
An improved plot widget for Dear ImGui, aimed at displaying audio data

imgui-plot An improved plot widget for Dear ImGui, aimed at displaying audio data TOC Screenshots Rationale Usage Installation FAQ Screenshots Display

Anton Lobashev 396 Nov 19, 2022
Plot airfield from a file containing the list of airfield of Germany and their position (latitude/longitude)

Plot aerodromes from a file containing the list of aerodromes of Germany and their position (latitude/longitude)

Nanfack Steve Ulrich 2 Feb 6, 2022
Proof of concept userspace filesystem that executes filenames as shell commands and makes the result accessible though reading the file.

ExecFS Proof of concept userspace filesystem that executes filenames as shell commands and makes the result accessible though reading the file. $ ./ex

Camel Coder 31 Sep 9, 2022
null 291 Nov 20, 2022
Poseidon OS (POS) is a light-weight storage OS

Poseidon OS Poseidon OS (POS) is a light-weight storage OS that offers the best performance and valuable features over storage network. POS exploits t

null 51 Nov 21, 2022
MinIO C++ Client SDK for Amazon S3 Compatible Cloud Storage

The MinIO C++ Client SDK provides simple APIs to access any Amazon S3 compatible object storage.

Multi-Cloud Object Storage 38 Nov 13, 2022
XTAO Unified Distributed Storage

Anna - A branch project from CEPH Anna is a XTAO project branched from CEPH distributed storage. CEPH is a nice opensource project for unified distrib

XTAO Technolgy 3 Nov 12, 2021
A simple console client for pCloud cloud storage.

pCloud Console Client A simple console client for pCloud cloud storage. Project Information pCloud Console Client was forked from the project initiall

Serghei Iakovlev 24 Oct 28, 2022