recommended formatting of USB flash drive install

Post here if you are a new Porteus member and you're looking for some help.
rych
Warlord
Warlord
Posts: 622
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

recommended formatting of USB flash drive install

Post#1 by rych » 11 Jan 2017, 13:43

How should I format my USB drive? I've understood that ext4 is the best choice for the filesystem, but how to tune it for a maximum performance while preserving some repairable integrity in case I accidentally unplug the USB drive or loose power? I'm confused about all these options: ordered, writeback, noatime, nodiratime. Should I disable journal like this:

Code: Select all

mkfs.ext4 -O ^has_journal /dev/sda10
What other parameters should I tune using tune2fs?

EDIT: The answer to this question depends on what/how often porteus writes to the disk, and that depends on whether we use "changes=EXIT:". But in any case, according to this thread viewtopic.php?f=48&t=5642&p=43376, the /tmp always lives in RAM. Couldn't find where the "/var/log" lives, hopefully also as tmpfs. Anyway, with writing to the USB already minimized perhaps journalling parameters of the USB filesystem and how it's mounted are less important, but I'd still want to hear a definite answer on how exactly to format my USB before I install porteus on it.
Last edited by rych on 11 Jan 2017, 23:20, edited 1 time in total.

tome
Contributor
Contributor
Posts: 675
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Russia is causing the immense damage to humanity
Contact:

Re: recommended formatting of USB flash drive install

Post#2 by tome » 11 Jan 2017, 14:52

You have mind and feelings. Be wise and clever.

donald
Full of knowledge
Full of knowledge
Posts: 2064
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Re: recommended formatting of USB flash drive install

Post#3 by donald » 11 Jan 2017, 16:50

Personally i use ext2 on flash drives.
(thumb drive; i do not own any ssd)

When comparing performance with other filesystems, it's always
important to try multiple workloads; very often a subtle change in a
workload parameter can completely change the ranking of which
filesystems do well compared to others.

I have never noticed a speed advantage with EXT 3 or 4 anyway.

The nodiratime option disables the writing of file access times only for directories
while other files still get access times written.

The noatime option fully disables writing file access times to the drive every time
you read a file. This works well for almost all applications, except for those
that need to know if a file has been read since the last time it was modified.

noatime implies nodiratime - it's a superset

data=ordered
All data are forced directly out to the main file system
prior to its metadata being committed to the journal.

data=writeback
Data ordering is not preserved, data may be written
into the main file system after its metadata has been
committed to the journal.
Note:It can potentially leave stale data in recently written files
in case of an unclean shutdown.

donald
Full of knowledge
Full of knowledge
Posts: 2064
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Re: recommended formatting of USB flash drive install

Post#4 by donald » 12 Jan 2017, 02:42

rych wrote:but I'd still want to hear a definite answer on how exactly to format my USB
What do you want to achieve?
Nothing is universally, Performance is one thing, Lifetime is another and they correlate.

In general:
The read write speed capability of the built in memory-chips is much more relevant than the file system.
and it is more likely that you lose your usb-stick before it wears out.

rych
Warlord
Warlord
Posts: 622
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

Re: recommended formatting of USB flash drive install

Post#5 by rych » 12 Jan 2017, 07:54

I've ended up doing simply

Code: Select all

mkfs.ext4 -m 1 /dev/sdc1
tune2fs -o journal_data_ordered /dev/sdc1
tune2fs -l /dev/sdc1

Post Reply