On Tue, Feb 18, 2025 at 4:05 PM, William Herrin <[email protected]> wrote:
> On Tue, Feb 18, 2025 at 12:16 PM Drew Weaver <[email protected]> > wrote: > > I found out that this was an issue when I reloaded the switch and the > filesystem looks like it rewound itself to 2022 in Aboot. > > I've seen this before with MicroSD cards in a Raspberry Pi. The card stops > accepting writes but continues to report write success to the OS. > My favorite was a "Sony 480GB Flash Drive" which I purchased at an electronics market in Beijing in 2010, for around $5 USD. I knew that it couldn't be real, but I figured it would be a entertaining… It reported itself to the OS as having 480GB of capacity, but actually only had a 16Mb flash chip. Anything that you wrote past the and of the storage would wrap around to the start. It actually turned out to be remarkable useful - I mounted it on /var/log/syslog on a server, and magically had circular buffer of logs which would never fill up / run out of space…. W On the Pi, this eventually shows up as seeming filesystem corruption when > blocks are flushed and then reloaded to the disk cache. Upon reboot, the Pi > reverts to the state it was in when the writes actually stopped happening. > > I'm not really sure what the theory behind designing cards this way is. It > does mean that the OS will boot even if the boot process must write to > succeed, but it also means that the OS has no idea that the flash drive has > failed and experiences odd random faults instead. > > Regards, > Bill Herrin > > -- > William Herrin > [email protected] > https://bill.herrin.us/ > >

