Hard Drive FTP Access
Hard Drive FTP Access
I recently switched my Flash Drive to a 2TB USB Hard Drive. When I was using my flash drive, I could connect to it via FTP and transfer files to it using the FTP Software. However, with the hard drive, while I can view the files on there in FTP (Media/USB0/games) it doesn't let me write anything to it. When using Filezilla, I get this error.
Error: /media/usb0/games/(Name of Game): open for write: received failure with description 'Failure'
Error: File transfer failed
Asking in the discord led me to believe that the drive is being mounted as Read Only when plugged into the MISTer. If I take it out and plug it into my PC, I can write files to it no problem. Is anyone familiar with this issue and aware of a fix?
Error: /media/usb0/games/(Name of Game): open for write: received failure with description 'Failure'
Error: File transfer failed
Asking in the discord led me to believe that the drive is being mounted as Read Only when plugged into the MISTer. If I take it out and plug it into my PC, I can write files to it no problem. Is anyone familiar with this issue and aware of a fix?
-
- Top Contributor
- Posts: 1911
- Joined: Wed May 27, 2020 1:59 pm
- Has thanked: 145 times
- Been thanked: 454 times
Re: Hard Drive FTP Access
Over the years I experimented a lot with USB HDD. I had exFAT, NTFS and ext4 but never experienced such problem. For FTP I use WinSCP. Did you try ssh (PuTTY)?
Re: Hard Drive FTP Access
It's NTFS. That's the only option I was given when formatting it. My MISTer also randomly decides that the hard drive isn't actually there, even after upgrading the power supply, which I thought was the issue. I've decided to just go back to using the Flash Drive for now.
-
- Top Contributor
- Posts: 860
- Joined: Wed Feb 09, 2022 11:50 pm
- Has thanked: 64 times
- Been thanked: 194 times
Re: Hard Drive FTP Access
If Windows will only let you use NTFS and not exfat, and you're really sure about that, probably the easiest approach is to format it from Linux. You can do it from the Mister itself, if you can handle using the command line, or a Raspberry Pi, or a LiveUSB flash key on a desktop.ZForceFFC wrote: ↑Sun Jul 17, 2022 8:09 amIt's NTFS. That's the only option I was given when formatting it. My MISTer also randomly decides that the hard drive isn't actually there, even after upgrading the power supply, which I thought was the issue. I've decided to just go back to using the Flash Drive for now.
If you use the last approach, be careful not to repartition your Windows drive or the flash key; be really sure you're repartitioning the hard disk. Reformatting the flash key will crash Linux, possibly instantly, but no permanent harm done, you just reboot to Windows and burn the key again. But if you repartition your Windows drive, you'll lose everything. You'll have to reinstall from scratch and restore from backup.
Being a savvy computer user, you naturally have nice fresh backups that you've tested restoring from, and I don't need to warn you to tread carefully.
edit: oh, you'd want to make either an exfat filesystem (if you want it to also be readable/writable from Windows), or ext4. The Mistro distro has both mkfs.exfat and mkfs.ext4, so using either from either the F9 command line or from SSH should be straightforward. Ext4 is better in an absolute sense, but Windows can't do anything with it, so you probably want exfat.
-
- Top Contributor
- Posts: 1911
- Joined: Wed May 27, 2020 1:59 pm
- Has thanked: 145 times
- Been thanked: 454 times
Re: Hard Drive FTP Access
If I remember correctly you can use the command line Diskpart to format the disk any way you want. There are utilities to access ext4 under Windows but only in read mode and painfully slow. The reason I recommended to use ssh and make some tests is to get a better idea of what is going on as you will get a better error message, I suppose, when trying to create a file on the USB drive. You could also use dmesg to see what happened when MISTer mounted the drive.
Re: Hard Drive FTP Access
I plugged the hard drive in to try to reformat it and now it's letting me format it to exFAT. Does anyone have a recommendation on the Allocation Unit Size? The default selected was 512.
-
- Top Contributor
- Posts: 860
- Joined: Wed Feb 09, 2022 11:50 pm
- Has thanked: 64 times
- Been thanked: 194 times
Re: Hard Drive FTP Access
It's probably a hard drive with 4096-byte sectors, so probably an allocation unit of the same size will give you best performance. If you don't know what size sectors it has, tell us the model number and we can look it up.
-
- Top Contributor
- Posts: 860
- Joined: Wed Feb 09, 2022 11:50 pm
- Has thanked: 64 times
- Been thanked: 194 times
Re: Hard Drive FTP Access
Wow, they tell you *absolutely nothing* about the hard drive, even in the spec sheet direct from Seagate. Just size and interface, that's all. I can't even figure out if it's CMR (good) or SMR (terrible).
Given that I have no bloody idea what's going on with that drive (and apparently nobody else does either), I'd use 4096-byte cluster size. That works fine if the drive is actually 512 bytes, it just wastes a little space on small files, while working perfectly with 4096-byte sectors. If you use 512-byte clusters on a drive with 4096-byte sectors, it ends up having to read and then rewrite whole sectors without the Mister knowing, which will slow it down.
When you're copying lots of files to it, keep an eye on it for sudden, drastic drops in write speed after you've copied more than 128 megs or so. If you see that, it could be an SMR drive, which kind of suck. It will probably still work with the Mister, but you may get occasional lengthy slowdowns on writes, and you may hear drive activity when the system is idle, as the drive collects data from the CMR(fast) area and rewrites it into the SMR (very slow) area.
Given that I have no bloody idea what's going on with that drive (and apparently nobody else does either), I'd use 4096-byte cluster size. That works fine if the drive is actually 512 bytes, it just wastes a little space on small files, while working perfectly with 4096-byte sectors. If you use 512-byte clusters on a drive with 4096-byte sectors, it ends up having to read and then rewrite whole sectors without the Mister knowing, which will slow it down.
When you're copying lots of files to it, keep an eye on it for sudden, drastic drops in write speed after you've copied more than 128 megs or so. If you see that, it could be an SMR drive, which kind of suck. It will probably still work with the Mister, but you may get occasional lengthy slowdowns on writes, and you may hear drive activity when the system is idle, as the drive collects data from the CMR(fast) area and rewrites it into the SMR (very slow) area.
Re: Hard Drive FTP Access
I have gotten some dips while transferring the files from my Flash Drive to the Seagate. I think I'm just going to return this drive. Although I like the limited edition artwork on it, it's not really as functional as just using my flash drive. If I ever fill up the flash drive (which is only likely when the Saturn core fully gets implemented) I'll just replace it with a 512GB or 1TB drive instead.