From: Eugene Prokopiev <prokopiev@stc.donpac.ru> To: Community@altlinux.ru Subject: [Comm] softraid + lvm Date: Wed, 22 Jun 2005 16:39:26 +0400 Message-ID: <42B95BFE.1010403@stc.donpac.ru> (raw) Здравствуйте! Имею образ уже настроенной системы (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? -- С уважением, Прокопьев Евгений
next reply other threads:[~2005-06-22 12:39 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-06-22 12:39 Eugene Prokopiev [this message] 2005-06-23 4:05 ` Mike Lykov 2005-06-23 5:04 ` Eugene Prokopiev 2005-06-23 5:25 ` Mike Lykov 2005-06-23 5:40 ` Eugene Prokopiev 2005-06-23 5:52 ` Eugene Prokopiev
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=42B95BFE.1010403@stc.donpac.ru \ --to=prokopiev@stc.donpac.ru \ --cc=Community@altlinux.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git