View previous topic :: View next topic |
Author |
Message |
Perfect Gentleman Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/127084678760dc546c6b873.jpg)
Joined: 18 May 2014 Posts: 1256
|
Posted: Mon May 01, 2017 5:56 am Post subject: [Solved] FS for USB-flash? |
|
|
I got Gentoo installed on USB-flash. USB is formatted in XFS. But lately FS becomes corrupted after doing nothing. Really, I did nothing for a couple of days, and today's morning system became un-pingable.
What's the best FS for headless installation on USB-flash?
or it's bad USB-flash?
Last edited by Perfect Gentleman on Thu May 04, 2017 10:40 am; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54849 Location: 56N 3W
|
Posted: Mon May 01, 2017 8:13 am Post subject: |
|
|
Perfect Gentleman,
USB Flash is slow since it rarely supports discard or wear levelling.
Journaled filesystems are bad for Flash too.
I use ext4 with the journal turned off on microSD cards, they are Flash. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Perfect Gentleman Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/127084678760dc546c6b873.jpg)
Joined: 18 May 2014 Posts: 1256
|
Posted: Mon May 01, 2017 9:27 am Post subject: |
|
|
I use journaled FS because of power cut which happens rather often.
I used EXT4 without journal couple of years ago, and it was completely destroyed after two power cuts. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54849 Location: 56N 3W
|
Posted: Mon May 01, 2017 10:05 am Post subject: |
|
|
Perfect Gentleman,
By default, ext4 only journals metadata. A journal replay makes the filesystem metadata self consistent but says nothing about any user data that may be stored on the filesystem.
You can journal everything but that means updates take two writes, once to the journal then to the filesystem.
Journaling is not a magic bullet. You can still corrupt a filesystem with a power cut.
Its usually faster to do a journal replay that a full fsck.
For power cuts you need a UPS, so you can get a clean shut down. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
szatox Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 27 Aug 2013 Posts: 3503
|
Posted: Mon May 01, 2017 12:57 pm Post subject: |
|
|
It's a case where I'd consider f2fs or perhaps some other so called "logging" filesystem. Something that doesn't really have any area for data, and instead stores everything in journal.
They have that nice property that it creates a new point in time view of the filesystem first and tags older views as dirty later, so your previous good version can never be partially overwritten, which in turn makes room for rolling back to the previous known good version in case of failure. Assuming this feature actually works ![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Perfect Gentleman Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/127084678760dc546c6b873.jpg)
Joined: 18 May 2014 Posts: 1256
|
Posted: Wed May 03, 2017 5:14 am Post subject: |
|
|
there was another blackout. USB FS had lots of errors corrected, but system is bootable and functioning. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Perfect Gentleman Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/127084678760dc546c6b873.jpg)
Joined: 18 May 2014 Posts: 1256
|
Posted: Thu May 04, 2017 10:41 am Post subject: |
|
|
USB-flash died today. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NTU Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 17 Jul 2015 Posts: 187
|
Posted: Thu May 04, 2017 12:10 pm Post subject: |
|
|
Microsoft says exFAT works great for SSDs and other flash media. Seems legit. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54849 Location: 56N 3W
|
Posted: Thu May 04, 2017 12:16 pm Post subject: |
|
|
NTU,
exFAT on Linux is depends on FUSE. That makes it slow because of all the context switches. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
chithanh Developer
![Developer Developer](/images/ranks/rank-dev.gif)
![](images/avatars/3210501551dc02a09eeb8.png)
Joined: 05 Aug 2006 Posts: 2158 Location: Berlin, Germany
|
Posted: Thu May 04, 2017 3:35 pm Post subject: |
|
|
USB flash drives sometimes have a "pretend to write successfully, but read only garbage" failure mode.
I have one USB flash drive that does precisely this. Copying small files is usually no problem, but copying a large file like an ISO image will cause parts of it to be corrupted (rsync told me it was about 300 KiB corrupted of a 4 GiB file).
See if your USB flash drive corrupts data by filling it with large files, then "echo 3 > /proc/sys/vm/drop_caches", then comparing sha1sum.
NeddySeagoon wrote: | Journaling is not a magic bullet. You can still corrupt a filesystem with a power cut. | Not if all parts of your storage observe write barriers correctly. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|