this post was submitted on 13 Jul 2023
-5 points (46.2% liked)
Technology
59299 readers
4599 users here now
This is a most excellent place for technology news and articles.
Our Rules
- Follow the lemmy.world rules.
- Only tech related content.
- Be excellent to each another!
- Mod approved content bots can post up to 10 articles per day.
- Threads asking for personal tech support may be deleted.
- Politics threads may be removed.
- No memes allowed as posts, OK to post as comments.
- Only approved bots from the list below, to ask if your bot can be added please contact us.
- Check for duplicates before posting, duplicates may be removed
Approved Bots
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
A modern filesystem cannot make magic happen, if the data was in the process of being written it is still in memory and lost.
Only copy-on-write filesystems are safe here as they don’t overwrite old data. NTFS is not safe.
If 44GB had not been flushed to disk yet then that implies that OP has >44GB of RAM in use as page cache. SSD write caches are only around 2GB while HDD write caches are not more than about 512MB. I don't know how much RAM OP has but this seems unlikely to be the case.
I would bet on one of the following:
3 & 4 being the reason I was asking what filesystem OP is using.
COW filesystems make no difference in this case since this was not data overwriting an existing file. They still have the same behavior with write caching in the OS and on the drive and still require a tool (eg.
btrfs-check
) to recover unlinked changes in the event of a crash.NTFS is a journaling filesystem and is crash-consistent. That doesn't mean it can do "magic" if the data hasn't hit the disk, but it does mean that it won't corrupt the filesystem or lose data which was already written in the case of a crash.
I didn’t mean OPs case.
Journaling just means it knows what failed. Without CoW you will corrupt data.