Improving Porteus USB Root Drive "Yank Out" Tolerance
Posted: 24 Mar 2015, 20:50
Hi gang,
At least four times in the last two days, I've disturbed my thumb drive while running Porteus (and Win7 in VirtualBox, for that matter).
The result is something like a crash and (thus far) minor file system corruption. I'd like to minimize this risk.
I'm using EXT4 for Porteus and within an encrypted save.dat file.
Using EXIT with the changes cheatcode appears to be a robust option, but carries risk of loss of work. In the end, that's probably the way to go but I'd like to know if there is a practical alternative.
I've searched around and found some general advice, but not finding the zings (or even the proper files to modify) for Porteus. Note I was heavy into BSD a good 25 years ago, back when just about everything was in rc.local and I'm a bit lost since. Overlay and automounting filesystems were just getting a foothold as I turned my attentions away from UNIX.
So, a few questions:
1). Is there some underlying, possibly FS-independent way to make Linux tolerant of yanking and replacing the USB drive? I'd imagine you'd have to turn off the flash drive's internal cache, if any, but beyond that, file servers go up and down and lose and re-establish connectivity all the time, and even a PXE booted, diskless system will just wait until the resources are back online, as I recall. It's not too hard to imagine that similar functionality could be written in to the kernel (and possibly mount) to support any file system, or at least some cooperation between the kernel/mount/FS could be implemented. Has this been done, and how do I get in on it?
2) Is this issue reason enough to go with XFS, BtrFS, or some other more exotic FS over EXT4?
3) What, if anything, has already been done/tuned in Poteus (vs. most other out of the box Linux distros) to help with this problem? Where can these mods be examined or tuned further?
3) What FS specific parameters should I tune, and just as importantly: what Porteus files, command lines (w/in files) or options should be modified/added? Where can I find more info?
4) What special considerations might be needed to ensure that the filesystem within the save.dat file is also optimized against accidental removal? IE: answers to question #3 specific to save.dat files: what line(s) of what file(s) should I be looking at to modify save.dat mount parameters?
I've also noticed that from within Win7/Virtualbox guest OS, you can't optimize for quick removal or disable write caching. I wonder if there is some combination of Linux/mount options that will disable caching and make win7/Vbox aware of this fact, allowing for improved yank tolerance for Win as well. But that's a bit beyond the scope of this question, and I may find the answer incidentally while fiddling with basic FS options as implied above.
Thank you in advance for any insight! If an exhaustive discussion can't be managed, tips and hints appreciated.
-jeff
At least four times in the last two days, I've disturbed my thumb drive while running Porteus (and Win7 in VirtualBox, for that matter).
The result is something like a crash and (thus far) minor file system corruption. I'd like to minimize this risk.
I'm using EXT4 for Porteus and within an encrypted save.dat file.
Using EXIT with the changes cheatcode appears to be a robust option, but carries risk of loss of work. In the end, that's probably the way to go but I'd like to know if there is a practical alternative.
I've searched around and found some general advice, but not finding the zings (or even the proper files to modify) for Porteus. Note I was heavy into BSD a good 25 years ago, back when just about everything was in rc.local and I'm a bit lost since. Overlay and automounting filesystems were just getting a foothold as I turned my attentions away from UNIX.
So, a few questions:
1). Is there some underlying, possibly FS-independent way to make Linux tolerant of yanking and replacing the USB drive? I'd imagine you'd have to turn off the flash drive's internal cache, if any, but beyond that, file servers go up and down and lose and re-establish connectivity all the time, and even a PXE booted, diskless system will just wait until the resources are back online, as I recall. It's not too hard to imagine that similar functionality could be written in to the kernel (and possibly mount) to support any file system, or at least some cooperation between the kernel/mount/FS could be implemented. Has this been done, and how do I get in on it?
2) Is this issue reason enough to go with XFS, BtrFS, or some other more exotic FS over EXT4?
3) What, if anything, has already been done/tuned in Poteus (vs. most other out of the box Linux distros) to help with this problem? Where can these mods be examined or tuned further?
3) What FS specific parameters should I tune, and just as importantly: what Porteus files, command lines (w/in files) or options should be modified/added? Where can I find more info?
4) What special considerations might be needed to ensure that the filesystem within the save.dat file is also optimized against accidental removal? IE: answers to question #3 specific to save.dat files: what line(s) of what file(s) should I be looking at to modify save.dat mount parameters?
I've also noticed that from within Win7/Virtualbox guest OS, you can't optimize for quick removal or disable write caching. I wonder if there is some combination of Linux/mount options that will disable caching and make win7/Vbox aware of this fact, allowing for improved yank tolerance for Win as well. But that's a bit beyond the scope of this question, and I may find the answer incidentally while fiddling with basic FS options as implied above.
Thank you in advance for any insight! If an exhaustive discussion can't be managed, tips and hints appreciated.
-jeff