Attached Drive - Remote Error Scan

  • I have a Pi4 that I use with an attached hard drive (NTFS) I transfer & delete files using ftp without issue.

    BUT every few months I have to plug the drive into my PC and do a disc scan & repair as things have become corrupted.

    Is there any way I can do this remotely?

  • Depending on just what you're doing, and if it hasn't been addressed, there may be a problem with exFAT. I switched to exFAT because, like yourself, I had to run a repair every so often. I also have a homebrew disk mirroring program to make sure the live 6TB and the backup are kept in sync. This program uses file timestamps (and other things) and samba from my Windows PC. The way Kodi on the RPi4 and v12 calculated the timestamp and the way Windows calculated it were different so it looked as though I have a LOT of files to copy.

    I had to switch back to NTFS on the RPi c 12 hours copying :(

  • And other track to consider is to create a simple NAS using another SCB like RasPi, BanaPi, ODROID or similar (just check USB type and Gigabit network).

    Move Your disks to a central storage and install MySQL/MariaDB to have central DB as well.

  • The way Kodi on the RPi4 and v12 calculated the timestamp and the way Windows calculated it were different so it looked as though I have a LOT of files to copy.

    Hi,

    Files have some date-time properties, creation, last write, last access... probably that synchronization tool, in case of exfat partition doesn't use the proper timestamp pairs. I had some issue when I created a small program and needed to check the time when files where created. I used the last write time instead of creation time to avoid the issues.

    I had too many issues with accessing ntfs partitions on linux, in my dual boot (W11 and Xubuntu) PC I'm using an exfat partition for "common files". If we talking about a media what need to be accessed with linux and windows too, the simplest solution is the exfat partition (it's not a common thing to use file synchronization tools with linux-windows devices). For "only linux", always the ext4 is recommended. And if really need, reading an ext4 partition on windows, isn't an impossible task too...

  • I also have a homebrew disk mirroring program to make sure the live 6TB and the backup are kept in sync.

    This is exactly what I have running, it's just once in a while something gets corrupted & new files don't show up in KODI until I run a disc scan to fix the problem.

  • I use XYPlorer on Windows and one thing I have noticed (or my mind tells me I have) is that if I leave XYPlorer open for a while after file writes to the 6TB HDD on Kodi and especially after file deletes have supposedly finished it seems that I get less corruption.

    Its entirely possible that this is a figment of my imagination, but it may be worth trying.

  • I use FileZilla to transfer files.

    When you delete files from the attached drive do you use XYPlorer or the menu in KODI?

    I've tried FileZilla and the KODI menu both end up with errors over time.

  • For such purpose I user Commander One, It's filezilla alternative for Mac. To remotely manage and repair an NTFS drive on your Raspberry Pi, consider using ntfsfix orntfs-3g in combination with SSH.