четверг, 3 декабря 2009 г.

FAST - Fully Automated Storage Tiering

Fully Automated Storage Tiering - технология, применяемая в системах хранения данных компании EMC - Symmetrix V-Max, CLARiiON CX4, Celerra NS. Позволяет автоматически в реальном времени перемещать тома данных на дисковые группы с разной производительностью (EFD, FC, SATA) в зависимости от нагрузки.

Перемещение томов данных происходит при помощи технологии Virtual LUN.

Для настройки FAST следует настроить:
Storage type - объединение однотипных дисков с определенным уровнем защиты RAID, например Flash storage with RAID 5.
FAST Policies - правила расположения томов на уровнях хранения.
Storage group - набор томов, к которым будет применен определенный вид FAST Policies.

Применяется 3 типа алгоритмов, по которым определяется перемещать ли тома:
  • EFD promotion/demotion algorithm
  • Capacity-based algorithm
  • FC/SATA cross-tier algorithm
EFD promotion/demotion algorithm - определяет какие тома испытывают большую нагрузку и перемещает их на уровень EFD. При этом после полной загрузки емкости EFD постоянно проводится мониторинг за оставшимися томами и если появляется более загруженный том, он меняется местом с менее загруженным томом, находящимся на уровне EFD. Количество максимальных миграций томов в день определяется при настройке FAST.
Capacity-based algorithm - способствует более равномерному распределению томов по уровням хранения. При этом принимается во внимание объем занимаемого пространства.
FC/SATA cross-tier algorithm - равномерно распределяет нагрузку ввода/вывода по уровням FC и SATA. Тома сортируются по уровню нагрузки и более нагруженные тома перемещаются на менее загруженные дисковые группы.

Сейчас единицей перемещение является том. В будущем EMC обещает: "Future FAST capabilities for Symmetrix V-Max and CLARiiON CX4 will deliver greater efficiencies through a more granular sub-LUN approach. This approach will provide you with even greater total cost of ownership benefits by identifying and moving very small amounts of really active or “hot” data to Flash and the majority of data to lower-cost SATA drives."

В Symmetrix технология FAST поддерживается OE Enginuity Version 5874 Enhancements for Symmetrix V-Max.

четверг, 26 ноября 2009 г.

LPI exam 101 prep: Linux installation and package management

В рамках подготовки к сдаче экзамена 101 уровня Junior Level Linux Professional LPIC-1 публикую краткие описания команд и фактов из подготовительных материалов IBM к этому экзамену.

Linux installation and package management - topic 102

Hard disk layout

/bin - Essential command binaries
/boot - Static files of the boot loader
/dev - Device files
/etc - Host-specific system сonfiguration
/lib - Essential shared libraries and kernel modules
/media - Mount point for removable media
/mnt - Mount point for mounting a filesystem temporarily
/opt - Add-on application software packages
/sbin - Essential system binaries
/srv - Data for services provided by this system
/tmp - Temporary files
/usr - Secondary hierarchy
/var - Variable data

A hard drive is formatted into 512 byte sectors.

The partitions
have names like /dev/hda1, /dev/hda2, /dev/hda3, /dev/sda1, and so on. IDE drives
are limited to 63 partitions, while SCSI drives are limited to 15.

use of the cat command to display
/proc/ide/hda/geometry, followed by the informational messages produced by use of
the parted partitioning tool.

use of the cat command to display
/proc/ide/hda/geometry, followed by the informational messages produced by use of
the parted partitioning tool.

Linux numbers primary or extended partitions as 1 through 4, so dev hda may have
four primary partitions, /dev/hda1, /dev/hda2, /dev/hda3, and /dev/hda4. Or it may
have a single primary partition /dev/hda1 and an extended partition /dev/hda2. If
logical partitions are defined, they are numbered starting at 5, so the first logical
partition on /dev/hda will be/dev/hda5, even if there are no primary partitions and
one extended partition (/dev/hda1) on the disk.

parted subcommand p, which displays the
partition information for the disk

Regardless of whether you are configuring a workstation or a server, you will have
certain files that are unique for each system located on the local drive. Typically,
these include /etc for system parameters, /boot for files needed during boot, /sbin for
files needed for booting or system recovery, /root for the root user's home directory,
/var/lock for lock files, /var/run for running system information, and /var/log for log
files for this system. Other filesystems, such as /home for user home directories,
/usr, /opt, /var/mail, or /var/spool/news may be on separate partitions, or network
mounted, according to your installation needs and preferences.

Boot managers

This code that is loaded by BIOS from this
first sector is called the first stage boot loader or the stage 1 boot loader.

systems checks the partition table to find a primary partition on the boot drive that is
marked as active, loads the first sector from that partition, and passes control to the
beginning of the loaded code. This new piece of code is also known as the partition
boot record.

This new
code is called the stage 2 boot loader. As used by MS-DOS and PC-DOS, the stage
2 loader proceedes directly to load the rest of operating system.

The primary function of lilo command, located in /sbin/lilo, is to write a stage 1
boot record and create a map file (/boot/map) using configuration information that is
normally located in /etc/lilo.conf.

lilo -q
will display information from the map file
lilo -R
will set lilo to automatically boot the specified system on the next reboot only.
This is very convenient for automatically rebooting remote systems.
lilo -I
will display information about the path of a kernel
lilo -u
will uninstall lilo and restore the previous boot record.

GRUB has a configuration file which is usually stored in /boot/grub/grub.conf. If your
filesystem supports symbolic links, as most Linux filesystems do, you will probably
have /boot/grub/menu.lst as a symbolic link to /boot/grub/grub.conf.

remember that
counting starts at 0, so the first Red Hat system which is specified as root
(hd0,6) is actually on partition 7 the first hard drive (/dev/hda7

Make and install programs

The
tar (for Tape ARchive) command is used to create and manipulate archives from
the files in a directory tree.

The tar command can be used in conjunction
with a compression program, normally gzip or bzip2 to create a compressed
archive which saves storage space as well as transmission time. Such a
compressed archive is a tarball.

[ian@localhost ~]$ ls drgeo*
drgeo-1.1.0.tar.gz
[ian@localhost ~]$ gunzip drgeo-1.1.0.tar.gz
[ian@localhost ~]$ ls drgeo*
drgeo-1.1.0.tar

To extract the files from the tar archive, you use the tar command. The usual form,
tar -xvf filename.tar

The -x option tells tar to extract the files. The -v option tells tar to give verbose
output. And the -f option , in conjunction with a file name (drgeo-1.1.0.tar in this
case) tells tar what archive file to extract files from.

If you add the -z
option to the tar command it can decompress and extract gzipped archives with a
single command. For example:
tar -zxvf drgeo-1.1.0.tgz
or
tar -zxvf drgeo-1.1.0.tar.Z

To accomplish the same thing with an archive compressed with bzip2, use the -j
option instead of the -z option . For example:
tar -jxvf drgeo-1.1.0.tar.bz2

Remember to
add ./ before the configure command as your project directory will probably not be
in your path. For example, you might run
./configure
or
./configure --prefix /usr/local

make
with no options will just build the program. Technically this will build a default
target, which usually means just build the program from sources.
make install
will install the program you built. You may need root authority for this if you are
installing in /usr/local.

make clean
will erase files created by the make process.
make all
is sometimes used to perform the bulk of the make file's function with a single
target.

Manage shared libraries

ldd command
which displays information about the library requirements of an executable.

Loading of programs needs to be fast, so the ld.so.conf file is processed to the
ldconfig command to process all the libraries from ld.so.conf.d as well as those
from the trusted directories, /lib and /usr/lib.

Debian package management

We can install that using the apt-get
command

We can use the -s (for
simulate) option on apt-get. There are several other options with equivalent function,
such as --just-print and \--dry-run.

apt-get read a package list from somewhere. That somewhere is
/etc/apt/sources.list.

packages,most of which have not yet been updated. In this case, you can use the
command
apt-cdrom add
to add your CD-ROM to the list of package sources.

If you update your
/etc/apt/sources.list file, then you should run
apt-get update

If you installed a package and later want to uninstall it, you use the remove option
with apt-get.

Another tool that is part of the APT system is the dpkg tool

Configuration of dpkg may be controlled by
/etc/dpkg/dpkg.cfg.

dpkg -s to display the status of the guile
package after we installed it.

dpkg -L
to list the files (including directories) installed by the guile package.

To find which package contains a specific file, use the -S option of dpkg,

A
recent addition to Linux systems is the alternatives system which is managed using
the update-alternatives command.

status for packages is kept in /var/lib/dpkg/status.

dselect command which provides a text-based
full-screen interface (using ncurses) to the package management functions of dpkg.

apt-cache, which is useful for searching
package information on your system.

If you do find and download a .deb file, you can install it using dpkg -i.

Red Hat Package Manager (RPM)

installation of the guile-devel package using
the rpm -ivh command

Note that the -v option gives verbose output and the -h option shows hash marks (#)
to indicate progress.

-e option to remove (or erase) the rp

forcibly install the rpm using the --force option

There is an alternative to forcible install with the --force option that you may need
on some occasions. You can remove an rpm using the --nodeps option which
disables the internal dependency checking.

upgrading an
RPM to a newer level. This is similar to installing, except the we use the -U or the
the -F option instead of the -i option.

The -a option applies your query to all installed packages.

rpm command
provides a -f option to help you locate the package that owns a file.

the rpm
command provides an option to interrogate installed packages or package files to
find out what capabilities they depend on or require.This is the --requires option,
which may be abbreviated to -R.

To check the integrity of an RPM package file use the
--checksig (abbreviated to -K) option of rpm.

Требования к доступности систем - таблица "девяток"

Часто в статьях встречается оценка доступности ИТ-систем указанная в процентах. При этом не всегда очевидно, сколько же в реальном времени может простаивать эта система. Для снятия неясности привожу описание "девяток".

99,99999% - доступность 364 дня 23 часа 59 минут 56 секунд в год, недоступность 3 секунды в год, также называется 7 "девяток".

99,9999% - доступность 364 дня 23 часа 59 минут 29 секунд в год, недоступность 31 секунда в год, также называется 6 "девяток".

99,999% - доступность 364 дня 23 часа 54 минуты 45 секунд в год, недоступность 5 минут 15 секунд в год, также называется 5 "девяток".

99,99% - доступность 364 дня 23 часа 7 минут 27 секунд в год, недоступность 52 минуты 33 секунды в год, также называется 4 "девятки".

99,95% - доступность 364 дня 19 часов 37 минут 12 секунд в год, недоступность 4 часа 22 минуты 48 секунд в год.

99,9% - доступность 364 дня 15 часов 14 минут 24 секунды в год, недоступность 8 часов 45 минут 36 секунд в год, также называется 3 "девятки".

99,8% - доступность 364 дня 6 часов 28 минут 48 секунд в год, недоступность 17 часов 31 минут 12 секунд в год.

99,72603% - доступность 364 дня в год, недоступность ровно 1 день в год.

99,5% - доступность 363 дня 4 часа 12 минут 00 секунд в год, недоступность 1 день 19 часов 48 минут 00 секунд в год.

99% - доступность 361 день 8 часов 24 минуты 00 секунд в год, недоступность 3 дня 15 часов 36 минут 00 секунд в год, также называется 2 "девятки".

98% - доступность 357 дней 16 часов 48 минут 00 секунд в год, недоступность 7 дней 7 часов 12 минут 00 секунды в год.

97% - доступность 354 дня 1 час 12 минут 00 секунд в год, недоступность 10 дней 22 часа 48 минут 00 секунды в год.

среда, 28 октября 2009 г.

LPI exam 101 prep: Hardware and architecture

В рамках подготовки к сдаче экзамена 101 уровня Junior Level Linux Professional LPIC-1 публикую краткие описания команд и фактов из подготовительных материалов IBM к этому экзамену.

Hardware and architecture - topic 101

/proc filesystem. This is not a real filesystem on disk, but a "pseudo file system"

/proc/pci contains information about the devices on the system's PCI bus

lspci command gives similar information

/proc/ioports tells us about the IO ports available on the system

information on interrupts is also kept in the /proc file system, in /proc/interrupts

dmesg command to look for bootstrap messages

DMA channels are in use - in /proc/dma.

lspnp command (part of the kernel-pcmcia-cs package) to display information about PnP devices. File /proc/bus/pnp will contain this information.

hdparm -I /dev/hda

Even without the artificial limits of BIOS or DOS, the CHS design allows for up to 65536 cylinders, 16 heads, and 255 sectors/track. This limits the capacity to 267386880 sectors, or approximately 137 GB.

Devices that start with /dev/hd, such as /dev/hda or /dev/hda5 refer to IDE drives.
The first drive on the first IDE controller is /dev/hda and the second one, if present, is
/dev/hdb. Likewise, the first drive on the second IDE controller is /dev/hdc and the
second one is /dev/hdd.

Today, you will find that both USB and SATA storage devices appear as sd, rather
than hd, devices.

network configuration tool such as system-config-network in Fedora Core 4.

lsmod command will format the contents of /proc/modules and display the status of loaded modules

If you want to know which real device corresponds to say /dev/sda, you can use the
scsi_info command.

sg_map command will provide a map between the sg name and another device name if one exists.

sginfo command interrogates the device for the information while the scsi_info will use the retained information.

The file /proc/bus/usb/devices contains summary information for currently attached USB devices.

lsusb command to help you with display of USB information. In particular, you can get a tree view of your USB devices by using the -t option. This shows their attachment hierarchy. You can use the -d option for information about a specific device if your system gives an abbreviated display using the -t option. The -v option produces verbose output which interprets many of the fields.



понедельник, 19 октября 2009 г.

Базовые операции по настройке ОС Linux

Небольшая памятка по настройке и работе в ОС Linux.



Монтирование образа iso

mount -o loop cdrom.iso /mnt/cdrom

Исправление сильно искаженной картинки на мониторе после установки Х

Из конфигурационного файла следует удалить все разрешения и цвета и оставь только минимальные настройки:

Subsection "Display"
Depth 24
Modes "1024x768" "800x600" "640x480"
EndSubsection

Параметр "DefaultDepth 16" следует поменять на "DefaultDepth 24"

После этого запустить сервис. Рестарт X-window осуществляется клавишами CTRL+ALT+BackSpace.

Установка программ в автозагрузку

Для оконного менеджера Gnome. Programs that you wish to autostart on GNOME startup can be selected by using the Control Center. To do this, open the Control Center and then navigate to Sessions followed by Startup Programs. Click Add and either type the path, or use Browse to select your desired program. If multiple programs are selected, they can be launched in a desired order.

If the GUI is not available or desireable, then one can instead modify ~/.gnome2/session-manual. Syntax is as follows:

File: ~/.gnome2/session-manual
[Default]
num_clients=1
0,RestartClientHint=3
0,Priority=50
0,RestartCommand=gdesklets
0,Program=gdesklets

Запуск и настройка сервиса syslog на линуксе.

В конфигурационном файле syslog.conf указать
local0.info /var/log/cisco.log
Syslogd запустить с ключем -r

На устройстве Cisco указать
logging _адрес_syslog_сервера_
logging trap debugging
logging facility local0

После этого происходит передача событий на syslog-сервер.

Или в syslog.conf следует указать

# Логи с Cisco
+router.test.ru
*.* /var/log/cisco.log
# +* - конец привязки к хосту
+*

Настройка сетевого интерфейса вручную через файл /etc/sysconfig/network-scripts/ifcfg-eth0

Если запуска сетевого сервиса по каким-то причинам не произошло, его можно запустить следующим образом:
/sbin/service network start

Эта команда запускает скрипты, которые находятся в каталоге /etc/sysconfig/network-scripts. Вы можете посмотреть, какие интерфейсы работают ("подняты"), а какие - нет, а также получить некоторые статистические данные о работе каждого интерфейса, введя в командной строке:
/sbin/ifconfig

Сетевой сервис может быть остановлен (отключены все интерфейсы сразу) или перезапущен (перезапускаются все конфигурационные файлы из каталога /etc/sysconfig/network-scripts) командами:
/sbin/service network stop
или
/sbin/service network reload

Все конфигурационные файлы можно редактировать, для чего надо вначале перейти в нужную директорию, например, с помощью команды:
cd /etc/sysconfig/network-scripts

Каждый интерфейс имеет собственный конфигурационный файл. Например, конфигурационный файл интерфейса eth0 называется ifcfg-eth0. Если вы изменяете интерфейс eth0, дайте следующую команду ("vi" - это текстовый редактор, который обычно входит в поставку RHEL):
vi ifcfg-eth0

Пример файла, который будет в этом случае открыт на редактирование:
# Broadcom Corporation|NetXtreme BCM5704 Gigabit Ethernet
Code Описание
DEVICE=eth0 Эта строка задает имя устрйства.
HWADDR=00:01:23:45:67:89 Это MAC-адрес данного интерфейса.
ONBOOT=yes Должен ли этот интерфейс "подниматься" при запуске сетевой службы?
TYPE=Ethernet Тип интерфейса.
NETMASK=255.255.255.0 Маска подсети, к которой будет подключаться интерфейс.
IPADDR=192.168.1.154 Это IP-адрес данного интерфейса.
GATEWAY=192.168.1.1 Это IP-адрес шлюза (gateway), на который будут отсылаться данные в том случае, когда адресат назначения пакета не найдет в локальной сети.

Настройка сервера dns и домена в файле resolv.conf

# For Wellesley
# 08-05-00
# Search and domain are mutually exclusive!
# search .
#
domain ampr.org
#
# The local JNOS host 'machine'...
nameserver 44.56.26.11
# nameserver 44.56.26.10
#

Внесение или изменение в конфигурации имени машины

Прописать имя машины в файле /etc/hostname

sims.office.npr.ru

Прописать имя машины в файле /etc/sysconfig/network

NETWORKING=yes
HOSTNAME=sims.office.npr.ru

Поиск файлов

Осуществляется при помощи команды
Locate

Команда обращается к файлу индекса жесткого диска, созданного командой
Updatedb

Эту команду рекомендуют поместить в crontab

Монтирование и размонтирование CDROM

Mount –t iso9660 /dev/cdrom /mnt/cdrom
Umount /mnt/cdrom

Если сдром занят процессом или пользователем, то

Umount –l /mnt/cdrom – ленивое размонтирование.

Как разархивировать tar.gz

To extract the compressed tar archive target.tar.gz into the current working directory with:
gzip -dc target.tar.gz | tar xf -

Как получить значения всех переменных окружения

Printenv

Installing VMware tools on Ubuntu/Kubuntu/Xubuntu Guests

Start up a terminal window and do the following to ensure that you have the required packages for building VMware Tools or your kernel.

sudo apt-get install build-essential linux-headers-`uname -r`

NOTE: linux-headers-uname -r is not required on a default build as these headers already exist. They are listed here in case you have made kernel modifications.

From the VMware menu, choose VM->Install VMware Tools. You should see a mounted CD image show up on the desktop. In the File Browser that pops up, right-click the VMwareTools*.tar.gz file and extract to the Desktop.

If the cdrom was not automatically mounted, mount the cdrom (in your guest OS) by doing

sudo mount /dev/cdrom ~/Desktop/vmware-tools-distrib

Open a terminal window, and run the following commands.

cd ~/Desktop/vmware-tools-distrib
sudo ./vmware-install.pl

During vmware-install.pl, choose the default answers to everything.

In order for the synchronized clipboard to function as well as the host shared folders feature, you must have vmware-toolbox running.

From the menu choose, System->Preferences->Sessions->Startup Programs. Click Add, enter vmware-toolbox, Ok, Close.

If you are running a Kubuntu guest OS.

echo "/usr/bin/vmware-toolbox" > ~/.kde/Autostart/vmware-toolbox.sh
chmod +x ~/.kde/Autostart/vmware-toolbox.sh

In order to get the scroll wheel to work again after the above install, you will need to make a minor change to the xorg.conf file.

In the "Configured Mouse" section, change the following line as indicated:

Options "Protocol" "imps/2"

If you have more than five buttons (scroll wheel counts as three), then you might need the following line:

Options "Protocol" "ExplorerPS/2"

Restart X.