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

Содержание

Журнал

Понедельник (03/22/10)

/dev/tty2
14:52:23
#vim /etc/network/interfaces
--- /tmp/l3-saved-5759.5424.18706	2010-03-22 15:52:52.000000000 +0200
+++ /etc/network/interfaces	2010-03-22 15:53:01.000000000 +0200
@@ -8,7 +8,7 @@
 # The primary network interface
 allow-hotplug eth0
 iface eth0 inet static
-	address 192.168.15.6
+	address 192.168.15.2
 	netmask 255.255.255.0
 	network 192.168.15.0
 	broadcast 192.168.15.255
14:53:01
#vim /etc/host
14:53:35
#~
~
~
~
~
~
~
~
~
~
~
...
~
~
~
~
~
~
~
~
~
"/etc/hostname" 1L, 15C записано
/dev/pts/1
14:56:08
#dd -C if=/dev/zero of=disk1.img seek=2048 bs=1024k count1
dd: неверный ключ -- C
Попробуйте `dd --help' для получения более подробного описания.
14:57:47
#dd if=/dev/zero of=disk1.img seek=2048 bs=1024k count1
dd: операнд `count1' не распознан
Попробуйте `dd --help' для получения более подробного описания.
14:58:12
#dd if=/dev/zero of=disk1.img seek=2048 bs=1024k count1
dd: операнд `count1' не распознан
Попробуйте `dd --help' для получения более подробного описания.
14:58:32
#dd if=/dev/zero of=disk1.img seek=2048 bs=1024k count=1
1+0 записей считано
1+0 записей написано
 скопировано 1048576 байт (1,0 MB), 0,00247818 c, 423 MB/c
14:58:38
#ls
Desktop  disk1.img
14:58:41
#dd if=/dev/zero of=disk2.img seek=2048 bs=1024k count=1
1+0 записей считано
1+0 записей написано
 скопировано 1048576 байт (1,0 MB), 0,00248377 c, 422 MB/c
14:58:48
#dd if=/dev/zero of=disk3.img seek=2048 bs=1024k count=1
1+0 записей считано
1+0 записей написано
 скопировано 1048576 байт (1,0 MB), 0,00256122 c, 409 MB/c
14:58:54
#losetup /dev/loop1 disk1.img

14:59:13
#losetup /dev/loop3 disk3.img

14:59:21
#losetup /dev/loop2 disk2.img

15:00:48
#cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active (auto-read-only) raid5 loop3[3](S) loop2[1] loop1[0]
      4196224 blocks level 5, 64k chunk, algorithm 2 [3/2] [UU_]
unused devices: <none>
15:01:00
#losetup /dev/loop2 disk2.img
                          /dev/md0 -r /dev/loop3
mdadm: hot removed /dev/loop3
15:03:35
#mdadm /dev/md0 -f /dev/loop3
mdadm: set device faulty failed for /dev/loop3:  No such device
15:03:51
#losetup /dev/loop2 disk2.img
                                     3 disk3
15:04:11
#losetup /dev/loop2 disk2.img
                            -d /dev/loop3
15:04:43
#fdisk -l /dev/loop3
Disk /dev/loop3: 2148 MB, 2148532224 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Disk /dev/loop3 doesn't contain a valid partition table
15:04:59
#mdadm /dev/md0 -a /dev/loop3
mdadm: re-added /dev/loop3
15:05:19
#cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid5 loop3[2] loop2[1] loop1[0]
      4196224 blocks level 5, 64k chunk, algorithm 2 [3/3] [UUU]
unused devices: <none>
15:05:34
#cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid5 loop3[2] loop2[1] loop1[0]
      4196224 blocks level 5, 64k chunk, algorithm 2 [3/3] [UUU]
unused devices: <none>
15:05:36
#kpartx -a /dev/md0

15:06:30
#fdisk /dev/md0
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x0fa3c033.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
The number of cylinders for this disk is set to 1049056.
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)
...
Disk identifier: 0x0fa3c033
    Device Boot      Start         End      Blocks   Id  System
/dev/md0p1               1     1049056     4196222   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 22: Недопустимый аргумент.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
15:07:13
#kpartx -a /dev/md0

15:07:15
#mkfs.ext3 /dev/mapper/md0p1
mke2fs 1.41.3 (12-Oct-2008)
warning: 479 blocks unused.
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
262656 inodes, 1048576 blocks
52452 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1073741824
32 block groups
32768 blocks per group, 32768 fragments per group
8208 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 22 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
15:07:46
#mount /dev/mapper/md0p1 /mnt

15:08:03
#df -h
Файловая система