Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Yet another Hybrid Raid 0 / 1 Howto for 2.6 with dmsetup
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Zate
n00b
n00b


Joined: 12 Apr 2005
Posts: 13

PostPosted: Thu Apr 14, 2005 12:12 am    Post subject: Reply with quote

i couldnt get dmsetup down onto knoppix (3.7)... but what i did do is get ntfsprogs down onto my FC2 web server and compile it staticaly... i was then able to boot with the gen2raid disk.. wget the static ntfsprogs with ntfsresize .. i ran my dmraid -ay -v which created nvidia*1 in /dev/mapper .. i only have one partition on the raid.. 150 Gb... so i did ntfsresize -s 90G /dev/mapper/nvidia*1 (used the full name) .. it said i should do a chkdsk /f under windows that the ntfs partition might be corrupted?

i stopped right there and booted back to windows.. too much data on here to nuke it doing something i'm not sure of.. i am thinking of just backing up the important stuff. nuking windows.. braking the raid back into its original 100gb and 75 gb drives and using one for each OS... be much simpler i think... maybe i can go win XP 64 when i do that..

man if EQ2 would run under Linux i could ditch it totally... my wife is ready to switch to linux completely.. i am the one keeping myself on winXP.. her little downstairs computer gets a gentoo install this week.. lol. how sad is that.. the techy is on windows and the housewife will be running gentoo .. lol
Back to top
View user's profile Send private message
garlicbread
Apprentice
Apprentice


Joined: 06 Mar 2004
Posts: 182

PostPosted: Thu Apr 14, 2005 12:03 pm    Post subject: Reply with quote

If your trying to resize a win partition, you first need to defrag the drive to get all the data located at the begininng of the partition
the statement about chkdsk, may suggest that there is something wrong with the filesystem (or perhaps something implemented in NTFS that it doesn't recognise) so it's also worth running scandisk on the drive as well
you could try PQMagic (also called Partition Magic) which can be run via a DOS bootup disk, but this is something you have to buy (unless your willing to pirate it off p2p which I would never recomend :wink:)
Back to top
View user's profile Send private message
Zate
n00b
n00b


Joined: 12 Apr 2005
Posts: 13

PostPosted: Thu Apr 14, 2005 1:20 pm    Post subject: Reply with quote

garlicbread wrote:
If your trying to resize a win partition, you first need to defrag the drive to get all the data located at the begininng of the partition
the statement about chkdsk, may suggest that there is something wrong with the filesystem (or perhaps something implemented in NTFS that it doesn't recognise) so it's also worth running scandisk on the drive as well
you could try PQMagic (also called Partition Magic) which can be run via a DOS bootup disk, but this is something you have to buy (unless your willing to pirate it off p2p which I would never recomend :wink:)


Thanks :)

I think my plan will be to build my wifes system first... and then backup my important data and rebuild on separate drives. I'll mess with the dmraid stuff more later when i install a couple of 36GB Raptors on SATA.

Greatly appreciate the help.
Back to top
View user's profile Send private message
Zate
n00b
n00b


Joined: 12 Apr 2005
Posts: 13

PostPosted: Fri Apr 15, 2005 3:08 pm    Post subject: Reply with quote

update : I was able to use BOOTITNG to create a bootable CDrom with a partition manager that could both see, and resize my nvraid NTFS partition. I set it checking the part last ngiht.. set it resizing from 150 GB to 75 GB this morning and had my wife check on it while i was at work. She finalised it and rebooted the PC and windows booted normally. Tonight I use gen2dmaid to do my gentoo install. :) YAY !
Back to top
View user's profile Send private message
Zate
n00b
n00b


Joined: 12 Apr 2005
Posts: 13

PostPosted: Sat Apr 16, 2005 4:54 am    Post subject: Reply with quote

so i guess i am a little lost now.

worked out I could only have 4 partitions.. win has one.. the bootitng created another left me with one for swap one for linux.. i figured i could put it all in 1.. not the best solution.. but workable for now.

the problem i have is to see my raid i needed to use the gen2raid livecd... but to chroot to my amd64 environment i need to have a 64 bit kernel.. so what do i do ?.. will the usual 64 bit live CD see my raid drives ? (someone mentioned the initrd has dmraid so it will see the raid..but doesnt have dmsetup or dmraid) ..

what now ?
Back to top
View user's profile Send private message
Erlend
Guru
Guru


Joined: 26 Dec 2004
Posts: 493

PostPosted: Sat Apr 16, 2005 10:17 am    Post subject: Reply with quote

Quote:
worked out I could only have 4 partitions

You can have many more if you use an extended partition. Just don't put your /boot on an extended partition as it could cause problems later.

Quote:
bootitng created another

BootITNG doesn't need a partition to operate - it can run from the CD. Remove the BootNG Partition.

Quote:
the problem i have is to see my raid i needed to use the gen2raid

Any recent official gentoo live cd will work, as they have dmsetup on them. If you can work out the mapping yourself, or maybe use dmraid to find out what mappings it is using.

Quote:
but to chroot to my amd64 environment i need to have a 64 bit kernel

I don't think you do. The kernel you are running from the livecd obviously works - you used it to install stuff, chroot only changes, for example, /mnt/gentoo to be / - nothing fancy is done with the kernel.

Erlend
Back to top
View user's profile Send private message
hwood
n00b
n00b


Joined: 13 Jan 2003
Posts: 7
Location: BFE

PostPosted: Wed Jul 27, 2005 1:30 pm    Post subject: PDC with gen2dmraid Reply with quote

Howdy folks,

Well I have managed to get my pdc to recognize the full 200gb of my raid1 mirror. Here is how I did it.
First, I burned http://tienstra4.flatnet.tudelft.nl/~gerte/gen2dmraid/gen2dmraid-0.99a.iso and booted the -mm sources. Then I booted it up and as soon as I got to a root prompt I did dmraid -an. I then went and wgot this.
http://tienstra4.flatnet.tudelft.nl/~gerte/dmraid-static-glibc which is an rc8 binary of dmraid. I then used the new binary to see my partitions etc... ./dmraid-static-glibc -ay I was able to emerge -e system and get a kernel installed. I installed grub since I hate lilo and tried to boot it up on it's own. When it should show the grub screen all I see is a blinking cursor. I have tried making my own initrd and even tried genkernel. I still cannot get grub to boot it. My grub install worked well following your instructions, I just can't seem to get it to boot. I have tried using the grub console off the bootcd and still cannot seem to get it to boot, I got it partially boot tho.

Any suggestions?
_________________
Capitalism is the extraordinary belief that the nastiest of men, for the nastiest of reasons, will somehow work for the benefit of us all.
-- John Maynard Keynes
Back to top
View user's profile Send private message
falcon_munich
n00b
n00b


Joined: 10 Mar 2004
Posts: 17

PostPosted: Wed Sep 28, 2005 8:04 pm    Post subject: I dont get this working, need hepl please Reply with quote

Hi, i have cant get this working, can anybody help please.

First my config, i have a K8T Neo2 Borad with an AMD64

rnd mapper # lspci |grep -i raid
0000:00:0d.0 RAID bus controller: Promise Technology, Inc. PDC20579 SATAII 150 IDE Controller
0000:00:0f.0 RAID bus controller: VIA Technologies, Inc. VIA VT6420 SATA RAID Controller (rev 80)

rnd mapper # emerge info
Portage 2.0.51.22-r2 (default-linux/amd64/2005.1, gcc-3.4.4, glibc-2.3.5-r1, 2.6.12-gentoo-r10 x86_64)
=================================================================
System uname: 2.6.12-gentoo-r10 x86_64 AMD Athlon(tm) 64 Processor 3500+
Gentoo Base System version 1.6.13
ccache version 2.3 [enabled]
dev-lang/python: 2.3.5-r2
sys-apps/sandbox: 1.2.12
sys-devel/autoconf: 2.13, 2.59-r6
sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils: 2.15.92.0.2-r10
sys-devel/libtool: 1.5.18-r1
virtual/os-headers: 2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O3 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=k8 -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://194.117.143.69/mirrors/gentoo"
LINGUAS="de"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acpi alsa amd64 apache2 arts avi berkdb bitmap-fonts bzip2 cdparanoia cdr crypt cups curl dbus dedicated dga dio directfb dri dts dv dvb dvd dvdr dvdread eds emboss encode esd ethereal exif fam fbcon ffmpeg flac foomaticdb fortran ftp gif gphoto2 gpm gps gstreamer gtk gtk2 hardened ieee1394 imagemagick imap imlib ipv6 java javascript joystick jpeg kde lm_sensors lzw lzw-tiff mad memlimit mozilla mp3 mpeg nas ncurses nls nsplugin nvidia ogg oggvorbis openal opengl osc pam pda pdflib perl php png portaudio python qt quicktime readline samba scanner sdl sndfile sockets speex spell ssl tcpd tiff truetype truetype-fonts type1-fonts usb userlocales v4l vcd videos wmf wxwindows xface xine xinerama xml2 xmms xpm xprint xv xvid zlib linguas_de userland_GNU kernel_linux elibc_glibc"
Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY

My System is installed at hda - standart ide - no problem here

I have bulid a raid 0 with the via raid controler, on this raid device i have three ntfs partitions with windows xp on it. now i want to mount these devices.

this is what i have done:
rnd mapper # cat /sys/block/sda/size
234441648
rnd mapper # cat /sys/block/sdb/size
234441648
echo "0 468883296 striped 2 128 /dev/sda 0 /dev/sdb 0"|dmsetup create raid

rnd mapper # sfdisk -l -uS /dev/mapper/raid
Disk /dev/mapper/raid: cannot get geometry <------------------------ IS THIS OK ????

Disk /dev/mapper/raid: 0 cylinders, 0 heads, 0 sectors/track
Warning: The partition table looks like it was made
for C/H/S=*/255/63 (instead of 0/0/0).
For this listing I'll assume that geometry.
Units = sectors of 512 bytes, counting from 0

Device Boot Start End #sectors Id System
/dev/mapper/raid1 * 63 30716279 30716217 7 HPFS/NTFS
/dev/mapper/raid2 30716280 133114589 102398310 7 HPFS/NTFS
start: (c,h,s) expected (1023,254,63) found (1023,0,1)
/dev/mapper/raid3 133114590 468873089 335758500 7 HPFS/NTFS
start: (c,h,s) expected (1023,254,63) found (1023,0,1)
/dev/mapper/raid4 0 - 0 0 Empty

echo "0 30716217 linear /dev/sda 63"|dmsetup create raid1
echo "0 102398310 linear /dev/sda 30716280"|dmsetup create raid2
echo "0 335758500 linear /dev/sda 133114590"|dmsetup create raid3
device-mapper ioctl cmd 3 failed: Device or resource busy
Command failed

the next strange thing, raid1 and raid2 is ok, raid3 produces an error.

when i want to mount one of the partition i get this error
rnd mapper # mount /dev/mapper/raid1 /mnt/drive_c/
mount: wrong fs type, bad option, bad superblock on /dev/mapper/raid1,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so


could anybody help me please ? this is my first touch with gentoo.
_________________
Wer später bremst, fährt länger schnell.
Back to top
View user's profile Send private message
wbreeze
n00b
n00b


Joined: 06 Aug 2003
Posts: 53
Location: Langley, BC

PostPosted: Fri Sep 30, 2005 8:58 pm    Post subject: Reply with quote

Hi falcon_munich:

You should try changing
Code:
echo "0 30716217 linear /dev/sda 63"|dmsetup create raid1
echo "0 102398310 linear /dev/sda 30716280"|dmsetup create raid2
echo "0 335758500 linear /dev/sda 133114590"|dmsetup create raid3

to
Code:
echo "0 30716217 linear /dev/mapper/raid 63"|dmsetup create raid1
echo "0 102398310 linear /dev/mapper/raid 30716280"|dmsetup create raid2
echo "0 335758500 linear /dev/mapper/raid 133114590"|dmsetup create raid3



I think I have gotten:
Code:
device-mapper ioctl cmd 3 failed: Device or resource busy
Command failed

after I had tried the dmsetup create already and then tried to do it again a second time

try:

Code:
dmsetup remove raid3


and then try your dmsetup create again

EDIT:
or maybe you got that error because you ran off the end of /dev/sda. You will have more room on /dev/mapper/raid
Back to top
View user's profile Send private message
falcon_munich
n00b
n00b


Joined: 10 Mar 2004
Posts: 17

PostPosted: Sat Oct 01, 2005 1:51 pm    Post subject: Reply with quote

Hi wbreeze,

thank you very much, it works now.
I think that was an very stupid mistake :oops:
Sorry
_________________
Wer später bremst, fährt länger schnell.
Back to top
View user's profile Send private message
wbreeze
n00b
n00b


Joined: 06 Aug 2003
Posts: 53
Location: Langley, BC

PostPosted: Sat Oct 01, 2005 5:07 pm    Post subject: Reply with quote

Thats how I learned.

By making lots and lots and lots of mistakes.
Back to top
View user's profile Send private message
jackxh
n00b
n00b


Joined: 15 Jan 2005
Posts: 9
Location: LA

PostPosted: Mon Dec 19, 2005 9:44 pm    Post subject: didn't any one figure out how to rebuild broken raid1 array Reply with quote

Hi:

I was able to successfully creating the /dev/sda as raid 1 and install Gentoo Linux on a motherboard with VIA VT8237. everything boot fine. Except I can't figure out how to rebuild the broken array. The via raid bios/utilities clearly state that this is a broken array. But when I do dmraid -s



I got this:



name : via_hgbicibb
size : 312581807
stride : 0
type : mirror
status : ok
subsets: 0
devs : 1
spares : 0



Would you please give me some hint?



sincerely yours

Jack Xie
Back to top
View user's profile Send private message
Erlend
Guru
Guru


Joined: 26 Dec 2004
Posts: 493

PostPosted: Mon Dec 19, 2005 11:21 pm    Post subject: Reply with quote

Why do you want to rebuild the array if you can boot?

If you want to rebuild the array, I'm guessing you'll have to dd each partition (or use partimage, in portage) to make an exact backup, rebuild the array using the bios utilities, and then put your backup back on the disk from dd or partimage.

Erlend
Back to top
View user's profile Send private message
garlicbread
Apprentice
Apprentice


Joined: 06 Mar 2004
Posts: 182

PostPosted: Wed Dec 21, 2005 9:15 pm    Post subject: Reply with quote

with Raid 1 each disk should have identical data with maybe a slighlty different signature for each drive embeded in the raid metadata at the end of the drive
(in other words doing a direct copy within linux from the current okay disk to the new disk may not work)
most Raid bios's allow the array to be rebuilt inside the bios
it's usually just a case of fitting the new disk, go into the Raid Bios, select rebuild and select the correct source disk to copy from
that last bit is reaaally important, you don't want to copy from the blank new disk over the existing old disk with the data on

you should be able to boot to an individual raid 1 member if you want to, as a Raid1 member disk is pretty much the same as a normally partitioned drive with the exception of the raid metadata at the end of the disk
probably just a case of turning raid off in the bios to get the system to see it as a single disk, and fiddling around with grub so it selects the right drive
Back to top
View user's profile Send private message
frankjr
n00b
n00b


Joined: 13 Sep 2002
Posts: 55

PostPosted: Sun Jul 16, 2006 10:16 am    Post subject: Reply with quote

dmsetup no longer works for me under 2.6.16.
Back to top
View user's profile Send private message
Erlend
Guru
Guru


Joined: 26 Dec 2004
Posts: 493

PostPosted: Sun Jul 16, 2006 10:37 am    Post subject: Reply with quote

No me neither.

The reason is that a new patch was introduced into the kernel which forces all striped devices to have a chunk size which exactly divides the size of the device. Since your raid BIOS created the array, but it didn't have this limitation, it almost certainly didn't create a cluster-size that divides the array-size.

The way to fix it is to create a new linear-mapped device that cuts the end of your array off so that the cluster size divides it.

Let's assume your array is 24575000, and your stripe size is 64. 24575000/64 = 383984.375, but since we want it to fit exactly we just take the quotient (383984). Now multiply the quotient by the stripe size to get the valid size of the array... 383984 x 64 = 24574976, and create a new device this size:
Code:

echo "0 24574976 linear /dev/mapper/raid 0" | dmsetup create dmsetupcompatibledevice


This feels like a bit of a hack to me - I don't like it. If you have data at the very end of the array you'll lose it. I think I'm going to just blow my array away and install on md native linux raid, since I no longer need to dual-boot with Windows. I've heard linux raid is faster any ways.

Erlend
Back to top
View user's profile Send private message
Erlend
Guru
Guru


Joined: 26 Dec 2004
Posts: 493

PostPosted: Fri Jul 28, 2006 3:07 pm    Post subject: Reply with quote

I want to use the built-in linux md software raid instead of dmraid/dmsetup now… does anybody know how to disable the raid functionality on a Promise FastTrak S150 Tx2Plus?
Back to top
View user's profile Send private message
Neo_0815
l33t
l33t


Joined: 24 Feb 2003
Posts: 815
Location: Leipzig

PostPosted: Sat Dec 09, 2006 10:46 am    Post subject: Reply with quote

Anyone there which can give an example of dmsetup for an raid10 ( mirror set on top of a stripe set )?
_________________
[img:76661e22b8]http://www.biersekte.de/biersektebanner.gif[/img:76661e22b8]
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3, 4
Page 4 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum