[vox-tech] swap on raid 1 doesn't stick after reboot
vox-tech@lists.lugod.org
vox-tech@lists.lugod.org
Sun, 23 May 2004 22:03:38 -0500
Hi,
I've built raid 1 in the past couple of weeks, even took notes. I had it
all working, but now I can't repeat it. I've built a raid 1 partition and
have it mounted on /, but when I build my swap and other partitions, they
don't come back after reboot.
Right now:
platinum:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/md0 34446012 821600 31874540 3% /
tmpfs 517672 0 517672 0% /dev/shm
192.168.5.102:/mnt/hda3
7842996 3858780 3585804 52% /share
platinum:~# fdisk -l /dev/hdc
Disk /dev/hdc: 120.0 GB, 120033041920 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdc1 1 4357 34997571 fd Linux raid
autodetect
/dev/hdc2 4358 4606 2000092+ fd Linux raid
autodetect
/dev/hdc3 4607 9586 40001850 fd Linux raid
autodetect
/dev/hdc4 9587 14593 40218727+ fd Linux raid
autodetect
platinum:~#
###### If I do:
platinum:~# mdadm -C /dev/md1 --level raid1 --raid-disks 2 missing /dev/hdc2
mdadm: /dev/hdc2 appears to be part of a raid array:
level=1 devices=2 ctime=Tue May 25 21:03:08 2004
Continue creating array? y
mdadm: array /dev/md1 started.
platinum:~# mkswap /dev/md1
Setting up swapspace version 1, size = 2047995 kB
platinum:~# swapon /dev/md1
platinum:~# swapon -s
Filename Type Size Used
Priority
/dev/md1 partition 1999992 0 -1
platinum:~# cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/md1 none swap sw 0 0
/dev/md0 / ext3 defaults,errors=remount-ro 0 1
/dev/hdb /media/cdrom iso9660 ro,user,noauto 0 0
/dev/fd0 /media/floppy auto rw,user,noauto 0 0
/dev/hdb /cdrom iso9660 ro,user,noauto 0 0
192.168.5.102:/mnt/hda3 /share nfs
soft,exec,intr,rsize=16384,wsize=16384,timeo=5
#### Now I reboot
platinum:~# swapon -s
platinum:~#
Nothing! If I do it with regular partitions they fail on boot with an
error:
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
Anyone know what I'm doing wrong?
Thanks
Jay