Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
1TB disk check is a drag
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
grant123
l33t
l33t


Joined: 23 Mar 2005
Posts: 989

PostPosted: Fri Jan 23, 2015 6:39 pm    Post subject: 1TB disk check is a drag Reply with quote

I have a 1TB USB disk almost full. When it decides to check the fs, my entire network is out of commission because my laptop is the router. Is there a fs I can put on the disk that doesn't need to be periodically and slowly checked before mounting?
Back to top
View user's profile Send private message
Pearlseattle
Apprentice
Apprentice


Joined: 04 Oct 2007
Posts: 153
Location: Switzerland

PostPosted: Fri Jan 23, 2015 8:31 pm    Post subject: Reply with quote

Hi
Is it possible that you're currently using ext2/3/4?
Back to top
View user's profile Send private message
grant123
l33t
l33t


Joined: 23 Mar 2005
Posts: 989

PostPosted: Fri Jan 23, 2015 9:04 pm    Post subject: Reply with quote

Yes, is there another fs that doesn't need checking?
Back to top
View user's profile Send private message
Pearlseattle
Apprentice
Apprentice


Joined: 04 Oct 2007
Posts: 153
Location: Switzerland

PostPosted: Fri Jan 23, 2015 9:48 pm    Post subject: Reply with quote

Ah, so it was a good guess.
So, time to raise the stakes: you're probably using ext2 or ext3, right?

And to cut it short:
1)
I'm using ext4 on 2 SW-RAID5 with each 11TB capacity - I never ever had such a scan during the last 2 years. I'm using ext4 as well for my root partitions.
"ext4" is therefore my primary recommandation, as it's very fast to recover even after a full unexpected shutdown (but there will be data loss).
2)
Second place is for XFS.
Similar to ext4, the data tends to get a bit messy after a couple of months of R/W, therefore at that point the R/W rates will be much lower than what you got when you started with it.
3)
If you're hardcore you could split things up: your 1TB drive to host "data" and a normal flash-USB-stick to hold the boot & root partitions.
If you do it like that then think about using NILFS2 for the boot & root partition of the USB-stick (but stick to ext4/xfs for the big data).
NILFS2 will have almost 0-impact on the boot time even if the FS is screwed up as it uses rotating checkpoints and when booting it will just pick up the last one that is tagged as "valid/completed", no matter what happened to your PC when you shut it down.
And - important - because of the rotating-checkpoint-feature even if you screw up with something you can still remount anytime the previous state (as long as you had enough storage so that it did not get recycled because more storage was needed - when storage is needed the oldest checkpoints are deleted).
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7094
Location: Saint Amant, Acadiana

PostPosted: Fri Jan 23, 2015 10:56 pm    Post subject: Reply with quote

You can use tune2fs to adjust how often routine checks will be done.
However, if your drive is not umounted cleanly it will be checked. Also see man fstab, fifth and sixth field.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
grant123
l33t
l33t


Joined: 23 Mar 2005
Posts: 989

PostPosted: Sat Jan 24, 2015 1:33 pm    Post subject: Reply with quote

Pearlseattle, so if I switch that USB storage drive from ext3 to ext4 it won't need to go through that lengthy check any more? Is there anything I can do to keep it from getting messy and slowing down?

Jaglover, I don't think tune2fs is the right solution since ext3 seems to need checking periodically.
Back to top
View user's profile Send private message
Pearlseattle
Apprentice
Apprentice


Joined: 04 Oct 2007
Posts: 153
Location: Switzerland

PostPosted: Sat Jan 24, 2015 3:35 pm    Post subject: Reply with quote

I'm using ext4 on both my server's root disks and they never hang during boot to check the partitions.
I don't think that much can be done to avoid that the data mixes up, but ext4 seems to be doing a good job at keeping things clean, at least on my partitions.

When using ext4 remember to use at least the following options when formatting the partitions...
Code:
mkfs.ext4 -E lazy_itable_init=0,lazy_journal_init=0 /dev/whatever

...to immediately perform the whole format (otherwise the default settings will postpone the formatting it to when you'll use the partitions, making the device slow when writing/reading until the whole partitions were formatted).

Just FYI: as mount options for ext4 I just use just "noatime" for my normal partitions and "noatime,async,barrier=1,nodiscard,journal_async_commit,nodelalloc,data=writeback" for my 2 raid5. Up to you to check what's best.

Cheers
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5771

PostPosted: Sat Jan 24, 2015 9:52 pm    Post subject: Reply with quote

grant123 wrote:
Pearlseattle, so if I switch that USB storage drive from ext3 to ext4 it won't need to go through that lengthy check any more?

Full-fsck speedups of 1000-10000x are common for a disk that size, and are one of the main selling points ext4 advertised when it was introduced many years ago.
Back to top
View user's profile Send private message
grant123
l33t
l33t


Joined: 23 Mar 2005
Posts: 989

PostPosted: Sun Jan 25, 2015 12:35 am    Post subject: Reply with quote

Nice, it sounds like ext4 is the answer. Can I upgrade ext3 or do I need to do a real reformat?
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5771

PostPosted: Sun Jan 25, 2015 5:03 am    Post subject: Reply with quote

You can upgrade in place but it takes time either way - use tune2fs(8) to enable the ext4 features.
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Sun Jan 25, 2015 3:49 pm    Post subject: Reply with quote

I moved from ext3 to ext4 a while back, on various disks up to 500G, and filesystem checking was a _lot_
quicker. I did a full reformat, since ISTR it was then thought that moving from ext3 to ext4 was possible,
but might not get the full benefit of ext4. Than may have changed.

Will
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum