[Comm] softraid + lvm

Eugene Prokopiev =?iso-8859-1?q?prokopiev_=CE=C1_stc=2Edonpac=2Eru?=
Ср Июн 22 16:39:26 MSD 2005


Здравствуйте!

Имею образ уже настроенной системы (ALM 2.4) в виде cpio, который 
необходимо развернуть на softraid1 + lvm, причем все, кроме /boot, 
должно лежать именно в lvm.

Имею машину, на которой планируется все описанное разворачивать, машина 
загружена с Кноппикса. Делаю следующее:

root на 0[root]# cfdisk /dev/sda
...

root на 0[root]# sfdisk -d /dev/sda | sfdisk /dev/sdb
Checking that no-one is using this disk right now ...
OK
Disk /dev/sdb: 1115 cylinders, 255 heads, 63 sectors/track
Old situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
    Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdb1          0       -       0          0    0  Empty
/dev/sdb2          0       -       0          0    0  Empty
/dev/sdb3          0       -       0          0    0  Empty
/dev/sdb4          0       -       0          0    0  Empty
New situation:
Units = sectors of 512 bytes, counting from 0
    Device Boot    Start       End   #sectors  Id  System
/dev/sdb1   *        63     96389      96327  fd  Linux raid autodetect
/dev/sdb2         96390   2056319    1959930  82  Linux swap
/dev/sdb3       2056320  17912474   15856155  fd  Linux raid autodetect
/dev/sdb4             0         -          0   0  Empty
Successfully wrote the new partition table
Re-reading the partition table ...
If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)

root на 0[root]# mkswap /dev/sda2
Setting up swapspace version 1, size = 1003479 kB

root на 0[root]# mkswap /dev/sdb2
Setting up swapspace version 1, size = 1003479 kB

root на 0[root]# cat /etc/raidtab
raiddev /dev/md0
raid-level 1
nr-raid-disks 2
chunk-size 32
nr-spare-disks 0
persistent-superblock 1
device /dev/sda1
raid-disk 0
device /dev/sdb1
raid-disk 1
raiddev /dev/md1
raid-level 1
nr-raid-disks 2
chunk-size 32
nr-spare-disks 0
persistent-superblock 1
device /dev/sda3
raid-disk 0
device /dev/sdb3
raid-disk 1

root на 0[root]# mkraid -R /dev/md0
DESTROYING the contents of /dev/md0 in 5 seconds, Ctrl-C if unsure!
handling MD device /dev/md0
analyzing super-block
disk 0: /dev/sda1, 48163kB, raid superblock at 48064kB
disk 1: /dev/sdb1, 48163kB, raid superblock at 48064kB

root на 0[root]# mkraid -R /dev/md1
DESTROYING the contents of /dev/md1 in 5 seconds, Ctrl-C if unsure!
handling MD device /dev/md1
analyzing super-block
disk 0: /dev/sda3, 7928077kB, raid superblock at 7928000kB
disk 1: /dev/sdb3, 7928077kB, raid superblock at 7928000kB

root на 0[root]# cat /proc/mdstat
Personalities : [raid1]
read_ahead 1024 sectors
md1 : active raid1 sdb3[1] sda3[0]
       7928000 blocks [2/2] [UU]
md0 : active raid1 sdb1[1] sda1[0]
       48064 blocks [2/2] [UU]
unused devices: <none>

root на 0[root]# mkfs.ext2 /dev/md0
mke2fs 1.35 (28-Feb-2004)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
12048 inodes, 48064 blocks
2403 blocks (5.00%) reserved for the super user
First data block=1
6 block groups
8192 blocks per group, 8192 fragments per group
2008 inodes per group
Superblock backups stored on blocks:
         8193, 24577, 40961
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 29 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

root на 0[root]# pvcreate /dev/md1
lvmiopversion -- Exec of pvcreate failed
lvmiopversion: Input/output error

При этом создать файловую систему я могу:

root на 0[root]# mkfs.ext2 /dev/md1
mke2fs 1.35 (28-Feb-2004)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
991616 inodes, 1982000 blocks
99100 blocks (5.00%) reserved for the super user
First data block=0
61 block groups
32768 blocks per group, 32768 fragments per group
16256 inodes per group
Superblock backups stored on blocks:
         32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

Почему я не могу создать физический том LVM?

-- 
С уважением, Прокопьев Евгений



Подробная информация о списке рассылки community