/l3/users/max-public/nt-scale/debian3.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 :18 :19 :20 :21 :22 :23 :24 :25 |
|
#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 |
#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 |
#file -s /dev/md0
![]() /dev/md0: LVM2 (Linux Logical Volume Manager) , UUID: s6FIs9d29sCsk7bFtVU1UPrIO9nN2ud |
#file -s /dev/md0
/dev/md0: LVM2 (Linux Logical Volume Manager) , UUID: s6FIs9d29sCsk7bFtVU1UPrIO9nN2ud |
#vgcreate VG0 /dev/md0
![]() Volume group "VG0" successfully created |
#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 |
#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 |
#lvcreate -L 1G -n vol1 /dev/VG0
![]() Logical volume "vol1" created |
#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 |
#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 |
#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. |
#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. |
#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 |
#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 |
#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 |
#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 |
#file -s /dev/VG0/vol1
![]() /dev/VG0/vol1: symbolic link to `../dm-0' |
#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. |
#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. |
#ls /mnt
lost+found |
#df -h /mnt
![]() Filesystem Size Used Avail Use% Mounted on /dev/mapper/VG0-vol1 1008M 34M 924M 4% /mnt |
#df -h /mnt
Filesystem Size Used Avail Use% Mounted on /dev/mapper/VG0-vol1 1008M 34M 924M 4% /mnt |
#lvextend -L 1G /dev/VG0/vol1
![]() New size (256 extents) matches existing size (256 extents) Run `lvextend --help' for more information. |
#lvextend -L 1G /dev/VG0/vol1
![]() New size (256 extents) matches existing size (256 extents) Run `lvextend --help' for more information. |
#lvextend -L +1G /dev/VG0/vol1
![]() Extending logical volume vol1 to 2.00 GiB Logical volume vol1 successfully resized |
#lvextend -L +1G /dev/VG0/vol1
Extending logical volume vol1 to 2.00 GiB Logical volume vol1 successfully resized |
#ls /mnt
![]() lost+found |
#df -h /mnt
![]() Filesystem Size Used Avail Use% Mounted on /dev/mapper/VG0-vol1 1008M 34M 924M 4% /mnt |
#df -h /mnt
Filesystem Size Used Avail Use% Mounted on /dev/mapper/VG0-vol1 1008M 34M 924M 4% /mnt |
#df -h /mnt
![]() Filesystem Size Used Avail Use% Mounted on /dev/mapper/VG0-vol1 1008M 34M 924M 4% /mnt |
#df -h /mnt
Filesystem Size Used Avail Use% Mounted on /dev/mapper/VG0-vol1 1008M 34M 924M 4% /mnt |
#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 |
#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 |
#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. |
#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. |
#echo 'Hello world!' > /mnt/test.txt
![]() |
#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 |
#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 |
#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 |
#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 |
#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 |
#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 |
#sfdisk -l /dev/sdba
![]() /dev/sdba: No such file or directory sfdisk: cannot open /dev/sdba for reading |
#sfdisk -l /dev/sdba
![]() /dev/sdba: No such file or directory sfdisk: cannot open /dev/sdba for reading |
#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 |
#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 |
#vgex
![]() vgexport vgextend |
#vgex
![]() vgexport vgextend |
#vgex
![]() vgexport vgextend |
#vgextend /dev/VG0 /dev/sda6
![]() Volume group "VG0" successfully extended |
#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 |
#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 |
#lvcreate -L5G -n ddd /dev/VG0
![]() Logical volume "ddd" created |
#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 |
#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 |
#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 |
#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 |
#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> |
#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> |
#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 |
#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 |
#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 |
#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 |
#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 |
#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 |
#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 |
#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 |
#lvremove /dev/VG0/ddd
![]() Do you really want to remove active logical volume ddd? [y/n]: y Logical volume "ddd" successfully removed |
#lvremove /dev/VG0/ddd
Do you really want to remove active logical volume ddd? [y/n]: y Logical volume "ddd" successfully removed |
#vgreduce /dev/VG0 /dev/sda7
![]() Physical Volume "/dev/sda7" not found in Volume Group "VG0" |
#vgreduce /dev/VG0 /dev/sda7
![]() Physical Volume "/dev/sda7" not found in Volume Group "VG0" |
#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 |
#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 |
#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 |
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 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ 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 |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008