Заметил потрясающе низкую скорость чтения с USB HDD:
cray ~ # dd if=/mnt/MobMedia/TorrentsDownloads/debian-503-amd64-DVD-1.iso of=/dev/null bs=1024k count=100
100+0 записей считано
100+0 записей написано
скопировано 104857600 байт (105 MB), 38,4114 c, 2,7 MB/c
cray ~ # mount | grep MobMedia
/dev/sdh3 on /mnt/MobMedia type ext3 (rw,noexec,nosuid,nodev,noatime)
cray ~ # dd if=/dev/sdh3 of=/dev/null bs=1024k count=100
100+0 записей считано
100+0 записей написано
скопировано 104857600 байт (105 MB), 3,8945 c, 26,9 MB/c
cray ~ # fsck -y -f /dev/sdh3
fsck from util-linux-ng 2.16.2
e2fsck 1.41.9 (22-Aug-2009)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
MobMedia: 765/6045696 files (88.1% non-contiguous), 22266376/24155735 blocks
Откуда такая большая фрагментация?
Ответ прост: данный жесткий диск был подключен к Dlink DIR-320 с DD-WRT и торрент клиентом на борту. Т.к. памяти у роутера "кот наплакал", кэша файловой системы практически не было. Данные (параллельная загрузка множества файлов) сразу писались на диск.
Лечится перемещением файлов на другой раздел и обратно (онлайн дефрагментаторов под ext3 нет).
понедельник, 1 марта 2010 г.
четверг, 18 февраля 2010 г.
GRUB: Cannot mount selected partition
Если grub не находит /boot раздел
_not_correct.png)
проще всего найти свой /boot набрав
grub> root
root
(hd0,0): Filesystem type is ext2fs, partition type 0x83
или по-другому
grub> find (hd[tab]
покажет все установленные диски на машине
grub> find (hd0,[tab]
покажет все возможные разделы на диске и их тип
на знакомых загрузчику разделах можно поискать /grub/grub.conf и таким образом обнаружить root (т.е. тот, который /boot)
grub> find (hd0,0)/grub/grub.conf
(hd0,0)
теперь можно определить /boot
grub> root (hd0,0)
и прочитать grub.conf
grub> cat (hd0,0)/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/rootvg/rootvol
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-164.10.1.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-164.10.1.el5 ro root=/dev/rootvg/rootvol rhgb quiet
initrd /initrd-2.6.18-164.10.1.el5.img
title CentOS (2.6.18-164.10.1.el5xen)
root (hd0,0)
kernel /xen.gz-2.6.18-164.10.1.el5
module /vmlinuz-2.6.18-164.10.1.el5xen ro root=/dev/rootvg/rootvol rhgb quiet
module /initrd-2.6.18-164.10.1.el5xen.img
и определить, какое ядро, initrd (если нужно) и корневой каталог использовать для загрузки (собственно, так же как они указаны в конфиг файле)
После успешной загрузки нужно отредактировать и перезаписать grub в mbr:
$ vi /boot/grub/grub.conf
$ grub
grub> root (hd0,0) (указание расположения раздела с /boot)
grub> setup (hd0) (установка GRUB в MBR)
grub> quit (выход из оболочки GRUB)
http://www.gentoo.org/doc/ru/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2
_not_correct.png)
проще всего найти свой /boot набрав
grub> root
root
(hd0,0): Filesystem type is ext2fs, partition type 0x83
или по-другому
grub> find (hd[tab]
покажет все установленные диски на машине
grub> find (hd0,[tab]
покажет все возможные разделы на диске и их тип
на знакомых загрузчику разделах можно поискать /grub/grub.conf и таким образом обнаружить root (т.е. тот, который /boot)
grub> find (hd0,0)/grub/grub.conf
(hd0,0)
теперь можно определить /boot
grub> root (hd0,0)
и прочитать grub.conf
grub> cat (hd0,0)/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/rootvg/rootvol
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-164.10.1.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-164.10.1.el5 ro root=/dev/rootvg/rootvol rhgb quiet
initrd /initrd-2.6.18-164.10.1.el5.img
title CentOS (2.6.18-164.10.1.el5xen)
root (hd0,0)
kernel /xen.gz-2.6.18-164.10.1.el5
module /vmlinuz-2.6.18-164.10.1.el5xen ro root=/dev/rootvg/rootvol rhgb quiet
module /initrd-2.6.18-164.10.1.el5xen.img
и определить, какое ядро, initrd (если нужно) и корневой каталог использовать для загрузки (собственно, так же как они указаны в конфиг файле)
После успешной загрузки нужно отредактировать и перезаписать grub в mbr:
$ vi /boot/grub/grub.conf
$ grub
grub> root (hd0,0) (указание расположения раздела с /boot)
grub> setup (hd0) (установка GRUB в MBR)
grub> quit (выход из оболочки GRUB)
http://www.gentoo.org/doc/ru/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2
пятница, 22 января 2010 г.
Label multiple disks for VxVM
Create format command-file: type, 0. Auto configure, quit.
# vi format.command
t
0
q
Select your disks and white a loop.
# for disk in $(vxdisk -qe -o alldgs list | awk '{if($5=="error"){print $6}}' | sed "s/s2$//") ; do format -d $disk -f format.command ; done
# vi format.command
t
0
q
Select your disks and white a loop.
# for disk in $(vxdisk -qe -o alldgs list | awk '{if($5=="error"){print $6}}' | sed "s/s2$//") ; do format -d $disk -f format.command ; done
среда, 13 января 2010 г.
Enable remote XDMCP on RHEL5 & CentOS5
# vi /etc/gdm/custom.conf
[security]
AllowRemoteRoot=true
[xdmcp]
Enable=true
or gui
# gdmsetup
and
# gdm-restart
open udp port 177 on iptables
[security]
AllowRemoteRoot=true
[xdmcp]
Enable=true
or gui
# gdmsetup
and
# gdm-restart
open udp port 177 on iptables
воскресенье, 1 ноября 2009 г.
libvirt + kvm
# virt-install \
--name cent0 \
--ram 1024 \
--disk path=/mnt/vm/cent0.qcow2,size=12,format=qcow2,cache=writeback \
--network bridge=vmbr0,model=virtio \
--vnc \
--cdrom /home/shlag/Distributives/Linux/CentOS-5.4-x86_64-bin-DVD.iso \
--hvm \
--os-variant=rhel5.4 \
--accelerate \
--vnc \
--noautoconsole
или так, если virt-install вываливается с ошибкой: 'Format cannot be specified for unmanaged storage.'
# qemu-img create -f qcow2 /mnt/vm/cent0.qcow2 12G
# virt-install \
--name cent0 \
--ram 1024 \
--disk path=/mnt/vm/cent0.qcow2,cache=writeback \
--network bridge=vmbr0,model=virtio \
--vnc \
--cdrom /home/shlag/Distributives/Linux/CentOS-5.4-x86_64-bin-DVD.iso \
--hvm \
--os-variant=rhel5.4 \
--accelerate \
--vnc \
--noautoconsole
--name cent0 \
--ram 1024 \
--disk path=/mnt/vm/cent0.qcow2,size=12,format=qcow2,cache=writeback \
--network bridge=vmbr0,model=virtio \
--vnc \
--cdrom /home/shlag/Distributives/Linux/CentOS-5.4-x86_64-bin-DVD.iso \
--hvm \
--os-variant=rhel5.4 \
--accelerate \
--vnc \
--noautoconsole
или так, если virt-install вываливается с ошибкой: 'Format cannot be specified for unmanaged storage.'
# qemu-img create -f qcow2 /mnt/vm/cent0.qcow2 12G
# virt-install \
--name cent0 \
--ram 1024 \
--disk path=/mnt/vm/cent0.qcow2,cache=writeback \
--network bridge=vmbr0,model=virtio \
--vnc \
--cdrom /home/shlag/Distributives/Linux/CentOS-5.4-x86_64-bin-DVD.iso \
--hvm \
--os-variant=rhel5.4 \
--accelerate \
--vnc \
--noautoconsole
среда, 27 мая 2009 г.
powerpath licence
Посмотреть лицензии:
# emcpreg -list
# powermt check_registration
А тут они хранятся:
# cat /etc/emcp_registratio
# emcpreg -list
# powermt check_registration
А тут они хранятся:
# cat /etc/emcp_registratio
вторник, 12 мая 2009 г.
redx - анализвтор hw-дампов и много еще чего.
Запустить в локальном режиме (не затрагивая текущую систему):
sms-svc> redx -l
загрузить dump:
redx> dumpf load /path/to/dump
посмотреть причину генерации дампа:
redx> wfail
опции:
-s – Suppresses error information and reports only the FAIL lines.
-B – Outputs the components that would be blacklisted to avoid this error in the future.
Запустить в локальном режиме (не затрагивая текущую систему):
sms-svc> redx -l
загрузить dump:
redx> dumpf load /path/to/dump
посмотреть причину генерации дампа:
redx> wfail
опции:
-s – Suppresses error information and reports only the FAIL lines.
-B – Outputs the components that would be blacklisted to avoid this error in the future.
Подписаться на:
Сообщения (Atom)