Archive for January, 2012

SBDavid

Snapshot Volumes

Snapshot Volumes

The LVM snapshot feature provides the ability to create virtual images of a device at a particular instant without causing a service interruption. When a change is made to the original device (the origin) after a snapshot is taken, the snapshot feature makes a copy of the changed data area as it was prior to the change so that it can reconstruct the state of the device.

LVM snapshots are not supported across the nodes in a cluster. You cannot create a snapshot
volume in a clustered volume group.

LVM snapshots are not supported for LVM mirrored logical volumes.

Snapshot copies of a file system are virtual copies, not actual media backup for a file system.
Snapshots do not provide a substitute for a backup procedure.

SBDavid

Striped Logical Volumes

Striped Logical Volumes

When you write data to an LVM logical volume, the file system lays the data out across the underlying physical volumes. You can control the way the data is written to the physical volumes by creating a striped logical volume.

For large sequential reads and writes, this can improve the efficiency of the data I/O.Striping enhances performance by writing data to a predetermined number of physical volumes in round-robin fashion. With striping, I/O can be done in parallel. In some situations, this can result in near-linear performance gain for each additional physical volume in the stripe.

SBDavid

Time Synchronisation with NTP

Time Synchronisation with NTP

NTP is a TCP/IP protocol for synchronising time over a network. Basically a client requests the current time from a server, and uses it to set its own clock.

Behind this simple description, there is a lot of complexity - there are tiers of NTP servers, with the tier one NTP servers connected to atomic clocks (often via GPS), and tier two and three servers spreading the load of actually handling requests across the Internet. Also the client software is a lot more complex than you might think - it has to factor out communication delays, and adjust the time in a way that does not upset all the other processes that run on the server. But luckily all that complexity is hidden from you!

Linux Distros has two ways of automatically setting your time: ntpdate and ntpd.

ntpdate as standard, and will run it once at boot time.

The ntp daemon ntpd is far more subtle. It calculates the drift of your system clock and continuously adjusts it, so there are no large corrections that could lead to inconsistent logs for instance.

SBDavid

Logical Volume Backup

Logical Volume Backup

Metadata backups and archives are automatically created on every volume group and logical volume configuration change unless disabled in the lvm.conf file. By default, the metadata backup is stored in the /etc/lvm/backup file and the metadata archives are stored in the /etc/lvm/archive file.

How long the metadata archives stored in the /etc/lvm/archive file are kept and how many archive files are kept is determined by parameters you can set in the lvm.conf file. A daily system backup should include the contents of the /etc/lvm directory in the backup.

Note that a metadata backup does not back up the user and system data contained in the logical volumes. You can manually back up the metadata to the /etc/lvm/backup file with the vgcfgbackup command.

SBDavid

Finding files readable for everybody

Finding files readable for everybody

find . -perm -444 -perm /222 ! -perm /111
find . -perm -a+r -perm /a+w ! -perm /a+x

These two commands both search for files that are readable for everybody (-perm -444 or -perm -a+r), have at least write bit set (-perm /222 or -perm /a+w) but are not executable for anybody (! -perm /111 and ! -perm /a+x respectively)

Next »