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

Содержание

Журнал

Понедельник (04/04/11)

/dev/pts/3
07:08:47
#file -s /dev/sda1
/dev/sda1: Linux rev 1.0 ext3 filesystem data (needs journal recovery) (large files)
07:09:08
#file -s /dev/sda8
/dev/sda8: data
07:10:01
#mkfs.ext3 /dev/sda8
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
125184 inodes, 250236 blocks
12511 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=260046848
8 block groups
32768 blocks per group, 32768 fragments per group
15648 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 26 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
07:10:47
#mkdi
mkdict  mkdir
07:10:47
#mkdi
mkdict  mkdir
07:10:47
#mkdir /dev/sda8 /data
mkdir: cannot create directory `/dev/sda8': File exists
You have new mail in /var/spool/mail/root
прошло 16 минут
07:27:36
#ls -l
total 1230124
-rw------- 1 root root       1016 Mar 27 21:17 anaconda-ks.cfg
drwxr-xr-x 3 root root       4096 Mar 28 18:14 backups
-rw-r--r-- 1 root root       2061 Mar 30 13:13 cpumem.info
drwxr-xr-x 3 root root       4096 Apr  1 14:10 Desktop
-rw-r--r-- 1 root root 1258291200 Apr  2 17:21 disk1.img
-rw-r--r-- 1 root root      38088 Mar 27 21:17 install.log
-rw-r--r-- 1 root root          0 Mar 27 21:08 install.log.syslog
drwx------ 2 root root       4096 Mar 30 13:11 Mail
-rw-r--r-- 1 root root      12680 Nov 13 10:12 rpmforge-release-0.5.2-2.el5.rf.i386.rpm
-rw-r--r-- 1 root root      12680 Nov 13 10:12 rpmforge-release-0.5.2-2.el5.rf.i386.rpm.1
-rw-r--r-- 1 root root      12649 Nov 13 10:12 rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
07:27:44
#mkdir /data
mkdir: cannot create directory `/data': File exists
07:28:33
#mkdir data

07:28:45
#mount
mount                   mount.ecryptfs_private  mountpoint
mount.cifs              mount.nfs
mount.ecryptfs          mount.nfs4
07:28:45
#mount /dev/sda8 /data

07:29:09
#ls
anaconda-ks.cfg  Desktop             Mail
backups          disk1.img           rpmforge-release-0.5.2-2.el5.rf.i386.rpm
cpumem.info      install.log         rpmforge-release-0.5.2-2.el5.rf.i386.rpm.1
data             install.log.syslog  rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
07:29:12
#df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1              5078640   1767692   3048808  37% /
/dev/sda7              2031528     78468   1848200   5% /tmp
/dev/sda5             10157352    317028   9316040   4% /var
/dev/sda3             10157368    204356   9428724   3% /home
/dev/sda2             20314748   2753688  16512484  15% /usr
tmpfs                  2008180         0   2008180   0% /dev/shm
/dev/sda8               985192     17652    917496   2% /data
07:29:21
#unmount /data
bash: unmount: command not found
07:31:07
#umount /data

07:31:15
#[root@linux2:spool]# e2label /dev/sda10 DATA10
bash: [root@linux2:spool]#: command not found
07:31:34
#e2label /dev/sda8 DATA

07:31:58
#mount DATA
mount: can't find DATA in /etc/fstab or /etc/mtab
07:32:06
#mount DATA /data
mount: special device DATA does not exist
07:32:17
#e2label /dev/sda8 DATA

07:32:40
#e2label
Usage: e2label device [newlabel]
07:32:43
#e2label
Usage: e2label device [newlabel]
07:32:52
#df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1              5078640   1767700   3048800  37% /
/dev/sda7              2031528     78468   1848200   5% /tmp
/dev/sda5             10157352    317028   9316040   4% /var
/dev/sda3             10157368    204360   9428720   3% /home
/dev/sda2             20314748   2753688  16512484  15% /usr
tmpfs                  2008180         0   2008180   0% /dev/shm
07:33:36
#e2label /dev/sda8
DATA
07:34:23
#mount -L DATA10 /data10
mount: no such partition found
07:34:43
#mount -L DATA /data

07:34:50
#vim /etc/fstab
прошло 34 минуты
08:09:35
#vim /etc/fstab
08:10:54
#mount /data

08:11:01
#df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1              5078640   1767728   3048772  37% /
/dev/sda7              2031528     78468   1848200   5% /tmp
/dev/sda5             10157352    317028   9316040   4% /var
/dev/sda3             10157368    206456   9426624   3% /home
/dev/sda2             20314748   2753688  16512484  15% /usr
tmpfs                  2008180         0   2008180   0% /dev/shm
/dev/sda8               985192     17652    917496   2% /data
08:11:03
#umount /data

08:13:01
#mount /data

08:22:39
#fdisk /dev/sda
The number of cylinders for this disk is set to 763104.
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): p
Disk /dev/sda: 500.1 GB, 500107862016 bytes
40 heads, 32 sectors/track, 763104 cylinders
Units = cylinders of 1280 * 512 = 655360 bytes
...
Last cylinder or +size or +sizeM or +sizeK (81847-763104, default 763104): 5000M
Value out of range.
Last cylinder or +size or +sizeM or +sizeK (81847-763104, default 763104): +50G
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: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
08:24:27
#fdisk /dev/sda
The number of cylinders for this disk is set to 763104.
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): p
Disk /dev/sda: 500.1 GB, 500107862016 bytes
40 heads, 32 sectors/track, 763104 cylinders
Units = cylinders of 1280 * 512 = 655360 bytes
...
First cylinder (158142-763104, default 158142):
Using default value 158142
Last cylinder or +size or +sizeM or +sizeK (158142-763104, default 763104): +50G
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: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
08:24:51
#fdisk /dev/sda
The number of cylinders for this disk is set to 763104.
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): p
Disk /dev/sda: 500.1 GB, 500107862016 bytes
40 heads, 32 sectors/track, 763104 cylinders
Units = cylinders of 1280 * 512 = 655360 bytes
...
First cylinder (234437-763104, default 234437):
Using default value 234437
Last cylinder or +size or +sizeM or +sizeK (234437-763104, default 763104): +50G
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: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
08:25:10
#partprobe

08:25:18
#df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1              5078640   1767748   3048752  37% /
/dev/sda7              2031528     78468   1848200   5% /tmp
/dev/sda5             10157352    317032   9316036   4% /var
/dev/sda3             10157368    206500   9426580   3% /home
/dev/sda2             20314748   2753688  16512484  15% /usr
tmpfs                  2008180         0   2008180   0% /dev/shm
/dev/sda8               985192     17652    917496   2% /data
08:25:22
#cat /proc/partitions
major minor  #blocks  name
   8     0  488386584 sda
   8     1    5242864 sda1
   8     2   20971520 sda2
   8     3   10485760 sda3
   8     4          0 sda4
   8     5   10485744 sda5
   8     6    2097264 sda6
   8     7    2097264 sda7
   8     8    1000944 sda8
   8     9   48828784 sda9
   8    10   48828784 sda10
   8    11   48828784 sda11
08:25:55
#mdadm
Usage: mdadm --help
  for help
08:26:28
#mdadm -C /dev/md0 -l1 -n2 /dev/sda9 /dev/sda10
mdadm: array /dev/md0 started.
08:27:51
#cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sda10[1] sda9[0]
      48828672 blocks [2/2] [UU]
      [>....................]  resync =  1.3% (645760/48828672) finish=18.6min speed=43050K/sec
unused devices: <none>
08:28:07
#cat /proc/mdstat watch
Personalities : [raid1]
md0 : active raid1 sda10[1] sda9[0]
      48828672 blocks [2/2] [UU]
      [>....................]  resync =  3.9% (1925440/48828672) finish=18.5min speed=42068K/sec
unused devices: <none>
cat: watch: No such file or directory
08:28:38
#watch cat /proc/mdstat

08:30:36
#cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sda10[1] sda9[0]
      48828672 blocks [2/2] [UU]
      [==>..................]  resync = 14.3% (7019904/48828672) finish=17.1min speed=40706K/sec
unused devices: <none>
08:30:42
#cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sda10[1] sda9[0]
      48828672 blocks [2/2] [UU]
      [===>.................]  resync = 19.4% (9520896/48828672) finish=15.5min speed=42083K/sec
unused devices: <none>
08:31:43
#cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sda10[1] sda9[0]
      48828672 blocks [2/2] [UU]
      [===>.................]  resync = 19.6% (9578368/48828672) finish=15.8min speed=41274K/sec
unused devices: <none>
08:31:44
#cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sda10[1] sda9[0]
      48828672 blocks [2/2] [UU]
      [=====>...............]  resync = 29.8% (14590912/48828672) finish=13.8min speed=41064K/sec
unused devices: <none>
08:33:48
#pvcreate /dev/md0
  Physical volume "/dev/md0" successfully created
08:34:05
#vgcreate VGI /dev/md0
  Volume group "VGI" successfully created
08:38:44
#df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1              5078640   1767776   3048724  37% /
/dev/sda7              2031528     78468   1848200   5% /tmp
/dev/sda5             10157352    317024   9316044   4% /var
/dev/sda3             10157368    206432   9426648   3% /home
/dev/sda2             20314748   2753688  16512484  15% /usr
tmpfs                  2008180         0   2008180   0% /dev/shm
/dev/sda8               985192     17652    917496   2% /data
08:38:51
#pvdisplay
  --- Physical volume ---
  PV Name               /dev/md0
  VG Name               VGI
  PV Size               46.57 GB / not usable 256.00 KB
  Allocatable           yes
  PE Size (KByte)       4096
  Total PE              11921
  Free PE               11921
  Allocated PE          0
  PV UUID               DJl0Z7-CBwV-xuW7-c2Qj-t2Gp-y0n8-PHavXO
08:40:54
#vgdisplay
  --- Volume group ---
  VG Name               VGI
  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               46.57 GB
  PE Size               4.00 MB
  Total PE              11921
  Alloc PE / Size       0 / 0
  Free  PE / Size       11921 / 46.57 GB
  VG UUID               S09BqA-z304-yrOA-oNaQ-Pvdf-FlHX-0BgGfe
08:41:48
#lvcreate -L2G -n vol1 /dev/VG1
  Volume group "VG1" not found
08:45:41
#lvcreate -L2G -n vol1 /dev/VG1
  Volume group "VG1" not found
08:46:39
#lvcreate -L2G -n vol1 /dev/VG1
  Volume group "VG1" not found
08:46:42
#lvcreate -L2G -n vol1 /dev/VG1
  Volume group "VG1" not found
08:47:36
#lvcreate -L2G -n vol1 /dev/VG1
  Volume group "VG1" not found
08:47:39
#lvcreate -L2G -n vol1 /dev/VG
  Volume group "VG" not found
08:47:41
#lvcreate -L2G -n vol1 /dev/VG11
  Volume group "VG11" not found
08:47:44
#lvcreate -L2G -n voll /dev/VG1
  Volume group "VG1" not found
08:47:53
#lvcreate -L2G -n vol1 /dev/VG1
  Volume group "VG1" not found
08:49:02
#lvcreate -L2G -n vol1 /dev/VG1
  Volume group "VG1" not found
08:49:14
#lvcreate -L2G -n vol1 /dev/VG1
  Volume group "VG1" not found
08:49:52
#lvcreate -L2G -n vol1 /dev/VGI
  Logical volume "vol1" created
08:50:05
#lvdisplay
  --- Logical volume ---
  LV Name                /dev/VGI/vol1
  VG Name                VGI
  LV UUID                fF3nDt-gTOi-6beN-1JUR-ZYJX-6hKn-jd6KyI
  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     auto
  - currently set to     256
  Block device           253:0
прошло 69 минут
09:59:46
#mkfs.ext3 /dev/VGI/vol1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
262144 inodes, 524288 blocks
26214 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=536870912
16 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 37 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
10:02:31
#mkdir /vol1

10:02:57