Google Групи вече не поддържа нови публикации или абонаменти в Usenet. Съдържанието за минали периоди остава видимо.

Mirroring without loosing data /question/

0 показвания
Преминаване към първото непрочетено съобщение

Edward Shushkin

непрочетено,
18.04.2001 г., 11:40:1118.04.01 г.
до
I have identical sda, sdb devices and FS with some data (that i need) on
whole sda.
Then i do 'mkraid' with following /etc/raidtab:

raiddev /dev/md0
raidlevel 1
nr-raid-disks 2
nr-spare-disks 0
persistent-superblock 0
device /dev/sda
raid-disk 0
device /dev/sdb
raid disk 1

After the syncing process has been finished I have md device with the FS
type and all the data that I had on the sda.
This way seems to be very convenient, and my question: IS IT SAFE? (on
the other hand i am sure that 'persistent superblock 1' causes loss some
data)
Thanks,
Edward.
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majo...@vger.kernel.org

Gregory Leblanc

непрочетено,
18.04.2001 г., 17:37:3818.04.01 г.
до
On 18 Apr 2001 16:40:11 +0100, Edward Shushkin wrote:
[snip]

> After the syncing process has been finished I have md device with the FS
> type and all the data that I had on the sda.
> This way seems to be very convenient, and my question: IS IT SAFE? (on
> the other hand i am sure that 'persistent superblock 1' causes loss some
> data)

Yep, this is the "recomended" way of creating a RAID 1 mirror if you
already have data on one disk. I don't know of any risks specific to
creating the RAID set this way, unless you happen to mark the wrong disk
as failed (and sync all of your non-data onto your data).
Greg

--
Troll, troll, troll your post
Gently down the feed
Merrily, merrily troll along
A life is what you need...

Bene, Martin

непрочетено,
19.04.2001 г., 2:57:1419.04.01 г.
до

-----BEGIN PGP SIGNED MESSAGE-----

Hi Gregory,


> On 18 Apr 2001 16:40:11 +0100, Edward Shushkin wrote:
> > After the syncing process has been finished I have md
> > device with the FS
> > type and all the data that I had on the sda.
> > This way seems to be very convenient, and my question: IS
> > IT SAFE? (on
> > the other hand i am sure that 'persistent superblock 1'
> > causes loss some
> > data)

> Yep, this is the "recomended" way of creating a RAID 1 mirror if
> you already have data on one disk. I don't know of any risks
> specific to creating the RAID set this way, unless you happen to
> mark the
> wrong disk as failed (and sync all of your non-data onto your
> data).

Please reread the original mail - there's no mention of using failed
disk, no new mkfs, no copy, no raidhotadd - he just did mkraid -force
on two partitions one of which contained data and, by the grace of
god and much luck, it happened to mirror the data to the empty disk
instead of the other way round. Besides, he's now got an ext2
filesystem bigger than the physical device (difference being
persistent superblock size times number of disks), which is also a
problem just waiting to happen.

Summary: this is NOT the recomended method of migrating single disk
- -> raid 1, has a 50% chance of trashing your data and leaves you with
mismatched filesystem <-> device sizes.

recomended method:

1) mkraid with the disk containing your data specified as
"failed-disk" instead of "raid-disk". This creates the raid array in
degraded mode, using just the new disk.

2) create a new filesystem on the raid device (mke2fs)

3) copy data from old filesystem to new filesystem on raid (cp -a
generaly works ok).

4) restart system using just the new raid device

5) if all is well, raidhotadd the old disk to the raid device to make
it redundant.

More detailed explanations can be foind on the list archives by
searching for "failed-disk", has been discussed quite often.

Bye, Martin
*******************************************************
Martin Bene, Tech. Manager Web Solutions
KPNQwest Austria GmbH, A-8020 Graz, Nikolaiplatz 4
t +43 (316) 813824, f +43 (316) 813824-26
e marti...@kpnqwest.com, i http://www.kpnqwest.at
*******************************************************

-----BEGIN PGP SIGNATURE-----
Version: PGP Personal Security 7.0.3

iQCVAwUBOt6Mih+NBGYktXFhAQGABAP+P27sdM2FWxvejsF//r4YYl4ejhKu7IWI
1zSmQVET3msgIroiMvEBxzW5zU1TQVAIVQQzltN4njQCNFem/yfWuam72oyrDOZZ
E087KjNsCfH5BPkAoDcp1wRGB9JEOgkQr8zDv5PpWC/MhoJnFXqfPu888uP7r31u
u1cVDwWAKhA=
=JWpV
-----END PGP SIGNATURE-----

0 нови съобщения