l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2004 May 23 20:24

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
[vox-tech] swap on raid 1 doesn't stick after reboot
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vox-tech] swap on raid 1 doesn't stick after reboot


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
                       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
/dev/hdc2            4358        4606     2000092+  fd  Linux raid
/dev/hdc3            4607        9586    40001850   fd  Linux raid
/dev/hdc4            9587       14593    40218727+  fd  Linux raid

###### 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
/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 /share nfs

#### Now I reboot
platinum:~# swapon -s

Nothing!  If I do it with regular partitions they fail on boot with an
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?

vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Appahost Applications
For a significant contribution towards our projector, and a generous donation to allow us to continue meeting at the Davis Library.