пятница, 7 декабря 2012 г.

Изменение режима IDE - SATA


Creating a New Initial RAM Disk

If you have changed a motherboard or moved a disk to a different system it may fail to boot due to the lack of appropriate drivers in the initial RAM disk image (initrd).

 Note: This article applies to CentOS-5 and earlier. CentOS-6 uses dracut and initramfs. Please see man dracut and the upstream Deployment Guide.

Boot in Rescue Mode

Please perform the following steps:

Boot from a CentOS installation disc (for example, CD #1 or DVD).
Type "linux rescue" at the "boot:" prompt.
Mount all filesystems in read-write mode.
Create the New Initrd

Change root to real root ('/') on your hard disk and make the initrd. (The example is for the latest CentOS 5.5 kernel, as of this writing. Modify it for your current kernel.)
mount --bind /proc /mnt/sysimage/proc
mount --bind /dev /mnt/sysimage/dev
mount --bind /sys /mnt/sysimage/sys
chroot /mnt/sysimage
cd /boot
mv initrd-2.6.18-194.32.1.el5.img initrd-2.6.18-194.32.1.el5.old.img
mkinitrd initrd-2.6.18-194.32.1.el5.img 2.6.18-194.32.1.el5

If you are migrating a physical machine to a virtual one using the Xen hypervisor, replace the last command above with:
mkinitrd --with-xenblk initrd-2.6.18-194.32.1.el5xen.img 2.6.18-194.32.1.el5xen

Many other options may be exercised, such as adding non-loaded modules manually. See man mkinitrd for details. It may be necessary to modify /boot/grub/grub.conf and/or /etc/fstab depending on the details of your installation. This depends on your use of LABEL and/or UUID versus physical devices in the files, and is too complex an issue to get into in any detail in a TipsAndTricks article.
Reboot
cd /
sync; sync; sync
telinit 6


четверг, 22 ноября 2012 г.

vzquota : (error) Quota on syscall for 101: Device or resource busy"

Решение:
1) Запустить команду: lsof 2> /dev/null | egrep '/vz/root/101|/vz/private/101'
2) Убилть через kill процессы, полученные в результате выполнения п. 1)

среда, 5 сентября 2012 г.

Кракозябры в Midnight Commander


# mc 
Если столкнулись с такой проблемой как кракозябр в Midnight Commander, а точнее: есть проблема при работе через ssh в mc таблицы отображается кракозябрами в качестве клиента ssh используется Putty,
то лечится вот этой командой:
unicode_start

четверг, 16 августа 2012 г.

zquota : (error) Quota off syscall for id 101: Device or resource busy


Stopping container ...
Container was stopped
vzquota : (error) Quota off syscall for id 101: Device or resource busy
vzquota : (error)       Possible reasons:
vzquota : (error)       - Container's root is not unmounted
vzquota : (error)       - there are opened files inside container's root/private area
vzquota : (error)       - your current working directory is inside a container directory
vzquota : (error)         root/private area

Необходимо выполнить команду:
# lsof 2> /dev/null | egrep '/vz/root/101|/vz/private/101'

и понять кто держит ресурс, далее kill -9 process_id

четверг, 26 июля 2012 г.

EXP через Oracle client в Windows


exp username/passworf@"(DESCRIPTION\=(ADDR
ESS_LIST\=(ADDRESS\=(PROTOCOL\=TCP)(HOST\=ip-addres)(PORT\=1521)))(CONNECT_D
ATA\=(SERVER\=DEDICATED)(SERVICE_NAME\=orcl)))"

вторник, 10 июля 2012 г.

Проблемы с запуском make PERL

Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible


Для этого нужно поправить конфигурацию в
/usr/lib/perl5/5.8.8/CPAN/Config.pm


и добавить строку 'make' => q[/usr/bin/make]

понедельник, 9 июля 2012 г.

Проблема с установкой iftop checking POSIX threads compilation... CFLAGS= and LIBS=-lpthread

На этапе запуска ./configure возникала ошибка с CFLAGS и LIBS

  1. checking POSIX threads compilation... CFLAGS= and LIBS=-lpthread
  2. checking POSIX threads usability... configure: error: it fails. We probably guessed the wrong CFLAGS.

Разрешил проблему так: в /usr/lib создал 
ln -s libpcap.so.9.5 /usr/local/lib/libpcap.so

четверг, 5 июля 2012 г.

Восстановление .NET (2.0, 3.0)


.NET Framework 2.0 SP2 - silent repair
msiexec /fpecmsu {C09FB3CD-3D0C-3F2D-899A-6A1D67F2073F} REINSTALL=ALL /l*v %temp%\netfx20sp2_repair_log.txt /qb
.NET Framework 3.0 SP2 - silent repair
msiexec /fpecmsu {A3051CD0-2F64-3813-A88D-B8DCCDE8F8C7} REINSTALL=ALL /l*v %temp%\netfx30sp2_repair_log.txt /qb
Behind-the-scenes details if you are interested
There is a difference in the command line switches being passed in to trigger the repair of 2.0 SP2 and 3.0 SP2 compared to 2.0 SP1 and 3.0 SP1.  Here are a couple of specific examples:
.NET Framework 2.0 SP2 - silent repair
msiexec /fpecmsu {C09FB3CD-3D0C-3F2D-899A-6A1D67F2073F} REINSTALL=ALL /l*v %temp%\netfx20sp2_repair_log.txt /qn
.NET Framework 2.0 SP1 - silent repair
msiexec /i {B508B3F1-A24A-32C0-B310-85786919EF28} /l*v %temp%\netfx20sp1_repair_log.txt /qn

По материалам: http://blogs.msdn.com/b/astebner/archive/2009/02/18/9432938.aspx 

воскресенье, 10 июня 2012 г.

понедельник, 12 марта 2012 г.

Табличное пространство ORACLE


SELECT /* + RULE */  df.tablespace_name "Tablespace",
       df.bytes / (1024 * 1024) "Size (MB)",
       SUM(fs.bytes) / (1024 * 1024) "Free (MB)",
       Nvl(Round(SUM(fs.bytes) * 100 / df.bytes),1) "% Free",
       Round((df.bytes - SUM(fs.bytes)) * 100 / df.bytes) "% Used"
  FROM dba_free_space fs,
       (SELECT tablespace_name,SUM(bytes) bytes
          FROM dba_data_files
         GROUP BY tablespace_name) df
 WHERE fs.tablespace_name (+)  = df.tablespace_name
 GROUP BY df.tablespace_name,df.bytes
UNION ALL
SELECT /* + RULE */ df.tablespace_name tspace,
       fs.bytes / (1024 * 1024),
       SUM(df.bytes_free) / (1024 * 1024),
       Nvl(Round((SUM(fs.bytes) - df.bytes_used) * 100 / fs.bytes), 1),
       Round((SUM(fs.bytes) - df.bytes_free) * 100 / fs.bytes)
  FROM dba_temp_files fs,
       (SELECT tablespace_name,bytes_free,bytes_used
          FROM v$temp_space_header
         GROUP BY tablespace_name,bytes_free,bytes_used) df
 WHERE fs.tablespace_name (+)  = df.tablespace_name
 GROUP BY df.tablespace_name,fs.bytes,df.bytes_free,df.bytes_used
 ORDER BY 4 DESC;

четверг, 19 января 2012 г.

Install X server via YUM on Redhat/CentOS



How to install X server via YUM on Redhat/CentOS

First you can see all the yum groups available with the command:

yum grouplist

You can install X and Gnome or KDE like this:

yum groupinstall "X Window System" "GNOME Desktop Environment"

or

yum groupinstall "X Window System" "KDE (K Desktop Environment)"

You may also want to add some other groups from the list like "Graphical Internet" or "Office/Productivity"