Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
OK, i'm trying to keep this as short and less boring as possible...
I know there are tons on HOW-TO's threads about getting a RAID configuration. But...
I created with lots of help a JBOD RAID config with two 320gb SATA drives connected to the SATA1 and SATA2 connectors on the MB. They show up as sda and sdb. /etc/raidtab looks like this:
This is/was working until I decided this wasn’t enough capacity for me. I wanted to swap them with two 500gb SATA drives. But first I needed to copy all data before taking the 320gb drives out. To do this I started creating a second JBOD RAID config with the two 500gb drives connected to SATA3 and SATA4 on the MB. These drives show up as sdc and scd. I did all the necessary things to config the second RAID and changed the /ect/raidtab to:
But when I did mkreiserfs /dev/md1 I ereased the first (Md0) RAID configuration! In other words I lost all my data! Luckily I was able to get most of it back with:
I now disconnected the recovered RAID (md0) drives and connected the 500gb drives to SATA1 and SATA2, the showed up as sda and sdb, configured the JBOD RAID (md0) and formatted with reiserfs. Now I wanted to connect the old 320gb drives to SATA3 and SATA4 (sdc and sdd) and config them as md1. But after rebooting, the 320gb drives didn’t show up as sdc and sdd but as sda and sdb. And because the /etc/raidtab had md0 configured with sda1 and sdb1, the old RAID configuration showed up with the recovered data?!?
Today I borrowed an empty 320gb SATA drive, disconnected the 500gb drives, connected the empty 320gb drive to SATA1 (sda), kept the two 320gb drives as RAID connected to SATA3 and SATA4 (sdc and sdd), partitioned, formatted and mounted the empty 320gb drive and copied all my data from the RAID to it. So my data is save!
I still don’t understand how md0 could be mounted even though the drives showup as sdc1 and sdd1 instead of sda1 and sdb1. What does /etc/raidtab do? Do drives hold all the necessary information about the RAID configuration and is raidtab just for the owners interest?
Well if anyone can make sense of this story… I would really like to know what happened.
From the Software-Raid-howto document on www.tldp.org:
Quote:
5.9 The Persistent Superblock
Back in "The Good Old Days" (TM), the raidtools would read your /etc/raidtab file, and then initialize
the array. However, this would require that the filesystem on which /etc/raidtab resided was mounted.
This is unfortunate if you want to boot on a RAID.
Also, the old approach led to complications when mounting filesystems on RAID devices. They could not be
put in the /etc/fstab file as usual, but would have to be mounted from the init−scripts.
The persistent superblocks solve these problems. When an array is initialized with the persistent−superblock option in the /etc/raidtab file, a special superblock is written in the beginning of all disks participating in the array. This allows the kernel to read the configuration of RAID devices directly from the disks involved, instead of reading from some configuration file that may not be available at all times.
You should however still maintain a consistent /etc/raidtab file, since you may need this file for later
reconstruction of the array.
The persistent superblock is mandatory if you want auto−detection of your RAID devices upon system boot.
This is described in the Autodetection section.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.