/l3/users/devi/xen-for-zen/xen1.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 :26 :27 :28 :29 :30 :31 :32 :33 :34 :35 :36 :37 :38 :39 :40 :41 :42 :43 :44 :45 :46 |
|
#ls
2003server0 ISO suse0 winxp10 winxp2 winxp5 winxp8 2003server1 oes0 winxp0 winxp11 winxp3 winxp6 winxp9 deb0 oes1 winxp1 winxp12 winxp4 winxp7 |
#for i in `seq 1 12`
![]() > do > dd if=/dev/NAS1/winxp0 of=/dev/NAS1/winxp$i > done dd: writing to `/dev/NAS1/winxp1': Input/output error 2078737+0 records in 2078736+0 records out 1064312832 bytes (1.1 GB) copied, 176.974 seconds, 6.0 MB/s dd: writing to `/dev/NAS1/winxp2': Input/output error 2095009+0 records in 2095008+0 records out ... 1094144 bytes (1.1 MB) copied, 0.130912 seconds, 8.4 MB/s 2265+0 records in 2265+0 records out 1159680 bytes (1.2 MB) copied, 0.131745 seconds, 8.8 MB/s 1809+0 records in 1809+0 records out 926208 bytes (926 kB) copied, 0.122542 seconds, 7.6 MB/s 2289+0 records in 2289+0 records out 1171968 bytes (1.2 MB) copied, 0.133126 seconds, 8.8 MB/s |
#pkill vblade
|
#ps aux | grep blade
root 13340 0.0 0.5 2852 704 pts/3 R+ 21:02 0:00 grep blade |
#ls
![]() |
#/etc/init.d/lvm restart
![]() Shutting down LVM Volume Groups... /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error /dev/dm-5: read failed after 0 of 4096 at 0: Input/output error Can't deactivate volume group "NAS1" with 1 open logical volume(s) Can't deactivate volume group "NAS0" with 1 open logical volume(s) |
#/etc/init.d/lvm restart
![]() Shutting down LVM Volume Groups... /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error /dev/dm-5: read failed after 0 of 4096 at 0: Input/output error Can't deactivate volume group "NAS1" with 1 open logical volume(s) Can't deactivate volume group "NAS0" with 1 open logical volume(s) |
#/etc/init.d/lvm restart
![]() Shutting down LVM Volume Groups... /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error /dev/dm-5: read failed after 0 of 4096 at 0: Input/output error Can't deactivate volume group "NAS1" with 1 open logical volume(s) Can't deactivate volume group "NAS0" with 1 open logical volume(s) |
#ls /dev/NAS1/
2003server0 ISO suse0 winxp10 winxp2 winxp5 winxp8 2003server1 oes0 winxp0 winxp11 winxp3 winxp6 winxp9 deb0 oes1 winxp1 winxp12 winxp4 winxp7 |
#ls /dev/NAS0/
suse0 suse1 |
#ls /dev/NAS0/
suse0 suse1 |
#lvdisplay
--- Logical volume --- LV Name /dev/NAS1/winxp9 VG Name NAS1 LV UUID gqslcy-nKVx-qRTK-5Hze-YO1W-Zo8g-PsrxCC LV Write Access read/write LV Status available # open 0 LV Size 2.00 GB Current LE 512 Segments 1 ... LV UUID g1g4HE-94Ok-8ym3-5APT-rOka-NOZW-DOGvsP LV Write Access read/write LV Status available # open 0 LV Size 4.00 GB Current LE 1024 Segments 1 Allocation inherit Read ahead sectors 0 Block device 254:24 |
#/etc/init.d/lvm restart
![]() Shutting down LVM Volume Groups... /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error /dev/dm-5: read failed after 0 of 4096 at 0: Input/output error Can't deactivate volume group "NAS1" with 1 open logical volume(s) Can't deactivate volume group "NAS0" with 1 open logical volume(s) |
#/etc/init.d/lvm stop
![]() Shutting down LVM Volume Groups... /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error /dev/dm-5: read failed after 0 of 4096 at 0: Input/output error Can't deactivate volume group "NAS1" with 1 open logical volume(s) Can't deactivate volume group "NAS0" with 1 open logical volume(s) |
#ls /dev/dm-3
/dev/dm-3 |
#ls -l /dev/dm-3
brw-rw---- 1 root disk 254, 3 2006-12-11 07:31 /dev/dm-3 |
#ls -l /dev/NAS1/
total 0 lrwxrwxrwx 1 root root 28 2006-12-11 07:31 2003server0 -> /dev/mapper/NAS1-2003server0 lrwxrwxrwx 1 root root 28 2006-12-11 07:31 2003server1 -> /dev/mapper/NAS1-2003server1 lrwxrwxrwx 1 root root 21 2006-12-11 07:31 deb0 -> /dev/mapper/NAS1-deb0 lrwxrwxrwx 1 root root 20 2006-12-11 07:31 ISO -> /dev/mapper/NAS1-ISO lrwxrwxrwx 1 root root 21 2006-12-11 07:31 oes0 -> /dev/mapper/NAS1-oes0 lrwxrwxrwx 1 root root 21 2006-12-11 07:31 oes1 -> /dev/mapper/NAS1-oes1 lrwxrwxrwx 1 root root 22 2006-12-11 07:31 suse0 -> /dev/mapper/NAS1-suse0 lrwxrwxrwx 1 root root 23 2006-12-11 07:31 winxp0 -> /dev/mapper/NAS1-winxp0 lrwxrwxrwx 1 root root 23 2006-12-11 07:31 winxp1 -> /dev/mapper/NAS1-winxp1 lrwxrwxrwx 1 root root 24 2006-12-11 07:31 winxp10 -> /dev/mapper/NAS1-winxp10 lrwxrwxrwx 1 root root 24 2006-12-11 07:31 winxp11 -> /dev/mapper/NAS1-winxp11 lrwxrwxrwx 1 root root 24 2006-12-11 07:31 winxp12 -> /dev/mapper/NAS1-winxp12 lrwxrwxrwx 1 root root 23 2006-12-11 07:31 winxp2 -> /dev/mapper/NAS1-winxp2 lrwxrwxrwx 1 root root 23 2006-12-11 07:31 winxp3 -> /dev/mapper/NAS1-winxp3 lrwxrwxrwx 1 root root 23 2006-12-11 07:31 winxp4 -> /dev/mapper/NAS1-winxp4 lrwxrwxrwx 1 root root 23 2006-12-11 07:31 winxp5 -> /dev/mapper/NAS1-winxp5 lrwxrwxrwx 1 root root 23 2006-12-11 07:31 winxp6 -> /dev/mapper/NAS1-winxp6 lrwxrwxrwx 1 root root 23 2006-12-11 07:31 winxp7 -> /dev/mapper/NAS1-winxp7 lrwxrwxrwx 1 root root 23 2006-12-11 07:31 winxp8 -> /dev/mapper/NAS1-winxp8 lrwxrwxrwx 1 root root 23 2006-12-11 07:31 winxp9 -> /dev/mapper/NAS1-winxp9 |
#ls -l /dev/mapper/
total 0 crw-rw---- 1 root root 10, 62 2006-12-11 07:31 control brw-rw---- 1 root disk 254, 24 2006-12-11 08:40 NAS0-suse0 brw-rw---- 1 root disk 254, 23 2006-12-11 07:52 NAS0-suse1 brw-rw---- 1 root disk 254, 8 2006-12-11 07:31 NAS1-2003server0 brw-rw---- 1 root disk 254, 21 2006-12-11 07:31 NAS1-2003server1 brw-rw---- 1 root disk 254, 6 2006-12-11 07:31 NAS1-deb0 brw-rw---- 1 root disk 254, 7 2006-12-11 07:31 NAS1-ISO brw-rw---- 1 root disk 254, 9 2006-12-11 07:31 NAS1-oes0 brw-rw---- 1 root disk 254, 22 2006-12-11 07:31 NAS1-oes1 ... b--------- 1 root root 254, 2 2006-12-11 07:31 NAS1-winxp1-cow b--------- 1 root root 254, 5 2006-12-11 21:00 NAS1-winxp2 b--------- 1 root root 254, 4 2006-12-11 07:31 NAS1-winxp2-cow brw-rw---- 1 root disk 254, 11 2006-12-11 21:02 NAS1-winxp3 brw-rw---- 1 root disk 254, 12 2006-12-11 21:02 NAS1-winxp4 brw-rw---- 1 root disk 254, 13 2006-12-11 07:31 NAS1-winxp5 brw-rw---- 1 root disk 254, 14 2006-12-11 21:02 NAS1-winxp6 brw-rw---- 1 root disk 254, 15 2006-12-11 21:02 NAS1-winxp7 brw-rw---- 1 root disk 254, 16 2006-12-11 21:02 NAS1-winxp8 brw-rw---- 1 root disk 254, 17 2006-12-11 21:02 NAS1-winxp9 |
#ls -l /dev/dm-3
brw-rw---- 1 root disk 254, 3 2006-12-11 07:31 /dev/dm-3 |
#lvdisplay winxp0
![]() /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error /dev/dm-5: read failed after 0 of 4096 at 0: Input/output error /dev/dm-3: read failed after 0 of 4096 at 2147418112: Input/output error /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error /dev/dm-5: read failed after 0 of 4096 at 2147418112: Input/output error /dev/dm-5: read failed after 0 of 4096 at 0: Input/output error Volume group "winxp0" not found |
#lvdisplay /dev/NAS1/winxp0
/dev/dm-3: read failed after 0 of 4096 at 0: Input/output error /dev/dm-5: read failed after 0 of 4096 at 0: Input/output error --- Logical volume --- LV Name /dev/NAS1/winxp0 VG Name NAS1 LV UUID 6w0bG5-emLP-b9tq-H1ch-tOMY-t5Ay-8nKk7x LV Write Access read/write LV snapshot status source of /dev/NAS1/winxp1 [INACTIVE] /dev/NAS1/winxp2 [INACTIVE] LV Status available # open 0 LV Size 2.00 GB Current LE 512 Segments 1 Allocation inherit Read ahead sectors 0 Block device 254:1 |
#lvremove /dev/NAS1/winxp1
![]() /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error /dev/dm-5: read failed after 0 of 4096 at 0: Input/output error Do you really want to remove active logical volume "winxp1"? [y/n]: y Segmentation fault |
#lvdisplay winxp0
![]() /dev/dm-3: open failed: No such device or address /dev/dm-5: read failed after 0 of 4096 at 0: Input/output error /dev/dm-5: read failed after 0 of 4096 at 2147418112: Input/output error /dev/dm-5: read failed after 0 of 4096 at 0: Input/output error Volume group "winxp0" not found |
#lvdisplay winxp0
![]() /dev/dm-5: read failed after 0 of 4096 at 0: Input/output error /dev/dm-5: read failed after 0 of 4096 at 2147418112: Input/output error /dev/dm-5: read failed after 0 of 4096 at 0: Input/output error Volume group "winxp0" not found |
#lvremove /dev/NAS1/winxp2
![]() /dev/dm-5: read failed after 0 of 4096 at 0: Input/output error Do you really want to remove active logical volume "winxp2"? [y/n]: y Segmentation fault |
#lvdisplay winxp0
![]() /dev/dm-5: open failed: No such device or address Volume group "winxp0" not found |
#ls -l /dev/dm-5
brw-rw---- 1 root disk 254, 5 2006-12-11 07:31 /dev/dm-5 |
#ls -l /dev/mapper/ | grep 254.*5
brw-rw---- 1 root disk 254, 23 2006-12-11 07:52 NAS0-suse1 b--------- 1 root root 254, 3 2006-12-11 20:57 NAS1-winxp1 b--------- 1 root root 254, 5 2006-12-11 21:00 NAS1-winxp2 brw-rw---- 1 root disk 254, 13 2006-12-11 07:31 NAS1-winxp5 brw-rw---- 1 root disk 254, 15 2006-12-11 21:02 NAS1-winxp7 |
#lvremove /dev/NAS1/winxp2
Logical volume "winxp2" successfully removed |
#lvdisplay
LV Size 2.00 GB Current LE 512 Segments 1 Allocation inherit Read ahead sectors 0 Block device 254:15 --- Logical volume --- LV Name /dev/NAS1/winxp8 VG Name NAS1 LV UUID 6tLsHJ-BqmQ-LeaR-WZMl-T1h8-ZEjU-3cBGvb ... LV UUID g1g4HE-94Ok-8ym3-5APT-rOka-NOZW-DOGvsP LV Write Access read/write LV Status available # open 0 LV Size 4.00 GB Current LE 1024 Segments 1 Allocation inherit Read ahead sectors 0 Block device 254:24 |
#lvdisplay | grep winxp
LV Name /dev/NAS1/winxp0 /dev/NAS1/winxp1 [INACTIVE] LV Name /dev/NAS1/winxp3 LV Name /dev/NAS1/winxp4 LV Name /dev/NAS1/winxp5 LV Name /dev/NAS1/winxp6 LV Name /dev/NAS1/winxp7 LV Name /dev/NAS1/winxp8 LV Name /dev/NAS1/winxp9 LV Name /dev/NAS1/winxp10 LV Name /dev/NAS1/winxp11 LV Name /dev/NAS1/winxp12 LV Name /dev/NAS1/winxp1 LV snapshot status INACTIVE destination for /dev/NAS1/winxp0 |
#/etc/init.d/lvm restart
![]() Shutting down LVM Volume Groups... Can't deactivate volume group "NAS1" with 1 open logical volume(s) Can't deactivate volume group "NAS0" with 1 open logical volume(s) |
#/etc/init.d/lvm restart
![]() Shutting down LVM Volume Groups... Can't deactivate volume group "NAS1" with 1 open logical volume(s) Can't deactivate volume group "NAS0" with 1 open logical volume(s) |
#lvremove /dev/NAS1/winxp1
Logical volume "winxp1" successfully removed |
#/etc/init.d/lvm restart
![]() Shutting down LVM Volume Groups... Can't deactivate volume group "NAS1" with 1 open logical volume(s) Can't deactivate volume group "NAS0" with 1 open logical volume(s) |
#/etc/init.d/lvm restart
![]() Shutting down LVM Volume Groups... Can't deactivate volume group "NAS1" with 1 open logical volume(s) Can't deactivate volume group "NAS0" with 1 open logical volume(s) |
#lvdisplay | grep winxp
LV Name /dev/NAS1/winxp0 LV Name /dev/NAS1/winxp3 LV Name /dev/NAS1/winxp4 LV Name /dev/NAS1/winxp5 LV Name /dev/NAS1/winxp6 LV Name /dev/NAS1/winxp7 LV Name /dev/NAS1/winxp8 LV Name /dev/NAS1/winxp9 LV Name /dev/NAS1/winxp10 LV Name /dev/NAS1/winxp11 LV Name /dev/NAS1/winxp12 |
#reboot
|
#lvdisplay
LV Status available # open 0 LV Size 2.00 GB Current LE 512 Segments 1 Allocation inherit Read ahead sectors 0 Block device 254:9 --- Logical volume --- LV Name /dev/NAS1/winxp7 ... LV UUID g1g4HE-94Ok-8ym3-5APT-rOka-NOZW-DOGvsP LV Write Access read/write LV Status available # open 0 LV Size 4.00 GB Current LE 1024 Segments 1 Allocation inherit Read ahead sectors 0 Block device 254:19 |
#/etc/init.d/lvm restart
Shutting down LVM Volume Groups... 0 logical volume(s) in volume group "NAS1" now active 0 logical volume(s) in volume group "NAS0" now active Setting up LVM Volume Groups... Reading all physical volumes. This may take a while... Found volume group "NAS1" using metadata type lvm2 Found volume group "NAS0" using metadata type lvm2 18 logical volume(s) in volume group "NAS1" now active 2 logical volume(s) in volume group "NAS0" now active |
#/etc/init.d/lvm restart
Shutting down LVM Volume Groups... 0 logical volume(s) in volume group "NAS1" now active 0 logical volume(s) in volume group "NAS0" now active Setting up LVM Volume Groups... Reading all physical volumes. This may take a while... Found volume group "NAS1" using metadata type lvm2 Found volume group "NAS0" using metadata type lvm2 18 logical volume(s) in volume group "NAS1" now active 2 logical volume(s) in volume group "NAS0" now active |
#ls /dev/NAS1/
2003server0 deb0 oes0 suse0 winxp10 winxp12 winxp4 winxp6 winxp8 2003server1 ISO oes1 winxp0 winxp11 winxp3 winxp5 winxp7 winxp9 |
#lvdisplay /dev/NAS1/winxp0
--- Logical volume --- LV Name /dev/NAS1/winxp0 VG Name NAS1 LV UUID 6w0bG5-emLP-b9tq-H1ch-tOMY-t5Ay-8nKk7x LV Write Access read/write LV Status available # open 0 LV Size 2.00 GB Current LE 512 Segments 1 Allocation inherit Read ahead sectors 0 Block device 254:0 |
#lvcreate -n winxp1 -L 2048M NAS1
Logical volume "winxp1" created |
#lvcreate -n winxp2 -L 2048M NAS1
Logical volume "winxp2" created |
#for i in `seq 1 12`; do dd if=/dev/NAS1/winxp0 of=/dev/NAS1/winx
$i; done 4194304+0 records in 4194304+0 records out 2147483648 bytes (2.1 GB) copied, 319.831 seconds, 6.7 MB/s 4194304+0 records in 4194304+0 records out 2147483648 bytes (2.1 GB) copied, 322.053 seconds, 6.7 MB/s 4194304+0 records in 4194304+0 records out 2147483648 bytes (2.1 GB) copied, 292.268 seconds, 7.3 MB/s ... 2147483648 bytes (2.1 GB) copied, 319.499 seconds, 6.7 MB/s 4194304+0 records in 4194304+0 records out 2147483648 bytes (2.1 GB) copied, 301.528 seconds, 7.1 MB/s 4194304+0 records in 4194304+0 records out 2147483648 bytes (2.1 GB) copied, 302.422 seconds, 7.1 MB/s 4194304+0 records in 4194304+0 records out 2147483648 bytes (2.1 GB) copied, 302.926 seconds, 7.1 MB/s |
# grep -v ^# /etc/xen/suseN | grep -vx ''
kernel = "/boot/vmlinuz-2.6.18-3-xen-686" ramdisk = "/boot/initrd.img-2.6.18-3-xen-686" builder='linux' memory = 160 shadow_memory = 8 name = 'suse' + N vif = [ 'mac=00:16:3e:00:02:'+N+', bridge=xenbr0' ] disk = [ 'phy:/dev/NAS0/suse'+N+',hda,w', 'file:/data/ISO/zensuite-7-sp1.iso,hdc:cdrom,r' ] root = "/dev/hda2 ro" on_poweroff = 'destroy' on_reboot = 'restart' on_crash = 'restart' |
#vi /etc/xen/suseN
8c8 < disk = [ 'phy:/dev/NAS0/suse'+N+',hda,w', 'file:/data/ISO/zensuite-7-sp1.iso,hdc:cdrom,r' ] --- > disk = [ 'phy:/dev/NAS0/suse'+N+',hda,w', 'tap:/data/ISO/zensuite-7-sp1.iso,hdc:cdrom,r' ] |
# grep -v ^# /etc/xen/suseN | grep -vx ''
kernel = "/boot/vmlinuz-2.6.18-3-xen-686" ramdisk = "/boot/initrd.img-2.6.18-3-xen-686" builder='linux' memory = 160 shadow_memory = 8 name = 'suse' + N vif = [ 'mac=00:16:3e:00:02:'+N+', bridge=xenbr0' ] disk = [ 'phy:/dev/NAS0/suse'+N+',hda,w', 'tap:/data/ISO/zensuite-7-sp1.iso,hdc:cdrom,r' ] root = "/dev/hda2 ro" on_poweroff = 'destroy' on_reboot = 'restart' on_crash = 'restart' |
#fdisk -l /dev/sda
Disk /dev/sda: 81.9 GB, 81964302336 bytes 255 heads, 63 sectors/track, 9964 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 1 2432 19535008+ 83 Linux /dev/sda2 2433 2675 1951897+ 82 Linux swap / Solaris /dev/sda3 2676 9964 58548892+ 83 Linux |
#fdisk -l /dev/sdc
Disk /dev/sdc: 524 MB, 524286976 bytes 17 heads, 59 sectors/track, 1020 cylinders Units = cylinders of 1003 * 512 = 513536 bytes This doesn't look like a partition table Probably you selected the wrong device. Device Boot Start End Blocks Id System /dev/sdc1 ? 1914209 2457017 272218546+ 20 Unknown Partition 1 has different physical/logical beginnings (non-Linux?): phys=(356, 97, 46) logical=(1914208, 5, 40) Partition 1 has different physical/logical endings: ... Partition 3 has different physical/logical endings: phys=(324, 77, 19) logical=(1931557, 10, 42) Partition 3 does not end on cylinder boundary. /dev/sdc4 * 1390457 1390478 10668+ 49 Unknown Partition 4 has different physical/logical beginnings (non-Linux?): phys=(87, 1, 0) logical=(1390456, 5, 1) Partition 4 has different physical/logical endings: phys=(335, 78, 2) logical=(1390477, 9, 38) Partition 4 does not end on cylinder boundary. Partition table entries are not in disk order |
#mount /dev/sdc /mnt
|
#ls /mnt
Autumn Sessions Web.wmv _ofort site ftproot Osen uucp.doc F_WS-CAT-2007_eng.pdf polosa_me.jpg Windsurf.Magazine.June.2006.pdf Lapa polosa_tolya.jpg WMPInfo.xml mp3 SENDMAIL-all.doc www.txt Nokia_photos Sendmail.txt |
#df -h /mnt
Filesystem Size Used Avail Use% Mounted on /dev/sdc 500M 453M 47M 91% /mnt |
#ls -l /mnt/*
-rwxr-xr-x 1 root root 326487 2005-10-28 22:20 ????043.jpg -rwxr-xr-x 1 root root 255015 2005-11-30 23:30 ????044.jpg -rwxr-xr-x 1 root root 299815 2005-10-30 10:37 ????045.jpg -rwxr-xr-x 1 root root 216931 2005-10-30 10:47 ????046.jpg -rwxr-xr-x 1 root root 197883 2005-10-30 14:33 ????047.jpg -rwxr-xr-x 1 root root 154924 2005-10-30 14:46 ????048.jpg -rwxr-xr-x 1 root root 180470 2005-10-30 14:55 ????049.jpg -rwxr-xr-x 1 root root 308221 2005-11-08 22:23 ????050.jpg -rwxr-xr-x 1 root root 102020 2005-11-21 13:30 ????051.jpg -rwxr-xr-x 1 root root 253275 2005-11-24 19:36 ????052.jpg ... -rwxr-xr-x 1 root root 19723 2006-07-09 14:00 200394397-001.jpg -rwxr-xr-x 1 root root 29276 2006-07-09 14:11 57568744.jpg -rwxr-xr-x 1 root root 21834 2006-07-09 14:13 890725-001.jpg -rwxr-xr-x 1 root root 13477 2006-07-09 13:59 aa013838.jpg -rwxr-xr-x 1 root root 15269 2006-07-09 13:57 aog71836.jpg -rwxr-xr-x 1 root root 19197 2006-07-09 14:13 dv1990064.jpg -rwxr-xr-x 1 root root 3657438 2006-07-09 14:51 dv1990064.psd -rwxr-xr-x 1 root root 20273 2006-07-09 14:38 dv1990065.jpg -rwxr-xr-x 1 root root 219416 2006-07-09 14:51 site.jpg -rwxr-xr-x 1 root root 31744 2006-07-09 14:14 Thumbs.db |
#du -sh /mnt/*
12M /mnt/Autumn Sessions Web.wmv 70M /mnt/ftproot 17M /mnt/F_WS-CAT-2007_eng.pdf 176M /mnt/Lapa 328K /mnt/mp3 15M /mnt/Nokia_photos 440K /mnt/_ofort 142M /mnt/Osen 640K /mnt/polosa_me.jpg 248K /mnt/polosa_tolya.jpg 648K /mnt/SENDMAIL-all.doc 56K /mnt/Sendmail.txt 4.0M /mnt/site 24K /mnt/uucp.doc 18M /mnt/Windsurf.Magazine.June.2006.pdf 8.0K /mnt/WMPInfo.xml 8.0K /mnt/www.txt |
#rm -rf /mnt/Osen/
|
#du -sh /mnt/*
12M /mnt/Autumn Sessions Web.wmv 70M /mnt/ftproot 17M /mnt/F_WS-CAT-2007_eng.pdf 176M /mnt/Lapa 328K /mnt/mp3 15M /mnt/Nokia_photos 440K /mnt/_ofort 640K /mnt/polosa_me.jpg 248K /mnt/polosa_tolya.jpg 648K /mnt/SENDMAIL-all.doc 56K /mnt/Sendmail.txt 4.0M /mnt/site 24K /mnt/uucp.doc 18M /mnt/Windsurf.Magazine.June.2006.pdf 8.0K /mnt/WMPInfo.xml 8.0K /mnt/www.txt |
#df -h /mnt
Filesystem Size Used Avail Use% Mounted on /dev/sdc 500M 312M 189M 63% /mnt |
#scp devi@192.168.15.254
![]() usage: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1 [...] [[user@]host2:]file2 |
#ssh devi@192.168.15.254
Password: devi@herz:~$ devi@herz:~$ devi@herz:~$ ls /ftp/pub/ ASP incoming NT-BSDAdm PKGS UG-H distfiles ISO NT-BSDNet PKGS53 vmware DJVUCNTL_61_EN.EXE lilalo-data-oct-2005.tar.gz NT-LAdm ports win.img Docs Makefile NT-LNet tasks downloads met pkg-2 tmp devi@herz:~$ ls /ftp/pub/ISO/ ... foto.iso sarge-i386-netinst.iso freebsd54-cd1.iso ubcd33-basic.iso freebsd54-cd2.iso windows-server-2003.iso freebsd60-cd1.iso windows-server-2003-vtoraya-popytka.iso freebsd60-cd2.iso windowsxp-pro-sp2.iso frenzy_v3.3.iso winxp-pro.iso home.iso devi@herz:~$ exit logout Connection to 192.168.15.254 closed. |
#scp devi@192.168.15.254:/ftp/pub/ISO/debian-testing-i386-netinst
iso /mnt/ Password: debian-testing-i386-netinst.iso 100% 139MB 1.6MB/s 01:26 |
#ls /mnt/
Autumn Sessions Web.wmv polosa_tolya.jpg debian-testing-i386-netinst.iso SENDMAIL-all.doc ftproot Sendmail.txt F_WS-CAT-2007_eng.pdf site Lapa uucp.doc mp3 Windsurf.Magazine.June.2006.pdf Nokia_photos WMPInfo.xml _ofort www.txt polosa_me.jpg |
#umount /mnt
|
#lvdisplay
LV Status available # open 0 LV Size 2.00 GB Current LE 512 Segments 1 Allocation inherit Read ahead sectors 0 Block device 254:11 --- Logical volume --- LV Name /dev/NAS1/winxp9 ... LV UUID g1g4HE-94Ok-8ym3-5APT-rOka-NOZW-DOGvsP LV Write Access read/write LV Status available # open 0 LV Size 4.00 GB Current LE 1024 Segments 1 Allocation inherit Read ahead sectors 0 Block device 254:21 |
#cd /dev/NAS1/
|
#ls
2003server0 deb0 oes0 suse0 winxp1 winxp11 winxp2 winxp4 winxp6 winxp8 2003server1 ISO oes1 winxp0 winxp10 winxp12 winxp3 winxp5 winxp7 winxp9 |
#lv
![]() lvchange lvdisplay lvm-bin-scan lvmiopversion lvreduce lvresize lvconvert lvextend lvmchange lvmsadc lvremove lvs lvcreate lvm lvmdiskscan lvmsar lvrename lvscan |
#lvrename winxp6
![]() Old and new logical volume names required lvrename: Rename a logical volume lvrename [-A|--autobackup {y|n}] [-d|--debug] [-h|-?|--help] [-t|--test] [-v|--verbose] [--version] { OldLogicalVolumePath NewLogicalVolumePath | VolumeGroupName OldLogicalVolumeName NewLogicalVolumeName } |
#lvrename /dev/NAS1/winxp6 /dev/NAS1/winxp6save
Renamed "winxp6" to "winxp6save" in volume group "NAS1" |
#lvrename /dev/NAS1/winxp9 /dev/NAS1/winxp9save
Renamed "winxp9" to "winxp9save" in volume group "NAS1" |
#lvcreate -L 2048M -n winxp6 NAS1
Logical volume "winxp6" created |
#lvcreate -L 2048M -n winxp9 NAS1
Logical volume "winxp9" created |
#for i in `seq 1 9`
> do > dd if=/dev/NAS1/winxp0 of=/dev/NAS1/winxp$i > done 4194304+0 records in 4194304+0 records out 2147483648 bytes (2.1 GB) copied, 318.78 seconds, 6.7 MB/s 4194304+0 records in 4194304+0 records out 2147483648 bytes (2.1 GB) copied, 322.287 seconds, 6.7 MB/s 4194304+0 records in ... 2147483648 bytes (2.1 GB) copied, 316.228 seconds, 6.8 MB/s 4194304+0 records in 4194304+0 records out 2147483648 bytes (2.1 GB) copied, 296.313 seconds, 7.2 MB/s 4194304+0 records in 4194304+0 records out 2147483648 bytes (2.1 GB) copied, 300.477 seconds, 7.1 MB/s 4194304+0 records in 4194304+0 records out 2147483648 bytes (2.1 GB) copied, 316.796 seconds, 6.8 MB/s |
#for i in `seq 1 9`; do dd if=/dev/NAS1/winxp0 of=/dev/NAS1/winxp$i; done
4194304+0 records in 4194304+0 records out 2147483648 bytes (2.1 GB) copied, 317.781 seconds, 6.8 MB/s 4194304+0 records in 4194304+0 records out 2147483648 bytes (2.1 GB) copied, 321.524 seconds, 6.7 MB/s 4194304+0 records in 4194304+0 records out 2147483648 bytes (2.1 GB) copied, 292.249 seconds, 7.3 MB/s 4194304+0 records in ... 2147483648 bytes (2.1 GB) copied, 317.678 seconds, 6.8 MB/s ^[[B4194304+0 records in 4194304+0 records out 2147483648 bytes (2.1 GB) copied, 297.533 seconds, 7.2 MB/s 4194304+0 records in 4194304+0 records out 2147483648 bytes (2.1 GB) copied, 302.343 seconds, 7.1 MB/s 4194304+0 records in 4194304+0 records out 2147483648 bytes (2.1 GB) copied, 320.103 seconds, 6.7 MB/s |
#killall screen
![]() bash: killall: command not found |
#cat /dev/NAS1/winxp
![]() winxp0 winxp11 winxp3 winxp6 winxp8 winxp1 winxp12 winxp4 winxp6save winxp9 winxp10 winxp2 winxp5 winxp7 winxp9save |
#cat /dev/NAS1/winxp0 | ssh
![]() |
#ping 10.0.35.5
PING 10.0.35.5 (10.0.35.5) 56(84) bytes of data. 64 bytes from 10.0.35.5: icmp_seq=1 ttl=63 time=0.425 ms 64 bytes from 10.0.35.5: icmp_seq=2 ttl=63 time=0.373 ms --- 10.0.35.5 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1000ms rtt min/avg/max/mdev = 0.373/0.399/0.425/0.026 ms |
#pkill screen
![]() |
#echo 1 1 1 1 > /proc/sys
![]() sys/ sysrq-trigger sysvipc/ |
#echo 1 1 1 1 > /proc/sys/
![]() debug/ dev/ fs/ kernel/ net/ vm/ xen/ |
#echo 1 1 1 1 > /proc/sys/kernel/
![]() acct msgmnb pty/ bootloader_type msgmni random/ cad_pid ngroups_max randomize_va_space cap-bound osrelease real-root-dev core_pattern ostype sem core_uses_pid overflowgid shmall ctrl-alt-del overflowuid shmmax domainname panic shmmni hostname panic_on_oops sysrq hotplug pid_max tainted max_lock_depth printk threads-max modprobe printk_ratelimit unknown_nmi_panic msgmax printk_ratelimit_burst version |
#echo 1 1 1 1 > /proc/sys/kernel/printk
|
#less /etc/xen
![]() |
#less /etc/xen/
|
#mount
/dev/sda1 on / type ext3 (rw,errors=remount-ro) proc on /proc type proc (rw,noexec,nosuid,nodev) /sys on /sys type sysfs (rw,noexec,nosuid,nodev) udev on /dev type tmpfs (rw,mode=0755) devshm on /dev/shm type tmpfs (rw) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,nodev) |
#fdisk -l
Units = cylinders of 8064 * 512 = 4128768 bytes Device Boot Start End Blocks Id System /dev/dm-3p1 * 1 519 2092576+ 7 HPFS/NTFS Disk /dev/dm-4: 6442 MB, 6442450944 bytes 255 heads, 63 sectors/track, 783 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/dm-4p1 1 64 514048+ 82 Linux swap / Solaris /dev/dm-4p2 * 65 783 5775367+ 83 Linux Disk /dev/dm-5: 4294 MB, 4294967296 bytes ... Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/dm-22p1 1 64 514048+ 82 Linux swap / Solaris /dev/dm-22p2 * 65 522 3678885 83 Linux Disk /dev/dm-23: 4294 MB, 4294967296 bytes 255 heads, 63 sectors/track, 522 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/dm-23p1 1 64 514048+ 82 Linux swap / Solaris /dev/dm-23p2 * 65 522 3678885 83 Linux |
#q
![]() bash: q: command not found |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:13:D4:B2:4F:EC inet addr:192.168.16.1 Bcast:192.168.16.255 Mask:255.255.255.0 inet6 addr: fe80::213:d4ff:feb2:4fec/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:11 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:812 (812.0 b) Base address:0xd800 Memory:cffe0000-d0000000 eth1 Link encap:Ethernet HWaddr 00:04:75:81:CA:61 ... TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:5226 (5.1 KiB) TX bytes:192 (192.0 b) xenbr0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:120 errors:0 dropped:0 overruns:0 frame:0 TX packets:3 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:3546 (3.4 KiB) TX bytes:96 (96.0 b) |
#mii-tool
eth0: negotiated 100baseTx-FD flow-control, link ok SIOCGMIIPHY on 'eth1' failed: Operation not supported |
#ethtool eth1
Settings for eth1: Link detected: yes |
#mount
/dev/sda1 on / type ext3 (rw,errors=remount-ro) proc on /proc type proc (rw,noexec,nosuid,nodev) /sys on /sys type sysfs (rw,noexec,nosuid,nodev) udev on /dev type tmpfs (rw,mode=0755) devshm on /dev/shm type tmpfs (rw) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,nodev) |
#fdisk /dev/hda
![]() Unable to open /dev/hda |
#fdisk /dev/hdc
![]() Unable to open /dev/hdc |
#dmesg | grep Ma
Vendor: ATA Model: Maxtor 6L080M0 Rev: BANC hde: Maxtor 6E040L0, ATA DISK drive |
winxp0 winxp11 winxp3 winxp6 winxp8 winxp1 winxp12 winxp4 winxp6save winxp9 winxp10 winxp2 winxp5 winxp7 winxp9save
Время первой команды журнала | 20:53:25 2006-12-11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 16:28:46 2006-12-17 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 21.78 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 1.98 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.03 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.64 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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