/l3/users/eb/2009/linux3/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 :26 :27 :28 :29 :30 :31 :32 :33 :34 :35 :36 :37 :38 |
|
#vgdisplay
--- Volume group --- VG Name TEST_VG_VOL System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 8 VG Access read/write VG Status resizable MAX LV 0 Cur LV 6 Open LV 1 Max PV 0 Cur PV 2 Act PV 2 VG Size 18.64 GB PE Size 4.00 MB Total PE 4772 Alloc PE / Size 2560 / 10.00 GB Free PE / Size 2212 / 8.64 GB VG UUID evk7UV-cG3i-snTY-BYXK-n8w6-tTaC-fj13i4 |
#vgdisplay
--- Volume group --- VG Name TEST_VG_VOL System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 8 VG Access read/write VG Status resizable MAX LV 0 Cur LV 6 Open LV 1 Max PV 0 Cur PV 2 Act PV 2 VG Size 18.64 GB PE Size 4.00 MB Total PE 4772 Alloc PE / Size 2560 / 10.00 GB Free PE / Size 2212 / 8.64 GB VG UUID evk7UV-cG3i-snTY-BYXK-n8w6-tTaC-fj13i4 |
#mount
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) procbususb on /proc/bus/usb type usbfs (rw) udev on /dev type tmpfs (rw,mode=0755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) rootfs on / type rootfs (rw) /dev/mapper/TEST_VG_VOL-vol1 on /mnt type ext3 (rw) |
#mount
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) procbususb on /proc/bus/usb type usbfs (rw) udev on /dev type tmpfs (rw,mode=0755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) rootfs on / type rootfs (rw) /dev/mapper/TEST_VG_VOL-vol1 on /mnt type ext3 (rw) |
#pvdisplay
--- Physical volume --- PV Name /dev/sdb1 VG Name TEST_VG_VOL PV Size 9.32 GB / not usable 2.41 MB Allocatable yes PE Size (KByte) 4096 Total PE 2386 Free PE 850 Allocated PE 1536 PV UUID E8grzY-XQm6-xMlr-79eA-Co1F-cPmp-ZaAH3B ... --- Physical volume --- PV Name /dev/sdb5 VG Name TEST_VG_VOL PV Size 9.32 GB / not usable 2.41 MB Allocatable yes PE Size (KByte) 4096 Total PE 2386 Free PE 2386 Allocated PE 0 PV UUID R3BWIl-ptAH-vJQP-4qdY-jDip-t6d4-qrlKum |
#pvdisplay
--- Physical volume --- PV Name /dev/sdb1 VG Name TEST_VG_VOL PV Size 9.32 GB / not usable 2.41 MB Allocatable yes PE Size (KByte) 4096 Total PE 2386 Free PE 850 Allocated PE 1536 PV UUID E8grzY-XQm6-xMlr-79eA-Co1F-cPmp-ZaAH3B ... --- Physical volume --- PV Name /dev/sdb5 VG Name TEST_VG_VOL PV Size 9.32 GB / not usable 2.41 MB Allocatable yes PE Size (KByte) 4096 Total PE 2386 Free PE 2386 Allocated PE 0 PV UUID R3BWIl-ptAH-vJQP-4qdY-jDip-t6d4-qrlKum |
#vgdisplay
--- Volume group --- VG Name TEST_VG_VOL System ID Format lvm2 Metadata Areas 3 Metadata Sequence No 9 VG Access read/write VG Status resizable MAX LV 0 Cur LV 6 Open LV 1 Max PV 0 Cur PV 3 Act PV 3 VG Size 27.96 GB PE Size 4.00 MB Total PE 7158 Alloc PE / Size 2560 / 10.00 GB Free PE / Size 4598 / 17.96 GB VG UUID evk7UV-cG3i-snTY-BYXK-n8w6-tTaC-fj13i4 |
#vgdisplay
--- Volume group --- VG Name TEST_VG_VOL System ID Format lvm2 Metadata Areas 3 Metadata Sequence No 9 VG Access read/write VG Status resizable MAX LV 0 Cur LV 6 Open LV 1 Max PV 0 Cur PV 3 Act PV 3 VG Size 27.96 GB PE Size 4.00 MB Total PE 7158 Alloc PE / Size 2560 / 10.00 GB Free PE / Size 4598 / 17.96 GB VG UUID evk7UV-cG3i-snTY-BYXK-n8w6-tTaC-fj13i4 |
#pvmove /dev/sdb1
/dev/sdb1: Moved: 6.3% /dev/sdb1: Moved: 12.7% /dev/sdb1: Moved: 19.3% /dev/sdb1: Moved: 25.8% /dev/sdb1: Moved: 32.2% /dev/sdb1: Moved: 38.6% /dev/sdb1: Moved: 45.2% /dev/sdb1: Moved: 51.8% /dev/sdb1: Moved: 58.1% /dev/sdb1: Moved: 64.6% /dev/sdb1: Moved: 66.7% /dev/sdb1: Moved: 73.2% /dev/sdb1: Moved: 79.9% /dev/sdb1: Moved: 83.3% /dev/sdb1: Moved: 89.6% /dev/sdb1: Moved: 96.3% /dev/sdb1: Moved: 100.0% |
#pvmove /dev/sdb1
/dev/sdb1: Moved: 6.3% /dev/sdb1: Moved: 12.7% /dev/sdb1: Moved: 19.3% /dev/sdb1: Moved: 25.8% /dev/sdb1: Moved: 32.2% /dev/sdb1: Moved: 38.6% /dev/sdb1: Moved: 45.2% /dev/sdb1: Moved: 51.8% /dev/sdb1: Moved: 58.1% /dev/sdb1: Moved: 64.6% /dev/sdb1: Moved: 66.7% /dev/sdb1: Moved: 73.2% /dev/sdb1: Moved: 79.9% /dev/sdb1: Moved: 83.3% /dev/sdb1: Moved: 89.6% /dev/sdb1: Moved: 96.3% /dev/sdb1: Moved: 100.0% |
#vgreduce --help
vgreduce: Remove physical volume(s) from a volume group vgreduce [-a|--all] [-A|--autobackup y|n] [-d|--debug] [-h|--help] [--mirrorsonly] [--removemissing] [-f|--force] [-t|--test] [-v|--verbose] [--version] VolumeGroupName [PhysicalVolumePath...] |
#vgreduce --help
vgreduce: Remove physical volume(s) from a volume group vgreduce [-a|--all] [-A|--autobackup y|n] [-d|--debug] [-h|--help] [--mirrorsonly] [--removemissing] [-f|--force] [-t|--test] [-v|--verbose] [--version] VolumeGroupName [PhysicalVolumePath...] |
#pvdisplay
--- Physical volume --- PV Name /dev/sdb1 VG Name TEST_VG_VOL PV Size 9.32 GB / not usable 2.41 MB Allocatable yes PE Size (KByte) 4096 Total PE 2386 Free PE 2386 Allocated PE 0 PV UUID E8grzY-XQm6-xMlr-79eA-Co1F-cPmp-ZaAH3B ... --- Physical volume --- PV Name /dev/sdb5 VG Name TEST_VG_VOL PV Size 9.32 GB / not usable 2.41 MB Allocatable yes PE Size (KByte) 4096 Total PE 2386 Free PE 1106 Allocated PE 1280 PV UUID R3BWIl-ptAH-vJQP-4qdY-jDip-t6d4-qrlKum |
#pvdisplay
--- Physical volume --- PV Name /dev/sdb1 VG Name TEST_VG_VOL PV Size 9.32 GB / not usable 2.41 MB Allocatable yes PE Size (KByte) 4096 Total PE 2386 Free PE 2386 Allocated PE 0 PV UUID E8grzY-XQm6-xMlr-79eA-Co1F-cPmp-ZaAH3B ... --- Physical volume --- PV Name /dev/sdb5 VG Name TEST_VG_VOL PV Size 9.32 GB / not usable 2.41 MB Allocatable yes PE Size (KByte) 4096 Total PE 2386 Free PE 1106 Allocated PE 1280 PV UUID R3BWIl-ptAH-vJQP-4qdY-jDip-t6d4-qrlKum |
#vgreduce -a
Please give volume group name and physical volume paths Run `vgreduce --help' for more information. |
#vgreduce -a
Please give volume group name and physical volume paths Run `vgreduce --help' for more information. |
#vgreduce -a TEST_VG_VOL
Removed "/dev/sdb1" from volume group "TEST_VG_VOL" Physical volume "/dev/sdb2" still in use Physical volume "/dev/sdb5" still in use |
#vgreduce -a TEST_VG_VOL
Removed "/dev/sdb1" from volume group "TEST_VG_VOL" Physical volume "/dev/sdb2" still in use Physical volume "/dev/sdb5" still in use |
#vgreduce TEST_VG_VOL /dev/sdb1
Physical Volume "/dev/sdb1" not found in Volume Group "TEST_VG_VOL" |
#vgreduce TEST_VG_VOL /dev/sdb1
Physical Volume "/dev/sdb1" not found in Volume Group "TEST_VG_VOL" |
#pvdisplay
--- Physical volume --- PV Name /dev/sdb2 VG Name TEST_VG_VOL PV Size 9.32 GB / not usable 2.44 MB Allocatable yes PE Size (KByte) 4096 Total PE 2386 Free PE 1106 Allocated PE 1280 PV UUID pmK8xN-dC2H-uAAz-3g2V-3DQc-n3Fr-nUiLjg ... --- NEW Physical volume --- PV Name /dev/sdb1 VG Name PV Size 9.32 GB Allocatable NO PE Size (KByte) 0 Total PE 0 Free PE 0 Allocated PE 0 PV UUID E8grzY-XQm6-xMlr-79eA-Co1F-cPmp-ZaAH3B |
#pvdisplay
--- Physical volume --- PV Name /dev/sdb2 VG Name TEST_VG_VOL PV Size 9.32 GB / not usable 2.44 MB Allocatable yes PE Size (KByte) 4096 Total PE 2386 Free PE 1106 Allocated PE 1280 PV UUID pmK8xN-dC2H-uAAz-3g2V-3DQc-n3Fr-nUiLjg ... --- NEW Physical volume --- PV Name /dev/sdb1 VG Name PV Size 9.32 GB Allocatable NO PE Size (KByte) 0 Total PE 0 Free PE 0 Allocated PE 0 PV UUID E8grzY-XQm6-xMlr-79eA-Co1F-cPmp-ZaAH3B |
#pvdisplay
--- Physical volume --- PV Name /dev/sdb2 VG Name TEST_VG_VOL PV Size 9.32 GB / not usable 2.44 MB Allocatable yes PE Size (KByte) 4096 Total PE 2386 Free PE 1106 Allocated PE 1280 PV UUID pmK8xN-dC2H-uAAz-3g2V-3DQc-n3Fr-nUiLjg --- Physical volume --- PV Name /dev/sdb5 VG Name TEST_VG_VOL PV Size 9.32 GB / not usable 2.41 MB Allocatable yes PE Size (KByte) 4096 Total PE 2386 Free PE 1106 Allocated PE 1280 PV UUID R3BWIl-ptAH-vJQP-4qdY-jDip-t6d4-qrlKum |
#pvdisplay
--- Physical volume --- PV Name /dev/sdb2 VG Name TEST_VG_VOL PV Size 9.32 GB / not usable 2.44 MB Allocatable yes PE Size (KByte) 4096 Total PE 2386 Free PE 1106 Allocated PE 1280 PV UUID pmK8xN-dC2H-uAAz-3g2V-3DQc-n3Fr-nUiLjg --- Physical volume --- PV Name /dev/sdb5 VG Name TEST_VG_VOL PV Size 9.32 GB / not usable 2.41 MB Allocatable yes PE Size (KByte) 4096 Total PE 2386 Free PE 1106 Allocated PE 1280 PV UUID R3BWIl-ptAH-vJQP-4qdY-jDip-t6d4-qrlKum |
#vgdisplay
--- Volume group --- VG Name TEST_VG_VOL System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 15 VG Access read/write VG Status resizable MAX LV 0 Cur LV 6 Open LV 1 Max PV 0 Cur PV 2 Act PV 2 VG Size 18.64 GB PE Size 4.00 MB Total PE 4772 Alloc PE / Size 2560 / 10.00 GB Free PE / Size 2212 / 8.64 GB VG UUID evk7UV-cG3i-snTY-BYXK-n8w6-tTaC-fj13i4 |
#vgdisplay
--- Volume group --- VG Name TEST_VG_VOL System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 15 VG Access read/write VG Status resizable MAX LV 0 Cur LV 6 Open LV 1 Max PV 0 Cur PV 2 Act PV 2 VG Size 18.64 GB PE Size 4.00 MB Total PE 4772 Alloc PE / Size 2560 / 10.00 GB Free PE / Size 2212 / 8.64 GB VG UUID evk7UV-cG3i-snTY-BYXK-n8w6-tTaC-fj13i4 |
#lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert vol1 TEST_VG_VOL -wi-ao 5.00G vv1 TEST_VG_VOL -wi-a- 1.00G vv2 TEST_VG_VOL -wi-a- 1.00G vv3 TEST_VG_VOL -wi-a- 1.00G vv4 TEST_VG_VOL -wi-a- 1.00G vv5 TEST_VG_VOL -wi-a- 1.00G |
#lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert vol1 TEST_VG_VOL -wi-ao 5.00G vv1 TEST_VG_VOL -wi-a- 1.00G vv2 TEST_VG_VOL -wi-a- 1.00G vv3 TEST_VG_VOL -wi-a- 1.00G vv4 TEST_VG_VOL -wi-a- 1.00G vv5 TEST_VG_VOL -wi-a- 1.00G |
#lvdisplay
--- Logical volume --- LV Name /dev/TEST_VG_VOL/vol1 VG Name TEST_VG_VOL LV UUID 2rQ2rD-nDBg-cmfk-oLBT-Qbkw-1uJe-c6FnEP LV Write Access read/write LV Status available # open 0 LV Size 5.00 GB Current LE 1280 Segments 2 ... LV Write Access read/write LV Status available # open 0 LV Size 1.00 GB Current LE 256 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 254:7 |
#lvdisplay
--- Logical volume --- LV Name /dev/TEST_VG_VOL/vol1 VG Name TEST_VG_VOL LV UUID 2rQ2rD-nDBg-cmfk-oLBT-Qbkw-1uJe-c6FnEP LV Write Access read/write LV Status available # open 0 LV Size 5.00 GB Current LE 1280 Segments 2 ... LV Write Access read/write LV Status available # open 0 LV Size 1.00 GB Current LE 256 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 254:7 |
#fdisk -l /dev/sdb
Disk /dev/sdb: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xce5cf3c1 Device Boot Start End Blocks Id System /dev/sdb1 1 1217 9775521 83 Linux /dev/sdb2 1218 2434 9775552+ 83 Linux /dev/sdb3 2435 38913 293017567+ 5 Extended /dev/sdb5 2435 3651 9775521 83 Linux /dev/sdb6 3652 4867 9767488+ 83 Linux /dev/sdb7 4868 38913 273474463+ 83 Linux |
#fdisk -l /dev/sdb
Disk /dev/sdb: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xce5cf3c1 Device Boot Start End Blocks Id System /dev/sdb1 1 1217 9775521 83 Linux /dev/sdb2 1218 2434 9775552+ 83 Linux /dev/sdb3 2435 38913 293017567+ 5 Extended /dev/sdb5 2435 3651 9775521 83 Linux /dev/sdb6 3652 4867 9767488+ 83 Linux /dev/sdb7 4868 38913 273474463+ 83 Linux |
#vgdisplay
--- Volume group --- VG Name TEST_VG_VOL System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 15 VG Access read/write VG Status resizable MAX LV 0 Cur LV 6 Open LV 0 Max PV 0 Cur PV 2 Act PV 2 VG Size 18.64 GB PE Size 4.00 MB Total PE 4772 Alloc PE / Size 2560 / 10.00 GB Free PE / Size 2212 / 8.64 GB VG UUID evk7UV-cG3i-snTY-BYXK-n8w6-tTaC-fj13i4 |
#vgdisplay
--- Volume group --- VG Name TEST_VG_VOL System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 15 VG Access read/write VG Status resizable MAX LV 0 Cur LV 6 Open LV 0 Max PV 0 Cur PV 2 Act PV 2 VG Size 18.64 GB PE Size 4.00 MB Total PE 4772 Alloc PE / Size 2560 / 10.00 GB Free PE / Size 2212 / 8.64 GB VG UUID evk7UV-cG3i-snTY-BYXK-n8w6-tTaC-fj13i4 |
#pvdisplay
--- Physical volume --- PV Name /dev/sdb2 VG Name TEST_VG_VOL PV Size 9.32 GB / not usable 2.44 MB Allocatable yes PE Size (KByte) 4096 Total PE 2386 Free PE 1106 Allocated PE 1280 PV UUID pmK8xN-dC2H-uAAz-3g2V-3DQc-n3Fr-nUiLjg --- Physical volume --- PV Name /dev/sdb5 VG Name TEST_VG_VOL PV Size 9.32 GB / not usable 2.41 MB Allocatable yes PE Size (KByte) 4096 Total PE 2386 Free PE 1106 Allocated PE 1280 PV UUID R3BWIl-ptAH-vJQP-4qdY-jDip-t6d4-qrlKum |
#pvdisplay
--- Physical volume --- PV Name /dev/sdb2 VG Name TEST_VG_VOL PV Size 9.32 GB / not usable 2.44 MB Allocatable yes PE Size (KByte) 4096 Total PE 2386 Free PE 1106 Allocated PE 1280 PV UUID pmK8xN-dC2H-uAAz-3g2V-3DQc-n3Fr-nUiLjg --- Physical volume --- PV Name /dev/sdb5 VG Name TEST_VG_VOL PV Size 9.32 GB / not usable 2.41 MB Allocatable yes PE Size (KByte) 4096 Total PE 2386 Free PE 1106 Allocated PE 1280 PV UUID R3BWIl-ptAH-vJQP-4qdY-jDip-t6d4-qrlKum |
#apt-get install mdadm
Selecting previously deselected package mdadm. (Reading database ... 55310 files and directories currently installed.) Unpacking mdadm (from .../mdadm_2.6.9-3_i386.deb) ... Processing triggers for man-db ... Setting up mdadm (2.6.9-3) ... Generating array device nodes... done. Generating mdadm.conf... done. update-initramfs: deferring update (trigger activated) Starting MD monitoring service: mdadm --monitor. Assembling MD arrays...done (no arrays found in config file or automatically). Processing triggers for initramfs-tools ... update-initramfs: Generating /boot/initrd.img-2.6.29-2-686 dpkg: warning: obsolete option '--print-installation-architecture', please use '--print-architecture' instead. dpkg: warning: obsolete option '--print-installation-architecture', please use '--print-architecture' instead. W: mdadm: /etc/mdadm/mdadm.conf defines no arrays. W: mdadm: no arrays defined in configuration file. |
#apt-get install mdadm
Selecting previously deselected package mdadm. (Reading database ... 55310 files and directories currently installed.) Unpacking mdadm (from .../mdadm_2.6.9-3_i386.deb) ... Processing triggers for man-db ... Setting up mdadm (2.6.9-3) ... Generating array device nodes... done. Generating mdadm.conf... done. update-initramfs: deferring update (trigger activated) Starting MD monitoring service: mdadm --monitor. Assembling MD arrays...done (no arrays found in config file or automatically). Processing triggers for initramfs-tools ... update-initramfs: Generating /boot/initrd.img-2.6.29-2-686 dpkg: warning: obsolete option '--print-installation-architecture', please use '--print-architecture' instead. dpkg: warning: obsolete option '--print-installation-architecture', please use '--print-architecture' instead. W: mdadm: /etc/mdadm/mdadm.conf defines no arrays. W: mdadm: no arrays defined in configuration file. |
#mdadm --help
mdadm is used for building, managing, and monitoring Linux md devices (aka RAID arrays) Usage: mdadm --create device options... Create a new array from unused devices. mdadm --assemble device options... Assemble a previously created array. mdadm --build device options... Create or assemble an array without metadata. mdadm --manage device options... make changes to an existing array. ... Shorthand for --manage. Any parameter that does not start with '-' is treated as a device name or, for --examine-bitmap, a file name. The first such name is often the name of an md device. Subsequent names are often names of component devices. For detailed help on the above major modes use --help after the mode e.g. mdadm --assemble --help For general help on options use mdadm --help-options |
#mdadm --help
mdadm is used for building, managing, and monitoring Linux md devices (aka RAID arrays) Usage: mdadm --create device options... Create a new array from unused devices. mdadm --assemble device options... Assemble a previously created array. mdadm --build device options... Create or assemble an array without metadata. mdadm --manage device options... make changes to an existing array. ... Shorthand for --manage. Any parameter that does not start with '-' is treated as a device name or, for --examine-bitmap, a file name. The first such name is often the name of an md device. Subsequent names are often names of component devices. For detailed help on the above major modes use --help after the mode e.g. mdadm --assemble --help For general help on options use mdadm --help-options |
#mdadm --create --help
Usage: mdadm --create device -chunk=X --level=Y --raid-devices=Z devices This usage will initialise a new md array, associate some devices with it, and activate the array. In order to create an array with some devices missing, use the special word 'missing' in place of the relevant device name. Before devices are added, they are checked to see if they already contain raid superblocks or filesystems. They are also checked to see if the variance in device size exceeds 1%. If any discrepancy is found, the user will be prompted for confirmation before the array is created. The presence of a '--run' can override this ... --spare-devices= -x: number of spares (eXtras) devices in initial array --size= -z : Size (in K) of each drive in RAID1/4/5/6/10 - optional --force -f : Honour devices as listed on command line. Don't : insert a missing drive for RAID5. --run -R : insist of running the array even if not all : devices are present or some look odd. --readonly -o : start the array readonly - not supported yet. --name= -N : Textual name for array - max 32 characters --bitmap-chunk= : bitmap chunksize in Kilobytes. --delay= -d : bitmap update delay in seconds. |
#mdadm --create --help
Usage: mdadm --create device -chunk=X --level=Y --raid-devices=Z devices This usage will initialise a new md array, associate some devices with it, and activate the array. In order to create an array with some devices missing, use the special word 'missing' in place of the relevant device name. Before devices are added, they are checked to see if they already contain raid superblocks or filesystems. They are also checked to see if the variance in device size exceeds 1%. If any discrepancy is found, the user will be prompted for confirmation before the array is created. The presence of a '--run' can override this ... --spare-devices= -x: number of spares (eXtras) devices in initial array --size= -z : Size (in K) of each drive in RAID1/4/5/6/10 - optional --force -f : Honour devices as listed on command line. Don't : insert a missing drive for RAID5. --run -R : insist of running the array even if not all : devices are present or some look odd. --readonly -o : start the array readonly - not supported yet. --name= -N : Textual name for array - max 32 characters --bitmap-chunk= : bitmap chunksize in Kilobytes. --delay= -d : bitmap update delay in seconds. |
#mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdb6
mdadm: array /dev/md0 started. |
#mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdb6
mdadm: array /dev/md0 started. |
#mdadm --assemble --help
Usage: mdadm --assemble device options... mdadm --assemble --scan options... This usage assembles one or more raid arrays from pre-existing components. For each array, mdadm needs to know the md device, the identity of the array, and a number of sub devices. These can be found in a number of ways. The md device is either given on the command line or is found listed in the config file. The array identity is determined either from the --uuid or --super-minor commandline arguments, from the config file, ... choosing devices to use. --name= -N : Array name to look for in super-block. --config= -c : config file --scan -s : scan config file for missing information --run -R : Try to start the array even if not enough devices for a full array are present --force -f : Assemble the array even if some superblocks appear : out-of-date. This involves modifying the superblocks. --update= -U : Update superblock: try '-A --update=?' for option list. --no-degraded : Assemble but do not start degraded arrays. |
#mdadm --assemble --help
Usage: mdadm --assemble device options... mdadm --assemble --scan options... This usage assembles one or more raid arrays from pre-existing components. For each array, mdadm needs to know the md device, the identity of the array, and a number of sub devices. These can be found in a number of ways. The md device is either given on the command line or is found listed in the config file. The array identity is determined either from the --uuid or --super-minor commandline arguments, from the config file, ... choosing devices to use. --name= -N : Array name to look for in super-block. --config= -c : config file --scan -s : scan config file for missing information --run -R : Try to start the array even if not enough devices for a full array are present --force -f : Assemble the array even if some superblocks appear : out-of-date. This involves modifying the superblocks. --update= -U : Update superblock: try '-A --update=?' for option list. --no-degraded : Assemble but do not start degraded arrays. |
#cat /proc/mdstat
Personalities : [raid1] md0 : active raid1 sdb6[1] sdb1[0] 9767424 blocks [2/2] [UU] [=====>...............] resync = 29.6% (2898240/9767424) finish=4.8min speed=23394K/sec unused devices: <none> |
#cat /proc/mdstat
Personalities : [raid1] md0 : active raid1 sdb6[1] sdb1[0] 9767424 blocks [2/2] [UU] [=====>...............] resync = 29.6% (2898240/9767424) finish=4.8min speed=23394K/sec unused devices: <none> |
#дlvdisplay
--- Logical volume --- LV Name /dev/TEST_VG_VOL/vol1 VG Name TEST_VG_VOL LV UUID 2rQ2rD-nDBg-cmfk-oLBT-Qbkw-1uJe-c6FnEP LV Write Access read/write LV Status available # open 0 LV Size 5.00 GB Current LE 1280 Segments 2 ... LV Write Access read/write LV Status available # open 0 LV Size 1.00 GB Current LE 256 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:5 |
#дlvdisplay
--- Logical volume --- LV Name /dev/TEST_VG_VOL/vol1 VG Name TEST_VG_VOL LV UUID 2rQ2rD-nDBg-cmfk-oLBT-Qbkw-1uJe-c6FnEP LV Write Access read/write LV Status available # open 0 LV Size 5.00 GB Current LE 1280 Segments 2 ... LV Write Access read/write LV Status available # open 0 LV Size 1.00 GB Current LE 256 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:5 |
#lvremove /dev/TEST_VG_VOL/vol1
Do you really want to remove active logical volume "vol1"? [y/n]: y Logical volume "vol1" successfully removed |
#lvremove /dev/TEST_VG_VOL/vol1
Do you really want to remove active logical volume "vol1"? [y/n]: y Logical volume "vol1" successfully removed |
#lvremove /dev/TEST_VG_VOL/vv[12345]
Do you really want to remove active logical volume "vv1"? [y/n]: y Logical volume "vv1" successfully removed Do you really want to remove active logical volume "vv2"? [y/n]: y Logical volume "vv2" successfully removed Do you really want to remove active logical volume "vv3"? [y/n]: y Logical volume "vv3" successfully removed Do you really want to remove active logical volume "vv4"? [y/n]: y Logical volume "vv4" successfully removed Do you really want to remove active logical volume "vv5"? [y/n]: y Logical volume "vv5" successfully removed |
#lvremove /dev/TEST_VG_VOL/vv[12345]
Do you really want to remove active logical volume "vv1"? [y/n]: y Logical volume "vv1" successfully removed Do you really want to remove active logical volume "vv2"? [y/n]: y Logical volume "vv2" successfully removed Do you really want to remove active logical volume "vv3"? [y/n]: y Logical volume "vv3" successfully removed Do you really want to remove active logical volume "vv4"? [y/n]: y Logical volume "vv4" successfully removed Do you really want to remove active logical volume "vv5"? [y/n]: y Logical volume "vv5" successfully removed |
#vgdisplay
--- Volume group --- VG Name TEST_VG_VOL System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 21 VG Access read/write VG Status resizable MAX LV 0 Cur LV 0 Open LV 0 Max PV 0 Cur PV 2 Act PV 2 VG Size 18.64 GB PE Size 4.00 MB Total PE 4772 Alloc PE / Size 0 / 0 Free PE / Size 4772 / 18.64 GB VG UUID evk7UV-cG3i-snTY-BYXK-n8w6-tTaC-fj13i4 |
#vgdisplay
--- Volume group --- VG Name TEST_VG_VOL System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 21 VG Access read/write VG Status resizable MAX LV 0 Cur LV 0 Open LV 0 Max PV 0 Cur PV 2 Act PV 2 VG Size 18.64 GB PE Size 4.00 MB Total PE 4772 Alloc PE / Size 0 / 0 Free PE / Size 4772 / 18.64 GB VG UUID evk7UV-cG3i-snTY-BYXK-n8w6-tTaC-fj13i4 |
#pvdisplay
"/dev/sdb2" is a new physical volume of "9.32 GB" --- NEW Physical volume --- PV Name /dev/sdb2 VG Name PV Size 9.32 GB Allocatable NO PE Size (KByte) 0 Total PE 0 Free PE 0 Allocated PE 0 ... --- NEW Physical volume --- PV Name /dev/sdb5 VG Name PV Size 9.32 GB Allocatable NO PE Size (KByte) 0 Total PE 0 Free PE 0 Allocated PE 0 PV UUID R3BWIl-ptAH-vJQP-4qdY-jDip-t6d4-qrlKum |
#pvdisplay
"/dev/sdb2" is a new physical volume of "9.32 GB" --- NEW Physical volume --- PV Name /dev/sdb2 VG Name PV Size 9.32 GB Allocatable NO PE Size (KByte) 0 Total PE 0 Free PE 0 Allocated PE 0 ... --- NEW Physical volume --- PV Name /dev/sdb5 VG Name PV Size 9.32 GB Allocatable NO PE Size (KByte) 0 Total PE 0 Free PE 0 Allocated PE 0 PV UUID R3BWIl-ptAH-vJQP-4qdY-jDip-t6d4-qrlKum |
#fdisk -l /dev/sdb
Disk /dev/sdb: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xce5cf3c1 Device Boot Start End Blocks Id System /dev/sdb1 1 1217 9775521 83 Linux /dev/sdb2 1218 2434 9775552+ 83 Linux /dev/sdb3 2435 38913 293017567+ 5 Extended /dev/sdb5 2435 3651 9775521 83 Linux /dev/sdb6 3652 4867 9767488+ 83 Linux /dev/sdb7 4868 38913 273474463+ 83 Linux |
#fdisk -l /dev/sdb
Disk /dev/sdb: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xce5cf3c1 Device Boot Start End Blocks Id System /dev/sdb1 1 1217 9775521 83 Linux /dev/sdb2 1218 2434 9775552+ 83 Linux /dev/sdb3 2435 38913 293017567+ 5 Extended /dev/sdb5 2435 3651 9775521 83 Linux /dev/sdb6 3652 4867 9767488+ 83 Linux /dev/sdb7 4868 38913 273474463+ 83 Linux |
#file -s /dev/sdb3
/dev/sdb3: x86 boot sector; partition 1: ID=0x83, starthead 254, startsector 63, 19551042 sectors; partition 2: ID=0x5, starthead 254, startsector 19551105, 19535040 sectors, extended partition table, code offset 0x0 |
#file -s /dev/sdb3
/dev/sdb3: x86 boot sector; partition 1: ID=0x83, starthead 254, startsector 63, 19551042 sectors; partition 2: ID=0x5, starthead 254, startsector 19551105, 19535040 sectors, extended partition table, code offset 0x0 |
#fdisk -l /dev/sda
Disk /dev/sda: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x12c36e6e Device Boot Start End Blocks Id System /dev/sda1 * 1 38913 312568641 83 Linux |
#fdisk -l /dev/sda
Disk /dev/sda: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x12c36e6e Device Boot Start End Blocks Id System /dev/sda1 * 1 38913 312568641 83 Linux |
#ÑÑcat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] md0 : active (auto-read-only) raid1 sdb1[0] sdb6[1] 9767424 blocks [2/2] [UU] unused devices: <none> |
#ÑÑcat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] md0 : active (auto-read-only) raid1 sdb1[0] sdb6[1] 9767424 blocks [2/2] [UU] unused devices: <none> |
#vgcreate --help
vgcreate: Create a volume group vgcreate [-A|--autobackup {y|n}] [--addtag Tag] [--alloc AllocationPolicy] [-c|--clustered {y|n}] [-d|--debug] [-h|--help] [-l|--maxlogicalvolumes MaxLogicalVolumes] [-M|--metadatatype 1|2] [-p|--maxphysicalvolumes MaxPhysicalVolumes] [-s|--physicalextentsize PhysicalExtentSize[kKmMgGtTpPeE]] [-t|--test] [-v|--verbose] [--version] VolumeGroupName PhysicalVolume [PhysicalVolume...] |
Personalities : [raid1] md0 : active raid1 sdb6[1] sdb1[0] 9767424 blocks [2/2] [UU] [=====>...............] resync = 29.6% (2898240/9767424) finish=4.8min speed=23394K/sec unused devices: <none>
Время первой команды журнала | 18:24:05 2009- 5-30 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 09:53:08 2009- 6- 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 7.92 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.04 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.62 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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