/l3/users/eb/2009/linux10/user :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 |
|
#lvremove
Please enter one or more logical volume paths Run `lvremove --help' for more information. |
#lvremove /dev/sdb
Volume group "sdb" not found |
#lvremove TURBO /dev/sdb
Do you really want to remove active logical volume "vol1"? [y/n]: y Logical volume "vol1" successfully removed Do you really want to remove active logical volume "vol2"? [y/n]: y Logical volume "vol2" successfully removed Volume group "sdb" not found |
#vgremove TURBO /dev/sdb
Volume group "TURBO" successfully removed Volume group "sdb" not found |
#fdisk /dev/sda
The number of cylinders for this disk is set to 9729. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): 1 1: unknown command Command action a toggle a bootable flag ... /dev/sda1 1 2432 19535008+ 83 Linux /dev/sda4 2433 6080 29302560 5 Extended /dev/sda5 2433 6080 29302528+ 83 Linux Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error 16: Устройство или ресурс занято. The kernel still uses the old table. The new table will be used at the next reboot. Syncing disks. |
#fdisk -lu
Disk /dev/sda: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors Units = sectors of 1 * 512 = 512 bytes Disk identifier: 0x960cc0f0 Device Boot Start End Blocks Id System /dev/sda1 63 39070079 19535008+ 83 Linux /dev/sda4 39070080 97675199 29302560 5 Extended /dev/sda5 39070143 97675199 29302528+ 83 Linux Disk /dev/sdb: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors Units = sectors of 1 * 512 = 512 bytes Disk identifier: 0x35ea4cae Device Boot Start End Blocks Id System /dev/sdb1 63 19551104 9775521 83 Linux /dev/sdb4 19551105 39102209 9775552+ 5 Extended /dev/sdb5 19551168 29334689 4891761 83 Linux /dev/sdb6 29334753 31310684 987966 83 Linux |
#fdisk -lu /dev/sda
Disk /dev/sda: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors Units = sectors of 1 * 512 = 512 bytes Disk identifier: 0x960cc0f0 Device Boot Start End Blocks Id System /dev/sda1 63 39070079 19535008+ 83 Linux /dev/sda4 39070080 97675199 29302560 5 Extended /dev/sda5 39070143 97675199 29302528+ 83 Linux |
#fdisk -l
Disk /dev/sda: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x960cc0f0 Device Boot Start End Blocks Id System /dev/sda1 1 2432 19535008+ 83 Linux /dev/sda4 2433 6080 29302560 5 Extended /dev/sda5 2433 6080 29302528+ 83 Linux Disk /dev/sdb: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x35ea4cae Device Boot Start End Blocks Id System /dev/sdb1 1 1217 9775521 83 Linux /dev/sdb4 1218 2434 9775552+ 5 Extended /dev/sdb5 1218 1826 4891761 83 Linux /dev/sdb6 1827 1949 987966 83 Linux |
#df -k
Файловая система 1K-блоков Исп Доступно Исп% смонтирована на tmpfs 1618848 0 1618848 0% /lib/init/rw udev 10240 120 10120 2% /dev tmpfs 1618848 4 1618844 1% /dev/shm rootfs 19228276 2112944 16138584 12% / |
#df -h
Файловая система Разм Исп Дост Исп% смонтирована на tmpfs 1,6G 0 1,6G 0% /lib/init/rw udev 10M 120K 9,9M 2% /dev tmpfs 1,6G 4,0K 1,6G 1% /dev/shm rootfs 19G 2,1G 16G 12% / |
#fdisk -lu /dev/sda
Disk /dev/sda: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors Units = sectors of 1 * 512 = 512 bytes Disk identifier: 0x960cc0f0 Device Boot Start End Blocks Id System /dev/sda1 63 39070079 19535008+ 83 Linux /dev/sda4 39070080 97675199 29302560 5 Extended /dev/sda5 39070143 97675199 29302528+ 83 Linux |
#fdisk -lu
Disk /dev/sda: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors Units = sectors of 1 * 512 = 512 bytes Disk identifier: 0x960cc0f0 Device Boot Start End Blocks Id System /dev/sda1 63 39070079 19535008+ 83 Linux /dev/sda4 39070080 97675199 29302560 5 Extended /dev/sda5 39070143 97675199 29302528+ 83 Linux Disk /dev/sdb: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors Units = sectors of 1 * 512 = 512 bytes Disk identifier: 0x35ea4cae Device Boot Start End Blocks Id System /dev/sdb1 63 19551104 9775521 83 Linux /dev/sdb4 19551105 39102209 9775552+ 5 Extended /dev/sdb5 19551168 29334689 4891761 83 Linux /dev/sdb6 29334753 31310684 987966 83 Linux |
#fdisk -lu
/dev/sdb The number of cylinders for this disk is set to 38913. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): 1 1: unknown command Command action ... Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x35ea4cae Device Boot Start End Blocks Id System /dev/sdb1 1 1217 9775521 83 Linux /dev/sdb4 1218 4865 29302560 5 Extended /dev/sdb5 1218 4865 29302528+ 83 Linux Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. |
#fdisk -lu
Disk /dev/sda: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors Units = sectors of 1 * 512 = 512 bytes Disk identifier: 0x960cc0f0 Device Boot Start End Blocks Id System /dev/sda1 63 39070079 19535008+ 83 Linux /dev/sda4 39070080 97675199 29302560 5 Extended /dev/sda5 39070143 97675199 29302528+ 83 Linux Disk /dev/sdb: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors Units = sectors of 1 * 512 = 512 bytes Disk identifier: 0x35ea4cae Device Boot Start End Blocks Id System /dev/sdb1 63 19551104 9775521 83 Linux /dev/sdb4 19551105 78156224 29302560 5 Extended /dev/sdb5 19551168 78156224 29302528+ 83 Linux |
#fdisk /dev/sdb
The number of cylinders for this disk is set to 38913. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): 1 1: unknown command Command action a toggle a bootable flag ... Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x35ea4cae Device Boot Start End Blocks Id System /dev/sdb1 1 4864 39070048+ 83 Linux /dev/sdb4 4865 8512 29302560 5 Extended /dev/sdb5 4865 8512 29302528+ 83 Linux Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. |
#fdisk -lu
Disk /dev/sda: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors Units = sectors of 1 * 512 = 512 bytes Disk identifier: 0x960cc0f0 Device Boot Start End Blocks Id System /dev/sda1 63 39070079 19535008+ 83 Linux /dev/sda4 39070080 97675199 29302560 5 Extended /dev/sda5 39070143 97675199 29302528+ 83 Linux Disk /dev/sdb: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors Units = sectors of 1 * 512 = 512 bytes Disk identifier: 0x35ea4cae Device Boot Start End Blocks Id System /dev/sdb1 63 78140159 39070048+ 83 Linux /dev/sdb4 78140160 136745279 29302560 5 Extended /dev/sdb5 78140223 136745279 29302528+ 83 Linux |
#fdisk -lu /dev/sda1
Disk /dev/sda1: 20.0 GB, 20003848704 bytes 255 heads, 63 sectors/track, 2431 cylinders, total 39070017 sectors Units = sectors of 1 * 512 = 512 bytes Disk identifier: 0x00000000 Disk /dev/sda1 doesn't contain a valid partition table |
#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) |
#fdisk /dev/sdb
The number of cylinders for this disk is set to 38913. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): 1 1: unknown command Command action a toggle a bootable flag ... l logical (5 or over) p primary partition (1-4) l First cylinder (2434-6081, default 2434): Using default value 2434 Last cylinder or +size or +sizeM or +sizeK (2434-6081, default 6081): +30G Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. |
#fdisk -lu
Disk /dev/sda: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors Units = sectors of 1 * 512 = 512 bytes Disk identifier: 0x960cc0f0 Device Boot Start End Blocks Id System /dev/sda1 63 39070079 19535008+ 83 Linux /dev/sda4 39070080 97675199 29302560 5 Extended /dev/sda5 39070143 97675199 29302528+ 83 Linux Disk /dev/sdb: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors Units = sectors of 1 * 512 = 512 bytes Disk identifier: 0x35ea4cae Device Boot Start End Blocks Id System /dev/sdb1 63 39086144 19543041 83 Linux /dev/sdb4 39086145 97691264 29302560 5 Extended /dev/sdb5 39086208 97691264 29302528+ 83 Linux |
#dd if=/dev/zero of=/disk2.img count=1 seek=200 bs=1024k
1+0 записей считано 1+0 записей написано скопировано 1048576 байт (1,0 MB), 0,0045159 c, 232 MB/c |
#modprobe loop
|
#losetup /dev/loop1 /disk1.img
/disk1.img: Нет такого файла или каталога |
#ls -l
итого 40 drwxr-xr-x 2 user user 4096 Май 29 16:06 Desktop drwxr-xr-x 2 user user 4096 Май 25 01:11 Documents drwxr-xr-x 2 user user 4096 Май 29 16:08 Download drwxr-xr-x 2 user user 4096 Май 25 01:11 Music drwxr-xr-x 2 user user 4096 Май 25 01:11 Pictures drwxr-xr-x 2 user user 4096 Май 25 01:11 Public -rw-r--r-- 1 user user 4737 Май 29 10:10 screen.png drwxr-xr-x 2 user user 4096 Май 25 01:11 Templates drwxr-xr-x 2 user user 4096 Май 25 01:11 Videos |
#cd
|
#ls -l | less
|
#mdadm --detail /dev/md0
bash: mdadm: команда не найдена |
#mdadm --detail /dev/md0
|
#apt-get instal mdadm
E: Неверная операция instal |
#apt-get install mdadm
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). Обрабатываются триггеры для initramfs-tools ... update-initramfs: Generating /boot/initrd.img-2.6.29-2-686 dpkg: предупреждение: obsolete option '--print-installation-architecture', please use '--print-architecture' instead. dpkg: предупреждение: 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 --detail /dev/md0
|
#mdadm --detail /dev/md0
|
#ls -l | less
|
#arp -an
? (192.168.15.254) at 00:15:60:7a:63:80 [ether] on eth0 |
#ping 192.168.35.9
PING 192.168.35.9 (192.168.35.9) 56(84) bytes of data. ^[[A^[[B^C --- 192.168.35.9 ping statistics --- 4 packets transmitted, 0 received, 100% packet loss, time 3022ms |
#ping 192.168.15.9
PING 192.168.15.9 (192.168.15.9) 56(84) bytes of data. 64 bytes from 192.168.15.9: icmp_seq=1 ttl=64 time=3.08 ms 64 bytes from 192.168.15.9: icmp_seq=2 ttl=64 time=0.996 ms 64 bytes from 192.168.15.9: icmp_seq=3 ttl=64 time=1.00 ms c^[[A^[[A64 bytes from 192.168.15.9: icmp_seq=4 ttl=64 time=0.816 ms 64 bytes from 192.168.15.9: icmp_seq=5 ttl=64 time=1.00 ms ^C --- 192.168.15.9 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4002ms rtt min/avg/max/mdev = 0.816/1.383/3.088/0.855 ms |
#arp -an
? (192.168.15.254) at 00:15:60:7a:63:80 [ether] on eth0 ? (192.168.15.9) at 00:1e:8c:64:2c:4a [ether] on eth0 |
#apt-get install arping
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово Следующие пакеты устанавливались автоматически и больше не требуются: portmap Для их удаления используйте 'apt-get autoremove'. Будут установлены следующие дополнительные пакеты: libnet1 НОВЫЕ пакеты, которые будут установлены: arping libnet1 ... Получено:2 http://192.168.15.10 sid/main arping 2.08-1 [23,4kB] Получено 79,0kБ за 0s (2662kБ/c) Выбор ранее не выбранного пакета libnet1. (Чтение базы данных ... на данный момент установлено 61272 файлов и каталогов.) Распаковывается пакет libnet1 (из файла .../libnet1_1.1.2.1-5_i386.deb)... Выбор ранее не выбранного пакета arping. Распаковывается пакет arping (из файла .../arping_2.08-1_i386.deb)... Обрабатываются триггеры для man-db ... Настраивается пакет libnet1 (1.1.2.1-5) ... Настраивается пакет arping (2.08-1) ... |
#apt-get install ettercap
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово Следующие пакеты устанавливались автоматически и больше не требуются: portmap Для их удаления используйте 'apt-get autoremove'. Будут установлены следующие дополнительные пакеты: ettercap-common НОВЫЕ пакеты, которые будут установлены: ettercap ettercap-common ... Получено:2 http://192.168.15.10 sid/main ettercap 1:0.7.3-1.2+b1 [191kB] Получено 500kБ за 0s (2766kБ/c) Выбор ранее не выбранного пакета ettercap-common. (Чтение базы данных ... на данный момент установлено 61293 файлов и каталогов.) Распаковывается пакет ettercap-common (из файла .../ettercap-common_1%3a0.7.3-1.2+b1_i386.deb)... Выбор ранее не выбранного пакета ettercap. Распаковывается пакет ettercap (из файла .../ettercap_1%3a0.7.3-1.2+b1_i386.deb)... Обрабатываются триггеры для man-db ... Настраивается пакет ettercap-common (1:0.7.3-1.2+b1) ... Настраивается пакет ettercap (1:0.7.3-1.2+b1) ... |
#cat /etc/network/interfaces
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or # /usr/share/doc/ifupdown/examples for more information. auto lo eth0 iface lo inet loopback iface eth0 inet static address 192.168.15.10 netmask 255.255.255.0 network 192.168.15.0 broadcast 192.168.15.255 gateway 192.168.15.254 |
#route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.15.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0.0.0.0 192.168.15.254 0.0.0.0 UG 0 0 0 eth0 |
$screen -r
|
$ssh root@10.0.35.100
root@10.0.35.100's password: Linux linux0 2.6.18-6-xen-686 #1 SMP Sun Feb 10 22:43:13 UTC 2008 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Mon Jun 1 15:18:51 2009 from linux9.unix.nt l3-agent is already running: pid=1765; pidfile=/root/.lilalo/l3-agent.pid |
#route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.15.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0.0.0.0 192.168.15.254 0.0.0.0 UG 0 0 0 eth0 |
#screen -r
|
#screen -x 3755
|
#фзеapt-get install vlan
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово Следующие пакеты устанавливались автоматически и больше не требуются: portmap Для их удаления используйте 'apt-get autoremove'. НОВЫЕ пакеты, которые будут установлены: vlan обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 20 пакетов не обновлено. Необходимо скачать 39,6kБ архивов. После данной операции, объём занятого дискового пространства возрастёт на 176kB. Получено:1 http://192.168.15.10 sid/main vlan 1.9-3 [39,6kB] Получено 39,6kБ за 0s (527kБ/c) Выбор ранее не выбранного пакета vlan. (Чтение базы данных ... на данный момент установлено 61399 файлов и каталогов.) Распаковывается пакет vlan (из файла .../archives/vlan_1.9-3_i386.deb)... Обрабатываются триггеры для man-db ... Настраивается пакет vlan (1.9-3) ... |
#vconfig
Expecting argc to be 3-5, inclusive. Was: 1 Usage: add [interface-name] [vlan_id] rem [vlan-name] set_flag [interface-name] [flag-num] [0 | 1] set_egress_map [vlan-name] [skb_priority] [vlan_qos] set_ingress_map [vlan-name] [skb_priority] [vlan_qos] set_name_type [name-type] * The [interface-name] is the name of the ethernet card that hosts the VLAN you are talking about. * The vlan_id is the identifier (0-4095) of the VLAN you are operating on. * skb_priority is the priority in the socket buffer (sk_buff). * vlan_qos is the 3 bit priority in the VLAN header * name-type: VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5), DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5) * FLAGS: 1 REORDER_HDR When this is set, the VLAN device will move the ethernet header around to make it look exactly like a real ethernet device. This may help programs such as DHCPd which read the raw ethernet packet and make assumptions about the location of bytes. If you don't need it, don't turn it on, because there will be at least a small performance degradation. Default |