First of all, I know you’re not meant to defrag SSDs!.. but hear me out.
I have a device called the iODD 2531 (which is a re-badge of, or the original version of the Zalman VE350). It’s an external enclosure for 2.5" disks, that connects via USB, and that can be used as a plain old external storage device, along with being able to act as a virtual optical drive and thumb drive(s). It can mount any ISO stored in a specific folder, as if it were a physical disc.
The problem I’m having though, and the reason for my question is that, in order to mount an ISO properly, the .iso file must not be fragmented on the disk. Most of the time this doesn’t present a problem but sometimes, it means that I have to defrag the disk in order to make the ISO contiguous (I think that’s the right word) and thus, mountable.
Surely there’s a better way though?
I guess what I’m asking is, is there a way of writing files to an SSD that will avoid the need to defrag?.. preferably on Linux.
This may fail if your drive does not have enough continuous space, however, at which point you must defrag regardless. Another weakness is that some sectors may be damaged on your SSD drive at which point a continuous copy will not work. So I would recommend loopback as a first option.
The thing is fairly intolerant of filesystem fragmentation. I thought NTFS was supposed to somewhat reduce the impact of fragmentation. And I have an SSD inside, which doesn’t exactly require fragmentation, since seeks are practically free. But after filling this thing 2/3 of the way, I started getting an error, “>> DEFRAG <<“, whenever I tried to mount the latest ISO file. There is no documentation that seems to cover this, but it was clear what I had to do—defragment my solid-state drive, running NTFS, through Linux. (The “solution” to this, BTW, is to copy everything off of the drive, reformat it as a new NTFS filesystem, and copy everything back.) It was just incapable of reading the fragmented ISO.
OP, unless someone at hackaday managed to put Arch on it, you’re out of luck.
Sorry, I wasn’t clear. The external enclosure mounts ISOs so that you can boot from them. No more burning discs / future coasters, or using external applications to write files to thumb drives. You just copy the ISO to the _iso folder, and Bob’s your mother’s brother.
It’s also meant to have write protection capabilities, so you can plug it into infected devices but I’m not brave enough for that sort of thing… that’s when spinning rustplastic comes in handy.
I’ll give that a go and see how I get on. Thank you.
It’s my understanding that data fragmentation on SSDs actually improves their speed as the data is spread across multiple DRAM dies that can be read from and written to in parallel.
Doesn’t look like they have yet… probably too busy trying to get Doom to run on it.
If you have a 10MB file - and its contiguous (IE: not fragmented) - you can issue multiple large read operations to read the file. If a file is split into tiny fragments (say 4kb sectors), then you’ll need to issue lots of tiny reads to read the entire file. So heavily fragmented files will require more IO operations, which will reduce performance on SSDs (SSDs have limited IOPs, especially SATA SSDs). This means de-fragmenting a SSD can make sense.
However modern filesystems (including NTFS) do a great job at avoiding fragmentation. Except when the filesystems get really full (>90%), in which case it doesn’t have enough free space to prevent fragmentation. So in practise SSDs don’t need defragmentation, even a little bit of fragmentation in things like log files aren’t really an issue. Just make sure you keep your disks at >20% free space to be sure.
(An interesting aside is that ZFS’s copy on write nature actually causes quite a bit of fragmentation. But in practise it does enough caching and prefetching to reduce performance issues.).
There are a lot of people here suggesting software bootloader alternatives, but you have to realize that this sort of ISO emulator is super useful for old systems or old OSes that can’t/don’t liek to boot over USB. There are ISOs of Windows PE and some versions of Embedded that use features of the ISO-9660 boot sector/etc that make them only bootable from either actual media or an emulated drive of some sort.
I just had to deal with this for installing an old version of Windows Embedded POSReady onto a Wincor-Nixdorf POS PC for use with some development tools, since the software is ancient and the powered +24V/+12V USB makes connecting programmers/etc more convenient. No ODD and Embedded/POSReady will not easily boot from USB.