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

Содержание

Журнал

Вторник (02/21/12)

/dev/pts/5
13:36:55
#dpkg -L lvm2 | grep bin | sort
/sbin
/sbin/fsadm
/sbin/lvchange
/sbin/lvconvert
/sbin/lvcreate
/sbin/lvdisplay
/sbin/lvextend
/sbin/lvm
/sbin/lvmchange
/sbin/lvmconf
...
/sbin/vgimport
/sbin/vgimportclone
/sbin/vgmerge
/sbin/vgmknodes
/sbin/vgreduce
/sbin/vgremove
/sbin/vgrename
/sbin/vgs
/sbin/vgscan
/sbin/vgsplit
/dev/pts/6
13:36:55
#dpkg -L lvm2 | grep bin | sort
/sbin
/sbin/fsadm
/sbin/lvchange
/sbin/lvconvert
/sbin/lvcreate
/sbin/lvdisplay
/sbin/lvextend
/sbin/lvm
/sbin/lvmchange
/sbin/lvmconf
...
/sbin/vgimport
/sbin/vgimportclone
/sbin/vgmerge
/sbin/vgmknodes
/sbin/vgreduce
/sbin/vgremove
/sbin/vgrename
/sbin/vgs
/sbin/vgscan
/sbin/vgsplit
/dev/pts/5
13:37:01
#pvcreate /dev/md0
  Physical volume "/dev/md0" successfully created
/dev/pts/6
13:37:01
#pvcreate /dev/md0
  Physical volume "/dev/md0" successfully created
/dev/pts/5
13:40:05
#file -s /dev/md0
/dev/md0: LVM2 (Linux Logical Volume Manager) , UUID: s6FIs9d29sCsk7bFtVU1UPrIO9nN2ud
/dev/pts/6
13:40:05
#file -s /dev/md0
/dev/md0: LVM2 (Linux Logical Volume Manager) , UUID: s6FIs9d29sCsk7bFtVU1UPrIO9nN2ud
13:40:17
#vgcreate VG0 /dev/md0
  Volume group "VG0" successfully created
/dev/pts/5
13:40:17
#vgcreate VG0 /dev/md0
  Volume group "VG0" successfully created
13:42:18
#vgdisplay
  --- Volume group ---
  VG Name               VG0
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  1
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                0
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               4.66 GiB
  PE Size               4.00 MiB
  Total PE              1192
  Alloc PE / Size       0 / 0
  Free  PE / Size       1192 / 4.66 GiB
  VG UUID               8gj0hL-4Z0D-N5vx-fSRj-b7f0-kqCW-ynaax4
/dev/pts/6
13:42:18
#vgdisplay
  --- Volume group ---
  VG Name               VG0
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  1
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                0
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               4.66 GiB
  PE Size               4.00 MiB
  Total PE              1192
  Alloc PE / Size       0 / 0
  Free  PE / Size       1192 / 4.66 GiB
  VG UUID               8gj0hL-4Z0D-N5vx-fSRj-b7f0-kqCW-ynaax4
13:46:28
#lvcreate -L 1G -n vol1 /dev/VG0
  Logical volume "vol1" created
/dev/pts/5
13:46:28
#lvcreate -L 1G -n vol1 /dev/VG0
  Logical volume "vol1" created
13:48:45
#lvdisplay
  --- Logical volume ---
  LV Name                /dev/VG0/vol1
  VG Name                VG0
  LV UUID                pS5ghr-UfcZ-CBJz-u1xI-eP7V-vlf4-tpr2ex
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                1.00 GiB
  Current LE             256
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0
/dev/pts/6
13:48:45
#lvdisplay
  --- Logical volume ---
  LV Name                /dev/VG0/vol1
  VG Name                VG0
  LV UUID                pS5ghr-UfcZ-CBJz-u1xI-eP7V-vlf4-tpr2ex
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                1.00 GiB
  Current LE             256
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0
13:49:37
#mkfs -t ext3 /dev/VG0/vol1
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
65536 inodes, 262144 blocks
13107 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=268435456
8 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
/dev/pts/5
13:49:37
#mkfs -t ext3 /dev/VG0/vol1
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
65536 inodes, 262144 blocks
13107 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=268435456
8 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
13:50:13
#fdisk /dev/VG0/vol1
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xc56e2ea0.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').
Command (m for help): ^C
/dev/pts/6
13:50:13
#fdisk /dev/VG0/vol1
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xc56e2ea0.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').
Command (m for help): ^C
13:50:30
#fdisk -l /dev/VG0/vol1
Disk /dev/VG0/vol1: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/VG0/vol1 doesn't contain a valid partition table
/dev/pts/5
13:50:30
#fdisk -l /dev/VG0/vol1
Disk /dev/VG0/vol1: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/VG0/vol1 doesn't contain a valid partition table
13:50:33
#file -s /dev/VG0/vol1
/dev/VG0/vol1: symbolic link to `../dm-0'
/dev/pts/6
13:50:33
#file -s /dev/VG0/vol1
/dev/VG0/vol1: symbolic link to `../dm-0'
13:50:59
#mkfs -t ext3 /dev/VG0/vol1
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
65536 inodes, 262144 blocks
13107 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=268435456
8 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 39 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
/dev/pts/5
13:50:59
#mkfs -t ext3 /dev/VG0/vol1
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
65536 inodes, 262144 blocks
13107 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=268435456
8 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 39 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
/dev/pts/6
13:51:13
#mount /dev/VG0/vol1 /mnt

13:51:34
#ls /mnt
lost+found
/dev/pts/5
13:51:38
#df -h /mnt
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VG0-vol1 1008M   34M  924M   4% /mnt
/dev/pts/6
13:51:38
#df -h /mnt
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VG0-vol1 1008M   34M  924M   4% /mnt
13:52:08
#lvextend -L 1G /dev/VG0/vol1
  New size (256 extents) matches existing size (256 extents)
  Run `lvextend --help' for more information.
/dev/pts/5
13:52:08
#lvextend -L 1G /dev/VG0/vol1
  New size (256 extents) matches existing size (256 extents)
  Run `lvextend --help' for more information.
/dev/pts/6
13:53:20
#lvextend -L +1G /dev/VG0/vol1
  Extending logical volume vol1 to 2.00 GiB
  Logical volume vol1 successfully resized
/dev/pts/5
13:53:20
#lvextend -L +1G /dev/VG0/vol1
  Extending logical volume vol1 to 2.00 GiB
  Logical volume vol1 successfully resized
13:53:30
#ls /mnt
lost+found
/dev/pts/6
13:53:30
#ls /mnt
lost+found
13:53:39
#df -h /mnt
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VG0-vol1 1008M   34M  924M   4% /mnt
/dev/pts/5
13:53:39
#df -h /mnt
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VG0-vol1 1008M   34M  924M   4% /mnt
/dev/pts/6
13:53:55
#partprobe

/dev/pts/5
13:53:55
#partprobe

13:54:20
#df -h /mnt
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VG0-vol1 1008M   34M  924M   4% /mnt
/dev/pts/6
13:54:20
#df -h /mnt
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VG0-vol1 1008M   34M  924M   4% /mnt
13:54:22
#fdisk -l /dev/mapper/VG0-vol1
Disk /dev/mapper/VG0-vol1: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/VG0-vol1 doesn't contain a valid partition table
/dev/pts/5
13:54:22
#fdisk -l /dev/mapper/VG0-vol1
Disk /dev/mapper/VG0-vol1: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/VG0-vol1 doesn't contain a valid partition table
/dev/pts/6
13:55:02
#resize2fs /dev/VG0/vol1
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/VG0/vol1 is mounted on /mnt; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 1
Performing an on-line resize of /dev/VG0/vol1 to 524288 (4k) blocks.
The filesystem on /dev/VG0/vol1 is now 524288 blocks long.
/dev/pts/5
13:55:02
#resize2fs /dev/VG0/vol1
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/VG0/vol1 is mounted on /mnt; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 1
Performing an on-line resize of /dev/VG0/vol1 to 524288 (4k) blocks.
The filesystem on /dev/VG0/vol1 is now 524288 blocks long.
13:55:35
#echo 'Hello world!' > /mnt/test.txt

/dev/pts/6
13:55:35
#echo 'Hello world!' > /mnt/test.txt

13:57:02
#sfdisk
sfdisk (util-linux-ng 2.17.2)
Usage: sfdisk [options] device ...
device: something like /dev/hda or /dev/sda
useful options:
    -s [or --show-size]: list size of a partition
    -c [or --id]:        print or change partition Id
    -l [or --list]:      list partitions of each device
    -d [or --dump]:      idem, but in a format suitable for later input
    -i [or --increment]: number cylinders etc. from 1 instead of from 0
    -uS, -uB, -uC, -uM:  accept/report in units of sectors/blocks/cylinders/MB
...
    -x [or --show-extended]: also list extended partitions on output
                             or expect descriptors for them on input
    -L  [or --Linux]:      do not complain about things irrelevant for Linux
    -q  [or --quiet]:      suppress warning messages
    You can override the detected geometry using:
    -C# [or --cylinders #]:set the number of cylinders to use
    -H# [or --heads #]:    set the number of heads to use
    -S# [or --sectors #]:  set the number of sectors to use
You can disable all consistency checking with:
    -f  [or --force]:      do what I say, even if it is stupid
/dev/pts/5
13:57:02
#sfdisk
sfdisk (util-linux-ng 2.17.2)
Usage: sfdisk [options] device ...
device: something like /dev/hda or /dev/sda
useful options:
    -s [or --show-size]: list size of a partition
    -c [or --id]:        print or change partition Id
    -l [or --list]:      list partitions of each device
    -d [or --dump]:      idem, but in a format suitable for later input
    -i [or --increment]: number cylinders etc. from 1 instead of from 0
    -uS, -uB, -uC, -uM:  accept/report in units of sectors/blocks/cylinders/MB
...
    -x [or --show-extended]: also list extended partitions on output
                             or expect descriptors for them on input
    -L  [or --Linux]:      do not complain about things irrelevant for Linux
    -q  [or --quiet]:      suppress warning messages
    You can override the detected geometry using:
    -C# [or --cylinders #]:set the number of cylinders to use
    -H# [or --heads #]:    set the number of heads to use
    -S# [or --sectors #]:  set the number of sectors to use
You can disable all consistency checking with:
    -f  [or --force]:      do what I say, even if it is stupid
/dev/pts/6
13:59:13
#cfdisk
/dev/pts/5
13:59:13
#cfdisk
/dev/pts/6
14:00:51
#pro
procmail  prove
/dev/pts/5
14:00:51
#pro
procmail  prove
/dev/pts/6
14:00:51
#partprobe

/dev/pts/5
14:00:51
#partprobe

/dev/pts/6
14:01:12
#sfdisk
sfdisk (util-linux-ng 2.17.2)
Usage: sfdisk [options] device ...
device: something like /dev/hda or /dev/sda
useful options:
    -s [or --show-size]: list size of a partition
    -c [or --id]:        print or change partition Id
    -l [or --list]:      list partitions of each device
    -d [or --dump]:      idem, but in a format suitable for later input
    -i [or --increment]: number cylinders etc. from 1 instead of from 0
    -uS, -uB, -uC, -uM:  accept/report in units of sectors/blocks/cylinders/MB
...
    -x [or --show-extended]: also list extended partitions on output
                             or expect descriptors for them on input
    -L  [or --Linux]:      do not complain about things irrelevant for Linux
    -q  [or --quiet]:      suppress warning messages
    You can override the detected geometry using:
    -C# [or --cylinders #]:set the number of cylinders to use
    -H# [or --heads #]:    set the number of heads to use
    -S# [or --sectors #]:  set the number of sectors to use
You can disable all consistency checking with:
    -f  [or --force]:      do what I say, even if it is stupid
/dev/pts/5
14:01:12
#sfdisk
sfdisk (util-linux-ng 2.17.2)
Usage: sfdisk [options] device ...
device: something like /dev/hda or /dev/sda
useful options:
    -s [or --show-size]: list size of a partition
    -c [or --id]:        print or change partition Id
    -l [or --list]:      list partitions of each device
    -d [or --dump]:      idem, but in a format suitable for later input
    -i [or --increment]: number cylinders etc. from 1 instead of from 0
    -uS, -uB, -uC, -uM:  accept/report in units of sectors/blocks/cylinders/MB
...
    -x [or --show-extended]: also list extended partitions on output
                             or expect descriptors for them on input
    -L  [or --Linux]:      do not complain about things irrelevant for Linux
    -q  [or --quiet]:      suppress warning messages
    You can override the detected geometry using:
    -C# [or --cylinders #]:set the number of cylinders to use
    -H# [or --heads #]:    set the number of heads to use
    -S# [or --sectors #]:  set the number of sectors to use
You can disable all consistency checking with:
    -f  [or --force]:      do what I say, even if it is stupid
/dev/pts/6
14:01:18
#sfdisk -l
Disk /dev/sda: 60801 cylinders, 255 heads, 63 sectors/track
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1          0+   6078-   6079-  48827392   83  Linux
/dev/sda2       6078+   6686-    608-   4882432   82  Linux swap / Solaris
/dev/sda3       6686+   7902-   1216    9767520    5  Extended
/dev/sda4          0       -       0          0    0  Empty
/dev/sda5       6686+   7294-    608-   4883728+  83  Linux
...
/dev/sdb4          0       -       0          0    0  Empty
/dev/sdb5       6686+   7294-    608-   4883728+  83  Linux
Disk /dev/md0: 1220673 cylinders, 2 heads, 4 sectors/track
sfdisk: ERROR: sector 0 does not have an msdos signature
 /dev/md0: unrecognized partition table type
No partitions found
Disk /dev/dm-0: 261 cylinders, 255 heads, 63 sectors/track
sfdisk: ERROR: sector 0 does not have an msdos signature
 /dev/dm-0: unrecognized partition table type
No partitions found
/dev/pts/5
14:01:18
#sfdisk -l
Disk /dev/sda: 60801 cylinders, 255 heads, 63 sectors/track
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1          0+   6078-   6079-  48827392   83  Linux
/dev/sda2       6078+   6686-    608-   4882432   82  Linux swap / Solaris
/dev/sda3       6686+   7902-   1216    9767520    5  Extended
/dev/sda4          0       -       0          0    0  Empty
/dev/sda5       6686+   7294-    608-   4883728+  83  Linux
...
/dev/sdb4          0       -       0          0    0  Empty
/dev/sdb5       6686+   7294-    608-   4883728+  83  Linux
Disk /dev/md0: 1220673 cylinders, 2 heads, 4 sectors/track
sfdisk: ERROR: sector 0 does not have an msdos signature
 /dev/md0: unrecognized partition table type
No partitions found
Disk /dev/dm-0: 261 cylinders, 255 heads, 63 sectors/track
sfdisk: ERROR: sector 0 does not have an msdos signature
 /dev/dm-0: unrecognized partition table type
No partitions found
/dev/pts/6
14:01:21
#sfdisk -l /dev/sdba
/dev/sdba: No such file or directory
sfdisk: cannot open /dev/sdba for reading
/dev/pts/5
14:01:21
#sfdisk -l /dev/sdba
/dev/sdba: No such file or directory
sfdisk: cannot open /dev/sdba for reading
/dev/pts/6
14:01:55
#fdisk -l /dev/sdba

/dev/pts/5
14:01:55
#fdisk -l /dev/sdba

14:01:59
#fdisk -l /dev/sda
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000b4942
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        6079    48827392   83  Linux
/dev/sda2            6079        6687     4882432   82  Linux swap / Solaris
/dev/sda3            6687        7903     9767520    5  Extended
/dev/sda5            6687        7295     4883728+  83  Linux
/dev/sda6            7295        7903     4883728+  83  Linux
/dev/pts/6
14:01:59
#fdisk -l /dev/sda
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000b4942
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        6079    48827392   83  Linux
/dev/sda2            6079        6687     4882432   82  Linux swap / Solaris
/dev/sda3            6687        7903     9767520    5  Extended
/dev/sda5            6687        7295     4883728+  83  Linux
/dev/sda6            7295        7903     4883728+  83  Linux
/dev/pts/5
14:02:02
#pvcreate /dev/sda6
  Physical volume "/dev/sda6" successfully created
/dev/pts/6
14:02:02
#pvcreate /dev/sda6
  Physical volume "/dev/sda6" successfully created
14:04:21
#vgex
vgexport  vgextend
14:04:21
#vgex
vgexport  vgextend
/dev/pts/5
14:04:21
#vgex
vgexport  vgextend
14:04:21
#vgex
vgexport  vgextend
14:04:21
#vgextend /dev/VG0 /dev/sda6
  Volume group "VG0" successfully extended
/dev/pts/6
14:04:21
#vgextend /dev/VG0 /dev/sda6
  Volume group "VG0" successfully extended
14:05:31
#vgdisplay
  --- Volume group ---
  VG Name               VG0
  System ID
  Format                lvm2
  Metadata Areas        2
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size               9.31 GiB
  PE Size               4.00 MiB
  Total PE              2384
  Alloc PE / Size       512 / 2.00 GiB
  Free  PE / Size       1872 / 7.31 GiB
  VG UUID               8gj0hL-4Z0D-N5vx-fSRj-b7f0-kqCW-ynaax4
/dev/pts/5
14:05:31
#vgdisplay
  --- Volume group ---
  VG Name               VG0
  System ID
  Format                lvm2
  Metadata Areas        2
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size               9.31 GiB
  PE Size               4.00 MiB
  Total PE              2384
  Alloc PE / Size       512 / 2.00 GiB
  Free  PE / Size       1872 / 7.31 GiB
  VG UUID               8gj0hL-4Z0D-N5vx-fSRj-b7f0-kqCW-ynaax4
14:05:37
#lvcreate -L5G -n ddd /dev/VG0
  Logical volume "ddd" created
/dev/pts/6
14:05:37
#lvcreate -L5G -n ddd /dev/VG0
  Logical volume "ddd" created
/dev/pts/5
14:07:00
#lvdisplay
  --- Logical volume ---
  LV Name                /dev/VG0/vol1
  VG Name                VG0
  LV UUID                pS5ghr-UfcZ-CBJz-u1xI-eP7V-vlf4-tpr2ex
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                2.00 GiB
  Current LE             512
  Segments               1
...
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                5.00 GiB
  Current LE             1280
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1
/dev/pts/6
14:07:00
#lvdisplay
  --- Logical volume ---
  LV Name                /dev/VG0/vol1
  VG Name                VG0
  LV UUID                pS5ghr-UfcZ-CBJz-u1xI-eP7V-vlf4-tpr2ex
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                2.00 GiB
  Current LE             512
  Segments               1
...
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                5.00 GiB
  Current LE             1280
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1
/dev/pts/5
14:07:53
#lvdisplay
  --- Logical volume ---
  LV Name                /dev/VG0/vol1
  VG Name                VG0
  LV UUID                pS5ghr-UfcZ-CBJz-u1xI-eP7V-vlf4-tpr2ex
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                2.00 GiB
  Current LE             512
  Segments               1
...
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                5.00 GiB
  Current LE             1280
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1
/dev/pts/6
14:07:53
#lvdisplay
  --- Logical volume ---
  LV Name                /dev/VG0/vol1
  VG Name                VG0
  LV UUID                pS5ghr-UfcZ-CBJz-u1xI-eP7V-vlf4-tpr2ex
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                2.00 GiB
  Current LE             512
  Segments               1
...
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                5.00 GiB
  Current LE             1280
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1
14:08:32
#cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid1 sda5[0] sdb5[1]
      4882692 blocks super 1.2 [2/2] [UU]
unused devices: <none>
/dev/pts/5
14:08:32
#cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid1 sda5[0] sdb5[1]
      4882692 blocks super 1.2 [2/2] [UU]
unused devices: <none>
14:11:55
#fdisk -l /dev/md0
Disk /dev/md0: 4999 MB, 4999876608 bytes
2 heads, 4 sectors/track, 1220673 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/md0 doesn't contain a valid partition table
/dev/pts/6
14:11:55
#fdisk -l /dev/md0
Disk /dev/md0: 4999 MB, 4999876608 bytes
2 heads, 4 sectors/track, 1220673 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/md0 doesn't contain a valid partition table
14:12:07
#pvdisplay
  --- Physical volume ---
  PV Name               /dev/md0
  VG Name               VG0
  PV Size               4.66 GiB / not usable 260.00 KiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              1192
  Free PE               592
  Allocated PE          600
  PV UUID               s6FIs9-d29s-Csk7-bFtV-U1UP-rIO9-nN2ud9
  --- Physical volume ---
  PV Name               /dev/sda6
  VG Name               VG0
  PV Size               4.66 GiB / not usable 1.27 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              1192
  Free PE               0
  Allocated PE          1192
  PV UUID               he43Jp-5QUa-uS2V-2clZ-Lhuy-MzdV-0PcTAy
/dev/pts/5
14:12:07
#pvdisplay
  --- Physical volume ---
  PV Name               /dev/md0
  VG Name               VG0
  PV Size               4.66 GiB / not usable 260.00 KiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              1192
  Free PE               592
  Allocated PE          600
  PV UUID               s6FIs9-d29s-Csk7-bFtV-U1UP-rIO9-nN2ud9
  --- Physical volume ---
  PV Name               /dev/sda6
  VG Name               VG0
  PV Size               4.66 GiB / not usable 1.27 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              1192
  Free PE               0
  Allocated PE          1192
  PV UUID               he43Jp-5QUa-uS2V-2clZ-Lhuy-MzdV-0PcTAy
14:12:19
#pvmove /dev/sda6
  Insufficient free space: 1192 extents needed, but only 592 available
  Unable to allocate mirror extents for pvmove0.
  Failed to convert pvmove LV to mirrored
/dev/pts/6
14:12:19
#pvmove /dev/sda6
  Insufficient free space: 1192 extents needed, but only 592 available
  Unable to allocate mirror extents for pvmove0.
  Failed to convert pvmove LV to mirrored
/dev/pts/5
14:17:58
#lvdisplay
  --- Logical volume ---
  LV Name                /dev/VG0/vol1
  VG Name                VG0
  LV UUID                pS5ghr-UfcZ-CBJz-u1xI-eP7V-vlf4-tpr2ex
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                2.00 GiB
  Current LE             512
  Segments               1
...
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                5.00 GiB
  Current LE             1280
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1
/dev/pts/6
14:17:58
#lvdisplay
  --- Logical volume ---
  LV Name                /dev/VG0/vol1
  VG Name                VG0
  LV UUID                pS5ghr-UfcZ-CBJz-u1xI-eP7V-vlf4-tpr2ex
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                2.00 GiB
  Current LE             512
  Segments               1
...
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                5.00 GiB
  Current LE             1280
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1
14:18:57
#lvremove /dev/VG0/ddd
Do you really want to remove active logical volume ddd? [y/n]: y
  Logical volume "ddd" successfully removed
/dev/pts/5
14:18:57
#lvremove /dev/VG0/ddd
Do you really want to remove active logical volume ddd? [y/n]: y
  Logical volume "ddd" successfully removed
/dev/pts/6
14:19:11
#pvmove /dev/sda6
  No data to move for VG0
/dev/pts/5
14:19:11
#pvmove /dev/sda6
  No data to move for VG0
14:20:00
#vgreduce /dev/VG0 /dev/sda7
  Physical Volume "/dev/sda7" not found in Volume Group "VG0"
/dev/pts/6
14:20:00
#vgreduce /dev/VG0 /dev/sda7
  Physical Volume "/dev/sda7" not found in Volume Group "VG0"
/dev/pts/5
14:20:11
#vgreduce /dev/VG0 /dev/sda6
  Removed "/dev/sda6" from volume group "VG0"
/dev/pts/6
14:20:11
#vgreduce /dev/VG0 /dev/sda6
  Removed "/dev/sda6" from volume group "VG0"
/dev/pts/5
14:20:45
#vgdisplay
  --- Volume group ---
  VG Name               VG0
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  7
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               4.66 GiB
  PE Size               4.00 MiB
  Total PE              1192
  Alloc PE / Size       512 / 2.00 GiB
  Free  PE / Size       680 / 2.66 GiB
  VG UUID               8gj0hL-4Z0D-N5vx-fSRj-b7f0-kqCW-ynaax4
/dev/pts/6
14:20:45
#vgdisplay
  --- Volume group ---
  VG Name               VG0
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  7
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               4.66 GiB
  PE Size               4.00 MiB
  Total PE              1192
  Alloc PE / Size       512 / 2.00 GiB
  Free  PE / Size       680 / 2.66 GiB
  VG UUID               8gj0hL-4Z0D-N5vx-fSRj-b7f0-kqCW-ynaax4
14:21:36
#lvdisplay
  --- Logical volume ---
  LV Name                /dev/VG0/vol1
  VG Name                VG0
  LV UUID                pS5ghr-UfcZ-CBJz-u1xI-eP7V-vlf4-tpr2ex
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                2.00 GiB
  Current LE             512
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

Файлы

  • /proc/mdstat
  • /proc/mdstat
    >
    Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
    md0 : active raid1 sda5[0] sdb5[1]
          4882692 blocks super 1.2 [2/2] [UU]
    unused devices: <none>
    

    Статистика

    Время первой команды журнала13:36:55 2012- 2-21
    Время последней команды журнала14:21:36 2012- 2-21
    Количество командных строк в журнале101
    Процент команд с ненулевым кодом завершения, %11.88
    Процент синтаксически неверно набранных команд, % 0.00
    Суммарное время работы с терминалом *, час 0.74
    Количество командных строк в единицу времени, команда/мин 2.26
    Частота использования команд
    fdisk12|===========| 11.21%
    lvdisplay9|========| 8.41%
    sfdisk8|=======| 7.48%
    df6|=====| 5.61%
    vgdisplay6|=====| 5.61%
    vgreduce4|===| 3.74%
    pvcreate4|===| 3.74%
    mkfs4|===| 3.74%
    partprobe4|===| 3.74%
    lvextend4|===| 3.74%
    pvmove4|===| 3.74%
    lvcreate4|===| 3.74%
    file4|===| 3.74%
    vgex4|===| 3.74%
    ls3|==| 2.80%
    resize2fs2|=| 1.87%
    dpkg2|=| 1.87%
    cfdisk2|=| 1.87%
    vgcreate2|=| 1.87%
    sort2|=| 1.87%
    pvdisplay2|=| 1.87%
    test.txt2|=| 1.87%
    vgextend2|=| 1.87%
    echo2|=| 1.87%
    cat2|=| 1.87%
    grep2|=| 1.87%
    lvremove2|=| 1.87%
    pro2|=| 1.87%
    mount1|| 0.93%
    ____
    *) Интервалы неактивности длительностью 30 минут и более не учитываются

    Справка

    Для того чтобы использовать LiLaLo, не нужно знать ничего особенного: всё происходит само собой. Однако, чтобы ведение и последующее использование журналов было как можно более эффективным, желательно иметь в виду следующее:
    1. В журнал автоматически попадают все команды, данные в любом терминале системы.

    2. Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.

    3. Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
      $ l s-l
      bash: l: command not found
      

    4. Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
      $ test 5 -lt 4
      Обратите внимание на то, что код завершения команды может быть отличен от нуля не только в тех случаях, когда команда была выполнена с ошибкой. Многие команды используют код завершения, например, для того чтобы показать результаты проверки

    5. Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
      $ find / -name abc
      find: /home/devi-orig/.gnome2: Keine Berechtigung
      find: /home/devi-orig/.gnome2_private: Keine Berechtigung
      find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung
      find: /home/devi-orig/.metacity: Keine Berechtigung
      find: /home/devi-orig/.inkscape: Keine Berechtigung
      ^C
      

    6. Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
      # id
      uid=0(root) gid=0(root) Gruppen=0(root)
      

    7. Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
      $ vi ~/.bashrc
      2a3,5
      >    if [ -f /usr/local/etc/bash_completion ]; then
      >         . /usr/local/etc/bash_completion
      >        fi
      

    8. Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
      $ patch ~/.bashrc
      В данном случае изменения применяются к файлу ~/.bashrc

    9. Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.

      Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.

    10. Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.

    11. Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора

    12. Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.

    13. Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.

    14. Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:

      $ whoami
      
      user
      
      $ #^ Интересно, кто я?
      
      в журнале это будет выглядеть так:
      $ whoami
      
      user
      
      Интересно, кто я?

    15. Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:

      $ whoami
      
      user
      
      $ cat > /dev/null #^ Интересно, кто я?
      
      Программа whoami выводит имя пользователя, под которым 
      мы зарегистрировались в системе.
      -
      Она не может ответить на вопрос о нашем назначении 
      в этом мире.
      
      В журнале это будет выглядеть так:
      $ whoami
      user
      
      Интересно, кто я?
      Программа whoami выводит имя пользователя, под которым
      мы зарегистрировались в системе.

      Она не может ответить на вопрос о нашем назначении
      в этом мире.
      Для разделения нескольких абзацев между собой используйте символ "-", один в строке.

    16. Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=

    17. Содержимое файла может быть показано в журнале. Для этого его нужно вывести с помощью программы cat. Если вывод команды отметить симоволами #!, содержимое файла будет показано в журнале в специально отведённой для этого секции.
    18. Для того чтобы вставить скриншот интересующего вас окна в журнал, нужно воспользоваться командой l3shot. После того как команда вызвана, нужно с помощью мыши выбрать окно, которое должно быть в журнале.
    19. Команды в журнале расположены в хронологическом порядке. Если две команды давались одна за другой, но на разных терминалах, в журнале они будут рядом, даже если они не имеют друг к другу никакого отношения.
      1
          2
      3   
          4
      
      Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.

    О программе

    LiLaLo (L3) расшифровывается как Live Lab Log.
    Программа разработана для повышения эффективности обучения Unix/Linux-системам.
    (c) Игорь Чубин, 2004-2008

    $Id$