Журнал лабораторных работ

Содержание

Журнал

Четверг (02/24/11)

/dev/pts/5
13:50:38
#drbdadm outdate r12

/dev/pts/3
13:50:39
#drbdadm connect all

13:50:40
#vi /etc/drbd.d/global_common.conf
13:50:40
#vi /etc/drbd.d/global_common.conf
13:50:40
#vi /etc/drbd.d/global_common.conf
13:50:40
#drbdыуегз зкшьфен к23
bash: drbdыуегз: command not found
/dev/pts/5
13:51:11
#drbdadm connect r12
1: Failure: (125) Device has a net-config (use disconnect first)
Command 'drbdsetup 1 net 192.168.15.2:7802 192.168.15.1:7802 C --set-defaults --create-device --allow-two-primaries' terminated with exit code 10
13:51:14
#drbdadm disconnect r12

13:51:22
#drbdadm connect r12

13:51:23
#cat /proc/drbd
version: 8.3.7 (api:88/proto:86-91)
srcversion: EE47D8BF18AC166BE219757
 1: cs:StandAlone ro:Secondary/Unknown ds:Outdated/DUnknown   r----
    ns:0 nr:0 dw:11178008 dr:728 al:0 bm:640 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0
 2: cs:StandAlone ro:Primary/Unknown ds:UpToDate/DUnknown   r----
    ns:0 nr:0 dw:401108 dr:10487053 al:148 bm:640 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0
13:52:35
#drbdadm connect r12

13:52:47
#/etc/init.d/drbd restart
Restarting all DRBD resources:.
13:53:10
#drbdadm invalidate r12

13:54:26
#drbdadm disconnect r12

13:55:01
#drbdadm connect r12

/dev/pts/3
14:03:37
#drbdыуегз зsetup primaru r23
USAGE: drbdsetup device command arguments options
Device is usually /dev/drbdX or /dev/drbd/X.
General options: --create-device, --set-defaults
Commands are:
 primary [opts...]                       secondary
 disk [args...] [opts...]                detach
 net [args...] [opts...]                 disconnect
 resize [opts...]                        syncer [opts...]
 new-current-uuid [opts...]              invalidate
 invalidate-remote                       pause-sync
 resume-sync                             suspend-io
 resume-io                               outdate
 verify [opts...]                        down
 role                                    status
 sh-status                               cstate
 dstate                                  show-gi
 get-gi                                  show
 events [opts...]                        wait-connect [opts...]
 wait-sync [opts...]
To get more details about a command issue 'drbdsetup help cmd'.
invalid command
14:03:48
#drbdsetup primary r23
USAGE: drbdsetup device command arguments options
Device is usually /dev/drbdX or /dev/drbd/X.
General options: --create-device, --set-defaults
Commands are:
 primary [opts...]                       secondary
 disk [args...] [opts...]                detach
 net [args...] [opts...]                 disconnect
 resize [opts...]                        syncer [opts...]
 new-current-uuid [opts...]              invalidate
 invalidate-remote                       pause-sync
 resume-sync                             suspend-io
 resume-io                               outdate
 verify [opts...]                        down
 role                                    status
 sh-status                               cstate
 dstate                                  show-gi
 get-gi                                  show
 events [opts...]                        wait-connect [opts...]
 wait-sync [opts...]
To get more details about a command issue 'drbdsetup help cmd'.
invalid command
14:03:56
#drbdsetup primary r23
USAGE: drbdsetup device command arguments options
Device is usually /dev/drbdX or /dev/drbd/X.
General options: --create-device, --set-defaults
Commands are:
 primary [opts...]                       secondary
 disk [args...] [opts...]                detach
 net [args...] [opts...]                 disconnect
 resize [opts...]                        syncer [opts...]
 new-current-uuid [opts...]              invalidate
 invalidate-remote                       pause-sync
 resume-sync                             suspend-io
 resume-io                               outdate
 verify [opts...]                        down
 role                                    status
 sh-status                               cstate
 dstate                                  show-gi
 get-gi                                  show
 events [opts...]                        wait-connect [opts...]
 wait-sync [opts...]
To get more details about a command issue 'drbdsetup help cmd'.
invalid command
14:04:00
#drbdsetup r23 primary
Could not determine device minor number of 'r23'.
Try /dev/drbd<minor-number> or just <minor-number> instead.
14:04:09
#drbdsetup primary r23
USAGE: drbdsetup device command arguments options
Device is usually /dev/drbdX or /dev/drbd/X.
General options: --create-device, --set-defaults
Commands are:
 primary [opts...]                       secondary
 disk [args...] [opts...]                detach
 net [args...] [opts...]                 disconnect
 resize [opts...]                        syncer [opts...]
 new-current-uuid [opts...]              invalidate
 invalidate-remote                       pause-sync
 resume-sync                             suspend-io
 resume-io                               outdate
 verify [opts...]                        down
 role                                    status
 sh-status                               cstate
 dstate                                  show-gi
 get-gi                                  show
 events [opts...]                        wait-connect [opts...]
 wait-sync [opts...]
To get more details about a command issue 'drbdsetup help cmd'.
invalid command
14:04:24
#drbdsetup primary r23
USAGE: drbdsetup device command arguments options
Device is usually /dev/drbdX or /dev/drbd/X.
General options: --create-device, --set-defaults
Commands are:
 primary [opts...]                       secondary
 disk [args...] [opts...]                detach
 net [args...] [opts...]                 disconnect
 resize [opts...]                        syncer [opts...]
 new-current-uuid [opts...]              invalidate
 invalidate-remote                       pause-sync
 resume-sync                             suspend-io
 resume-io                               outdate
 verify [opts...]                        down
 role                                    status
 sh-status                               cstate
 dstate                                  show-gi
 get-gi                                  show
 events [opts...]                        wait-connect [opts...]
 wait-sync [opts...]
To get more details about a command issue 'drbdsetup help cmd'.
invalid command
14:04:40
#drbdsetup primary /dev/drbd2
.bash_history         .gconfd/              .mozilla/
.bash_logout          .gnash/               Music/
.bash_profile         .gnome/               .nautilus/
.bashrc               .gnome2/              Pictures/
.config/              .gnome2_private/      .profile
.dbus/                .gnupg/               Public/
Desktop/              .gstreamer-0.10/      .recently-used.xbel
.dmrc                 .gtk-bookmarks        .ssh/
Documents/            .gvfs/                Templates/
Downloads/            .ICEauthority         .update-notifier/
.evolution/           .l3rc                 Videos/
file1.img             .lilalo/              .Xauthority
.fontconfig/          .local/               .xsession-errors
.gconf/               .metacity/            .xsession-errors.old
14:04:40
#drbdsetup primary /dev/drbd2
USAGE: drbdsetup device command arguments options
Device is usually /dev/drbdX or /dev/drbd/X.
General options: --create-device, --set-defaults
Commands are:
 primary [opts...]                       secondary
 disk [args...] [opts...]                detach
 net [args...] [opts...]                 disconnect
 resize [opts...]                        syncer [opts...]
 new-current-uuid [opts...]              invalidate
 invalidate-remote                       pause-sync
 resume-sync                             suspend-io
 resume-io                               outdate
 verify [opts...]                        down
 role                                    status
 sh-status                               cstate
 dstate                                  show-gi
 get-gi                                  show
 events [opts...]                        wait-connect [opts...]
 wait-sync [opts...]
To get more details about a command issue 'drbdsetup help cmd'.
invalid command
14:05:23
#drbdsetup primary r23
USAGE: drbdsetup device command arguments options
Device is usually /dev/drbdX or /dev/drbd/X.
General options: --create-device, --set-defaults
Commands are:
 primary [opts...]                       secondary
 disk [args...] [opts...]                detach
 net [args...] [opts...]                 disconnect
 resize [opts...]                        syncer [opts...]
 new-current-uuid [opts...]              invalidate
 invalidate-remote                       pause-sync
 resume-sync                             suspend-io
 resume-io                               outdate
 verify [opts...]                        down
 role                                    status
 sh-status                               cstate
 dstate                                  show-gi
 get-gi                                  show
 events [opts...]                        wait-connect [opts...]
 wait-sync [opts...]
To get more details about a command issue 'drbdsetup help cmd'.
invalid command
14:05:30
#cat /proc/drbd
version: 8.3.7 (api:88/proto:86-91)
srcversion: EE47D8BF18AC166BE219757
 1: cs:Connected ro:Secondary/Primary ds:UpToDate/UpToDate C r----
    ns:0 nr:10485760 dw:10485760 dr:0 al:0 bm:640 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0
 2: cs:WFConnection ro:Secondary/Unknown ds:UpToDate/DUnknown C r----
    ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0
14:05:54
#drbdadm
USAGE: drbdadm [OPTION...] [-- DRBDSETUP-OPTION...] COMMAND {all|RESOURCE...}
OPTIONS:
 {--stacked|-S}
 {--dry-run|-d}
 {--verbose|-v}
 {--config-file|-c} val
 {--config-to-test|-t} val
 {--drbdsetup|-s} val
 {--drbdmeta|-m} val
 {--drbd-proxy-ctl|-p} val
...
 adjust                             wait-connect
 wait-con-int                       role
 cstate                             dstate
 dump                               dump-xml
 create-md                          show-gi
 get-gi                             dump-md
 wipe-md                            hidden-commands
Version: 8.3.7 (api:88)
GIT-hash: ea9e28dbff98e331a62bcbcc63a6135808fe2917 build by @murphy, 2010-07-17 12:38:16
missing arguments
14:06:09
#drbdsetup primary
USAGE: drbdsetup device command arguments options
Device is usually /dev/drbdX or /dev/drbd/X.
General options: --create-device, --set-defaults
Commands are:
 primary [opts...]                       secondary
 disk [args...] [opts...]                detach
 net [args...] [opts...]                 disconnect
 resize [opts...]                        syncer [opts...]
 new-current-uuid [opts...]              invalidate
 invalidate-remote                       pause-sync
 resume-sync                             suspend-io
 resume-io                               outdate
 verify [opts...]                        down
 role                                    status
 sh-status                               cstate
 dstate                                  show-gi
 get-gi                                  show
 events [opts...]                        wait-connect [opts...]
 wait-sync [opts...]
To get more details about a command issue 'drbdsetup help cmd'.
 Insufficient arguments
14:06:22
#drbdsetup primary r23
USAGE: drbdsetup device command arguments options
Device is usually /dev/drbdX or /dev/drbd/X.
General options: --create-device, --set-defaults
Commands are:
 primary [opts...]                       secondary
 disk [args...] [opts...]                detach
 net [args...] [opts...]                 disconnect
 resize [opts...]                        syncer [opts...]
 new-current-uuid [opts...]              invalidate
 invalidate-remote                       pause-sync
 resume-sync                             suspend-io
 resume-io                               outdate
 verify [opts...]                        down
 role                                    status
 sh-status                               cstate
 dstate                                  show-gi
 get-gi                                  show
 events [opts...]                        wait-connect [opts...]
 wait-sync [opts...]
To get more details about a command issue 'drbdsetup help cmd'.
invalid command
14:06:29
#drbdsetup /dev/drbd2 primary -o

14:07:14
#drbdadm disconnect r23

14:07:34
#drbdadm connect r23

14:07:39
#drbdadm
USAGE: drbdadm [OPTION...] [-- DRBDSETUP-OPTION...] COMMAND {all|RESOURCE...}
OPTIONS:
 {--stacked|-S}
 {--dry-run|-d}
 {--verbose|-v}
 {--config-file|-c} val
 {--config-to-test|-t} val
 {--drbdsetup|-s} val
 {--drbdmeta|-m} val
 {--drbd-proxy-ctl|-p} val
...
 adjust                             wait-connect
 wait-con-int                       role
 cstate                             dstate
 dump                               dump-xml
 create-md                          show-gi
 get-gi                             dump-md
 wipe-md                            hidden-commands
Version: 8.3.7 (api:88)
GIT-hash: ea9e28dbff98e331a62bcbcc63a6135808fe2917 build by @murphy, 2010-07-17 12:38:16
missing arguments
14:07:46
#drbdsetup r23 invalidate
Could not determine device minor number of 'r23'.
Try /dev/drbd<minor-number> or just <minor-number> instead.
14:08:03
#drbdsetup invalidate r23
USAGE: drbdsetup device command arguments options
Device is usually /dev/drbdX or /dev/drbd/X.
General options: --create-device, --set-defaults
Commands are:
 primary [opts...]                       secondary
 disk [args...] [opts...]                detach
 net [args...] [opts...]                 disconnect
 resize [opts...]                        syncer [opts...]
 new-current-uuid [opts...]              invalidate
 invalidate-remote                       pause-sync
 resume-sync                             suspend-io
 resume-io                               outdate
 verify [opts...]                        down
 role                                    status
 sh-status                               cstate
 dstate                                  show-gi
 get-gi                                  show
 events [opts...]                        wait-connect [opts...]
 wait-sync [opts...]
To get more details about a command issue 'drbdsetup help cmd'.
invalid command
14:08:09
#drbdsetup /dev/drbd2 invalidate
/dev/drbd2: State change failed: (-2) Refusing to be Primary without at least one UpToDate disk
14:10:57
#drbdadm connect all

14:11:11
#man drbsetup
14:12:33
#drbsetup --help
bash: drbsetup: command not found
14:12:38
#man drbdsetup
14:13:02
#drbdadm primary r12

14:19:14
#apt-cache search xen
aide-xen - Advanced Intrusion Detection Environment - static binary for XEN
autopkgtest-xenlvm - Xen/LVM2 based testbed snapshot system
autopkgtest - automatic as-installed testing for Debian packages
claws-mail-themes - Pixmap icon themes for the Claws Mail mailer
convirt - A graphical Xen management tool
libdoxia-maven-plugin-java - A Maven plugin for Doxia
libdoxia-sitetools-java - Extension package of the content generation framework Doxia
libdoxia-java-doc - a powerful content generation framework
libdoxia-java - a powerful content generation framework
dtc-xen-firewall - A small firewall script for your dom0
...
xen-hypervisor-4.0-amd64 - The Xen Hypervisor on AMD64
xen-hypervisor-4.0-i386 - The Xen Hypervisor on i386
xen-utils-4.0 - XEN administrative tools
xenstore-utils - Xenstore utilities for Xen
libxenomai-dev - Headers and static libs for Xenomai
libxenomai1 - Shared libraries for Xenomai
linux-patch-xenomai - Linux kernel patches for Xenomai
xenomai-doc - Xenomai documentation
xenomai-runtime - Xenomai runtime utilities
xenwatch - Virtualization utilities, mostly for Xen
14:22:49
#apt-cache search xen linux
euca2ools - managing cloud instances for Eucalyptus
linux-headers-2.6.32-5-common-xen - Common header files for Linux 2.6.32-5-xen
linux-headers-2.6.32-5-xen-686 - Header files for Linux 2.6.32-5-xen-686
linux-image-2.6.32-5-686-bigmem - Linux 2.6.32 for PCs with 4GB+ RAM
linux-image-2.6.32-5-amd64 - Linux 2.6.32 for 64-bit PCs
linux-image-2.6.32-5-vserver-686-bigmem - Linux 2.6.32 for PCs with 4GB+ RAM, Linux-VServer support
linux-image-2.6.32-5-xen-686-dbg - Debugging infos for Linux 2.6.32-5-xen-686
linux-image-2.6.32-5-xen-686 - Linux 2.6.32 for modern PCs, Xen dom0 support
xen-linux-system-2.6.32-5-xen-686 - Xen system with Linux 2.6.32 on modern PCs (meta-package)
linux-headers-2.6-xen-686 - Header files for Linux 2.6-xen-686 (meta-package)
...
python-libvirt - libvirt Python bindings
libvirt-ocaml-dev - OCaml bindings for libvirt
libvirt-ocaml - OCaml bindings for libvirt
libvirt-ruby1.8 - Ruby bindings for libvirt
libvirt-ruby - Ruby bindings for libvirt
libxenomai-dev - Headers and static libs for Xenomai
libxenomai1 - Shared libraries for Xenomai
linux-patch-xenomai - Linux kernel patches for Xenomai
xenomai-doc - Xenomai documentation
xenomai-runtime - Xenomai runtime utilities
14:22:54
#apt-get install xen-linux-system-2.6-xen-686
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libstdc++6-4.3-dev g++-4.3
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  firmware-linux-free gawk libc6-xen libxenstore3.0
  linux-image-2.6.32-5-xen-686 xen-hypervisor-4.0-i386
  xen-linux-system-2.6.32-5-xen-686 xen-utils-4.0 xen-utils-common
...
Found kernel: /boot/vmlinuz-2.6.32-5-xen-686
Found kernel: /boot/vmlinuz-2.6.32-5-686
Found kernel: /boot/vmlinuz-2.6.26-2-686
Updating /boot/grub/menu.lst ... done
Setting up xen-linux-system-2.6.32-5-xen-686 (2.6.32-30) ...
Setting up xen-linux-system-2.6-xen-686 (2.6.32+29) ...
Setting up xenstore-utils (4.0.1-2) ...
Setting up xen-utils-common (4.0.0-1) ...
Setting up xen-utils-4.0 (4.0.1-2) ...
update-alternatives: using /usr/lib/xen-4.0 to provide /usr/lib/xen-default (xen-default) in auto mode.
14:28:20
#less /boot/grub/menu.lst
14:34:49
#reboot

прошло >2 часов
17:24:28
#date
Thu Feb 24 18:26:24 EET 2011
17:26:13
#pkill -1 l3-agent

17:26:24
#date
Thu Feb 24 18:26:32 EET 2011
17:28:40
#lvdisplay
  --- Logical volume ---
  LV Name                /dev/VG0/xen4vol
  VG Name                VG0
  LV UUID                AFYO17-7jci-lEqr-Bwbt-MHCC-cR5e-HmvOQU
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                60.00 GiB
  Current LE             15360
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:0

Пятница (02/25/11)

/dev/pts/2
08:22:42
#date
Fri Feb 25 09:22:44 EET 2011
/dev/pts/1
08:22:42
#date
Fri Feb 25 09:22:44 EET 2011
/dev/pts/2
08:23:35
#xm stat
WARNING!  Can't find hypervisor information in sysfs!
Error: Subcommand stat not found!
Usage: xm <subcommand> [args]
Control, list, and manipulate Xen guest instances.
Common 'xm' commands:
 console              Attach to <Domain>'s console.
 vncviewer            Attach to <Domain>'s VNC server.
 create               Create a domain based on <ConfigFile>.
 new                  Adds a domain to Xend domain management
 delete               Remove a domain from Xend domain management.
...
 unpause              Unpause a paused domain.
 uptime               Print uptime for all/some domains.
 usb-add              Add the usb device to FV VM.
 usb-del              Delete the usb device to FV VM.
 vcpu-set             Set the number of active VCPUs for allowed for
                      the domain.
<Domain> can either be the Domain Name or Id.
For more help on 'xm' see the xm(1) man page.
For more help on 'xm create' see the xmdomain.cfg(5)  man page.
For a complete list of subcommands run 'xm help'.
/dev/pts/1
08:23:35
#xm stat
WARNING!  Can't find hypervisor information in sysfs!
Error: Subcommand stat not found!
Usage: xm <subcommand> [args]
Control, list, and manipulate Xen guest instances.
Common 'xm' commands:
 console              Attach to <Domain>'s console.
 vncviewer            Attach to <Domain>'s VNC server.
 create               Create a domain based on <ConfigFile>.
 new                  Adds a domain to Xend domain management
 delete               Remove a domain from Xend domain management.
...
 unpause              Unpause a paused domain.
 uptime               Print uptime for all/some domains.
 usb-add              Add the usb device to FV VM.
 usb-del              Delete the usb device to FV VM.
 vcpu-set             Set the number of active VCPUs for allowed for
                      the domain.
<Domain> can either be the Domain Name or Id.
For more help on 'xm' see the xm(1) man page.
For more help on 'xm create' see the xmdomain.cfg(5)  man page.
For a complete list of subcommands run 'xm help'.
08:26:01
#reboot -r now
usage: reboot [-n] [-w] [-d] [-f] [-h] [-i]
        -n: don't sync before halting the system
        -w: only write a wtmp reboot record and exit.
        -d: don't write a wtmp record.
        -f: force halt/reboot, don't call shutdown.
        -h: put harddisks in standby mode.
        -i: shut down all network interfaces.
/dev/pts/2
08:26:01
#reboot -r now
usage: reboot [-n] [-w] [-d] [-f] [-h] [-i]
        -n: don't sync before halting the system
        -w: only write a wtmp reboot record and exit.
        -d: don't write a wtmp record.
        -f: force halt/reboot, don't call shutdown.
        -h: put harddisks in standby mode.
        -i: shut down all network interfaces.
08:26:14
#shutdown -r now

/dev/pts/1
08:26:14
#shutdown -r now

/dev/pts/1
08:27:26
#shutdown -h now

/dev/pts/2
08:27:26
#shutdown -h now

/dev/pts/4
08:31:47
#dpkg-reconfigure locales
Package configuration
 ┌──────────────────────────┤ Configuring locales ├──────────────────────────┐
 │ Locales are a framework to switch between multiple languages and allow    │
 │ users to use their language, country, characters, collation order, etc.   │
 │                                                                           │
 │ Please choose which locales to generate. UTF-8 locales should be chosen   │
 │ by default, particularly for new installations. Other character sets may  │
 │ be useful for backwards compatibility with older systems and software.    │
 │                                                                           │
 │ Locales to be generated:                                                  │
...
 │                                                                           │
 │                                                                           │
 │                  <Ok>k>                        <Cancel>                   │
 │                                                                           │
 └───────────────────────────────────────────────────────────────────────────┘
Generating locales (this might take a while)...
  en_US.UTF-8... done
  ru_RU.UTF-8... done
  uk_UA.UTF-8... done
Generation complete.
/dev/pts/3
08:31:47