Archive for the tag 'filesystem'

SBDavid

The /proc filesystem /proc/uptime

The /proc filesystem /proc/uptime

This file contains the length of time since the system was booted, as well as the amount of time since then that the system has been idle. Both are given as floating-point values, in seconds.

Example output:

[fedora@fedora ~]$ cat /proc/uptime
3677.44 1898.50

[fedora@fedora ~]$ uptime
22:58:03 up 1:01, 2 users, load average: 0.24, 0.29, 0.32
[fedora@fedora ~]$
[root@fedora ~]#

Disable Mounting of Uncommon Filesystem Types

Append the following lines to /etc/modprobe.conf in order to prevent the usage of uncommon filesystem types:

install cramfs /bin/true
install freevxfs /bin/true
install jffs2 /bin/true
install hfs /bin/true
install hfsplus /bin/true
install squashfs /bin/true
install udf /bin/true

Using the install command inside /etc/modprobe.conf instructs the kernel module loading system to run the command specified (here, /bin/true) instead of inserting the module in the kernel as normal. This effectively prevents usage of these uncommon filesystems.

tune2fs - adjust tunable filesystem parameters on ext2/ext3/ext4 filesystems

tune2fs allows the system administrator to adjust various tunable filesystem parameters on Linux ext2, ext3, or ext4 filesystems.

The current values of these options can be displayed by using the -l option to tune2fs(8) program, or by using the dumpe2fs(8) program.

-c max-mount-counts

Adjust the number of mounts after which the filesystem will be checked by e2fsck(8). If max-mount-counts is 0 or -1, the number of times the filesystem is mounted will be disregarded by e2fsck(8) and the kernel.Staggering the mount-counts at which filesystems are forcibly checked will avoid all filesystems being checked at one time when using journaled filesystems.

-C mount-count

Set the number of times the filesystem has been mounted. If set to a greater value than the max-mount-counts parameter set by the -c option, e2fsck(8) will check the filesystem at the next reboot.

Getting the current Values:

[root@proxy ~]# tune2fs -l /dev/sdb1 |grep count
Inode count: 655360
Block count: 2620595
Reserved block count: 131029
Mount count: 12
Maximum mount count: 26
[root@proxy ~]#

Example:

So for a system that contains 5 partitions and is booted approximately once a month you could do the following to stagger the mount counts:

tune2fs -c 5 -C 0 partition1
tune2fs -c 5 -C 1 partition2
tune2fs -c 5 -C 2 partition3
tune2fs -c 5 -C 3 partition4
tune2fs -c 5 -C 4 partition5

SBDavid

rsnapshot filesystem backup utility

rsnapshot is a filesystem backup utility based on rsync.

Using rsnapshot, it is possible to take snapshots of your filesystems at different points in time. Using hard links, rsnapshot creates the illusion of multiple full backups, while only taking up the space of one full backup plus differences. When coupled with ssh, it is possible to take snapshots of remote filesystems as well.

rsnapshot is written in Perl, and depends on rsync. OpenSSH, GNU cp, GNU du, and the BSD logger program are also recommended, but not required.

All of these should be present on most Linux systems.

By default, the installation procedure will install all files under /usr/local. If you’ve followed these instructions so far, you will have configured rsnapshot to be installed under /usr/local, with the config file in /etc.

Under these circumstances, it will be necessary to become root to install the program. Now is the time to do so. You will, of course, need the root password to do this:

su

This will prompt you for the root password.

Now, to install rsnapshot, run the following command:

make install

This will install rsnapshot with all the settings you specified in the ./configure stage. If all goes well, you will have the following files on your system:

/usr/local/bin/rsnapshot The rsnapshot program
/usr/local/man/man1/rsnapshot.1 Man page
/etc/rsnapshot.conf.default The example config file

The latest version of the program and this document can always be found at http://www.rsnapshot.org/.

Enabling quotas for a filesystem in Webmin

If the main page of the module shows User Quotas Active (or *Group Quotas Active*) under the Status column for the filesystem, then quotas have already been enabled. If not, to configure and turn on quotas for an ext2 or ext3 filesystem, follow these steps :

If the filesystem already appears in the list on the main page of the module, quotas have already been configured and you can skip to step 5.

Go to the Disk and Network Filesystems module and click on the filesystem you want to enable quotas on.

Change the Use Quotas? option to either User only, Group only or User and Group depending on which kinds of quota you want to enforce.

Click the Save button.

If an error saying that the filesystem is already in use appears, just click the

Apply to Permanent List button. Quotas can still be enabled without needing to reboot, and will be automatically re-enabled when the system is next rebooted.

Back in the Disk Quotas module, your filesystem should now be visible. Click on the Enable Quotas link to activate quotas now.

Assuming all goes well, after a short delay the browser will return to the list of quotas and the Status column will have changed to User Quotas Active.

more at .. http://doxfer.com/Webmin/

Next »