CentOS 6 Hi All: Over the weekend I had to reboot one of my systems and got hit with fsck runs on all of the filesystems. I would not mind so much except doing them all at once took over an hour. I would like to be able to stagger these, ideally only execute one fsck per reboot. I have been able to think of two possible solutions but neither is terrific. My first idea was to manually run fsck on each filesystem, one every couple of weeks. That way they will not all come due at the same time if we reboot on a regular basis. The second idea was to set each filesystem to a different random count value. This would run the risk of having two or more executions at the same time but it would probably not be very frequent. Does anyone have a suggestion for a better way of doing this? TIA Regards, Hugh -- Hugh E Cruickshank, Forward Software, www.forward-software.com
On Tue, Apr 21, 2015 at 9:38 AM, Hugh E Cruickshank <hugh at forsoft.com> wrote:> CentOS 6 > > > My first idea was to manually run fsck on each filesystem, one every > couple of weeks. That way they will not all come due at the same time > if we reboot on a regular basis. > > The second idea was to set each filesystem to a different random count > value. This would run the risk of having two or more executions at > the same time but it would probably not be very frequent. > > Does anyone have a suggestion for a better way of doing this? >Take a look at 'man tune2fs' and 'man fstab' for modifying the fsck order in your system. HTH, -- Arun Khan
On 4/20/2015 9:08 PM, Hugh E Cruickshank wrote:> The second idea was to set each filesystem to a different random count > value. This would run the risk of having two or more executions at > the same time but it would probably not be very frequent. > > Does anyone have a suggestion for a better way of doing this?use XFS, no fsck's until/unless something catastrophic happens to the file system. -- john r pierce, recycling bits in santa cruz
On 04/21/2015 06:08 AM, Hugh E Cruickshank wrote:> CentOS 6 > > Hi All: > > Over the weekend I had to reboot one of my systems and got hit with > fsck runs on all of the filesystems. I would not mind so much except > doing them all at once took over an hour. I would like to be able to > stagger these, ideally only execute one fsck per reboot. I have been > able to think of two possible solutions but neither is terrific. > > My first idea was to manually run fsck on each filesystem, one every > couple of weeks. That way they will not all come due at the same time > if we reboot on a regular basis. > > The second idea was to set each filesystem to a different random count > value. This would run the risk of having two or more executions at > the same time but it would probably not be very frequent. > > Does anyone have a suggestion for a better way of doing this? > > TIA > > Regards, Hugh >Using "tune2fs -c", set the max-mount-counts to a different prime number for each filesystem. So e.g. instead of having 20 for all of them, set the first filesystem to 17, the second to 19, the third to 23, and the fourth to 29. This way, three or more fscks on the same boot are quite unlikely. HTH, Kay
From: Arun Khan Sent: April 20, 2015 23:49> > Take a look at 'man tune2fs' and 'man fstab' for modifying the fsck > order in your system.Thanks but I did look at those and I was not able to find anything that would limit the fsck executions to one per reboot. Changing the order of execution will not address my concern. Regards, Hugh -- Hugh E Cruickshank, Forward Software, www.forward-software.com
From: John R Pierce Sent: April 20, 2015 23:58> On 4/20/2015 9:08 PM, Hugh E Cruickshank wrote: > > The second idea was to set each filesystem to a different > random count > > value. This would run the risk of having two or more executions at > > the same time but it would probably not be very frequent. > > > > Does anyone have a suggestion for a better way of doing this? > > use XFS, no fsck's until/unless something catastrophic happens to the > file system.Thanks. That would avoid the problem on future systems. Regards, Hugh -- Hugh E Cruickshank, Forward Software, www.forward-software.com
From: Kay Diederichs Sent: April 21, 2015 03:43> On 04/21/2015 06:08 AM, Hugh E Cruickshank wrote: > > > > The second idea was to set each filesystem to a different random > > count value. This would run the risk of having two or more > > executions at the same time but it would probably not be very > > frequent. > > Using "tune2fs -c", set the max-mount-counts to a different > prime number > for each filesystem. So e.g. instead of having 20 for all of them, set > the first filesystem to 17, the second to 19, the third to 23, and the > fourth to 29. This way, three or more fscks on the same boot are quite > unlikely.Thanks but that is not much different then my second idea and does not fully avoid the problem. Regards, Hugh -- Hugh E Cruickshank, Forward Software, www.forward-software.com
From: Hugh E Cruickshank Sent: April 20, 2015 21:09> > Over the weekend I had to reboot one of my systems and got hit with > fsck runs on all of the filesystems. I would not mind so much except > doing them all at once took over an hour. I would like to be able to > stagger these, ideally only execute one fsck per reboot. I have been > able to think of two possible solutions but neither is terrific.I have come up with a third idea that would seem to address what I am looking for... 1. Create a file with the list of filesystems in desired order of execution. 2. Create an init.d script that: a. Sets tune2fs -c 0 on all filesystems. b. Extracts the first filesystem from the file, c. Sets tune2fs -c 1 on it, and d. moves it to the end of the file. The result is that on each reboot (after the first) only one filesystem will be checked on each boot. The down side is that an fsck will be run on every reboot however this could be mitigated by adding a boot count that would be maintained and checked in the file. It would appear that I have the beginnings of a workable solution. Thanks for everyone's suggestions. Regards, Hugh -- Hugh E Cruickshank, Forward Software, www.forward-software.com