stwf
I’m trying to mount a USB hard drive on my nerves device at boot, I am using a custom system, so I have some flexibility.
But I’ve tried adding a -m directive to my erlinit.config as well as just mounting it in my application and it isn’t working.
If I am mounting to /root/uns/ does the filesystem on the USB drive have to match the file system on the card?
I added the ExFat and ExFat utilities to my system, and I tried using exfat as a disk format, and others. What disk format should I be using?
Any other ideas are welcome. My goal is to get postgres and influx installed and saving their data to the USB drive as well as a Phoenix app that can store uploads there.
Thanks in advance!
Trending in Questions
Hello!
Suppose you are building workflow (order / task / payment) processing system with the following requirements:
Each workflow con...
New
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app?
Looking for hints regarding:
Addi...
New
Kia ora,
We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
Hi all, I wanted to ask how the community is dealing with post-release steps.
Today we have Ecto migrations, which make sure that the db...
New
Hello,
I have an Elixir backend that implements a custom protocol over TCP. I want to load test the backend and assess the performance o...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
There are three potential reasons for members of this forum to have a look at https://vutuv.de
You are tired or annoyed of LinkedIn.
Yo...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #phoenix_html
- #iex
- #graphql
- #ai
- #genstage
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex










First 9 of 9 Posts
stwf
The device is found at startup:
00:00:10.079 [info] usb 2-1: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd
00:00:10.079 [info] usb 2-1: New USB device found, idVendor=0bc2, idProduct=ab30, bcdDevice= 1.08
00:00:10.079 [info] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
00:00:10.079 [info] usb 2-1: Product: BUP RD
00:00:10.079 [info] usb 2-1: Manufacturer: Seagate
00:00:10.081 [info] usb 2-1: SerialNumber: NA9F8S18
I’m trying to mount it as /dev/sda1 . Trying /dev/sdb1 (since the usb designation is 2-1) doesn’t yield anything.
stwf
-m /dev/sda1:/root/unsilo:exfat:defaults
in the erlinit.config seems to have no effect.
As part of my application startup I have gotten to the point where:
System.cmd(“mount”, [“/dev/sda1”, “/root/unsilo/”])
will get me
14:44:42.088 [info] trying to mount device
14:44:42.144 [info] F2FS-fs (sda1): Magic Mismatch, valid(0xf2f52010) - read(0x0)
14:44:42.144 [error] F2FS-fs (sda1): Can’t find valid F2FS filesystem in 1th superblock
14:44:42.166 [info] F2FS-fs (sda1): Magic Mismatch, valid(0xf2f52010) - read(0x0)
14:44:42.167 [error] F2FS-fs (sda1): Can’t find valid F2FS filesystem in 2th superblock
14:44:42.167 [info] F2FS-fs (sda1): Magic Mismatch, valid(0xf2f52010) - read(0x0)
14:44:42.174 [error] F2FS-fs (sda1): Can’t find valid F2FS filesystem in 1th superblock
14:44:42.181 [info] F2FS-fs (sda1): Magic Mismatch, valid(0xf2f52010) - read(0x0)
14:44:42.189 [error] F2FS-fs (sda1): Can’t find valid F2FS filesystem in 2th superblock
Does it need to be f2fs ? Thats seems like it’s for flash devices. Is it OK to format a USB HD like that? I would prefer expat so I can mount it on a mac if needed.
fhunleth
It doesn’t need to be F2FS. When you don’t specify a filesystem format,
mounttries the filesystems that are available and F2FS is particularly verbose.Try passing the filesystem type that you want to
mountby using-toption.You can get the list of available filesystem drivers by reading
/proc/filesystems. If you don’t see the one that you want, you’ll need to update the Linux kernel configuration to included it. I’m pretty sure thatvfatis what you want and that should already be enabled.Also, as you noticed
erlinitruns way too early in the boot process and Linux hasn’t enumerated the USB drive yet. Mounting filesystems inerlinitis really only intended for pseudo filesystems (like those under/sys) and things needed before any Elixir code is run (like the application partition so that the the command line history file can be initialized or read).gBillal
I updated the linux kernel to include ext4 file system, however I still cannot mount an external hard drive.
Any idea why this error ?
fhunleth
Could you double check that
ext4is available by runningcat "/proc/filesystems"?I’m wondering if the kernel option to enable EXT4 didn’t take effect. Like maybe the kernel wasn’t rebuilt after the config changed.
gBillal
I looked at that before and
ext4is availablegBillal
Finally, I was able to mount the hard drive. There’s an issue related to version or architecture differences between
x86_64andarm64. I cross-compiled thee2fsprogs, copied themkfs.ext4to the nerves image, formatted the hard drive and I was about to mount it without any issue.krgnn
I’m experiencing a very similar problem with a fat32 formatted drive and the rpi3 system base.
mount -t vfat /dev/sda1 /targetwill fail with “invalid argument” and I can’t figure out why. I would prefer not to build a custom base image, but running out of things to try.krgnn
For posterity: after lots of playing around, I realized that I had created the USB sticks with a
gptpartition table. After switching the disk to trustyMBR+exFATcode (07 infdisk), and creating the disk usingmkfs.vfatmounting worked. IMO the base images should include support for GPT partition tables though!