Siduction Forum

Siduction Forum => Hardware - Support => Topic started by: LRC1962 on 2014/05/13, 01:03:40

Title: Setting up cleaning of Partitions.
Post by: LRC1962 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.
Title: Re: Setting up cleaning of Partitions.
Post by: devil 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
Title: Re: Setting up cleaning of Partitions.
Post by: bluelupo 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