Linux Disk Management

Linux Disk Management

Dear all,

Some of you have reported that the servers takes ages to reboot. They are busy scanning their disks for errors. You wish to stop this server behavior. You just want to configure the servers to skip/postpone hard disk scanning for errors until next time (probably next year!).

Okay, this is possible. You can execute just one command to change this server behaviour. However, it is not recommended. May be you can adjust to minimize the frequency of the server booting behaviour, for example you can configure say to scan disk once on every 50 circles of rebooting the server.

How to configure this? Easy, just run:
sudo tune2fs -c 50 /YourBootDiskPartiction

to find out yourbootdiskpartiction, you need to run fdisk command as follows:

:~$ sudo fdisk -l

[sudo] password for user:

Disk /dev/sda: 320.1 GB, 320072933376 bytes

255 heads, 63 sectors/track, 38913 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x0000e474

Device Boot Start End Blocks Id System

/dev/sda1 * 1 38417 308582400 83 Linux

/dev/sda2 38417 38914 3986433 5 Extended

/dev/sda5 38417 38914 3986432 82 Linux swap / Solaris

From the above fdisk command, yourbootdiskpartiction is /dev/sda1. Thus if you want to tune your server to scan disk once in every 50 circles of reboot, you will just run the command:

sudo tune2fs -c 50 /dev/sda1

Please note, it is possible to tune your server to scan disk once on every 'n' days. For example, to set your server to scan disk once on every 30 days, just run the following command:

sudo tune2fs -i 30d /dev/sda1

I hope this will work for you.


Post a Comment