Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [EN] Setting up cleaning of Partitions.  (Read 3188 times)

LRC1962

  • Guest
[EN] Setting up cleaning of Partitions.
« on: 2014/05/13, 01:03:40 »
I remember years and years ago (could either been in a kanotix or sidux forum, I ca not remember) seeing about parametres that you can add to a partitions that gives instructions as to when fdisk cleans partitions at bootup. It involved time frame (days, months up to a max), number of reboots (up to  a max I believe) and I think the degree of defragmentation. His recommendations  (generally agreed to by most) far exceeded the defaults placed.
Would anyone know the commands and what a good setup would be for most users?
I can not seem to find the file where I wrote them down in, but I do know that some of my partitions (thanks to Linux drives can last a long long time) get only cleaned once or twice a year with those commands and the fragmentation is only around 7% or so. Nothing compared to what Windows can do to a drive in a week.

Offline devil

  • Administrator
  • User
  • *****
  • Posts: 4.842
Re: Setting up cleaning of Partitions.
« Reply #1 on: 2014/05/13, 06:59:19 »
You are looking for
Code: [Select]
tunefs -c n /dev/sdXY where n can be 0 for never, 1 for every boot or a number like 50 that would check every 50 boots. Then there is -i, that determines for  timed intervalls. So
Code: [Select]
tune2fs -i 3m /dev/sdXY will check every 3 months. You can use d,w and m. This is not advisable for your root partition.


greetz
devil

Offline bluelupo

  • User
  • Posts: 2.068
    • BluelupoMe
Re: Setting up cleaning of Partitions.
« Reply #2 on: 2014/05/13, 08:57:02 »
Hi LRC1962,
If you want to perform a file system check on the next boot can create an empty file with the name create forcefsck. This file is automatically deleted after the file system check.

Code: [Select]
# touch /forcefsck