LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 02-16-2001, 03:41 PM   #1
nabil
Member
 
Registered: Feb 2001
Location: MI, USA
Distribution: Debian Linux 100% GNU
Posts: 210

Rep: Reputation: 31

Hey every one,

Has anyone tried to run a Raid level 1 using a scsi card and dual scsi hard drives.
I am interested in implementing this on my system to avoid losing data if my primary hard drive would crash or something..
I have an Adaptec 29160 scsi card connected to 2 Seagate 160/10K 9.1 hard drives running on a dual P-III 500, and would like to set them up with a Raid partition using Redhat 7.0 pro,

Any advice at all before I proceede!!!!
 
Old 02-16-2001, 09:48 PM   #2
ssadams
Member
 
Registered: Dec 2000
Location: Toronto Canada
Distribution: slackware 7.1
Posts: 95

Rep: Reputation: 15
i have done it in the past with an Ultra 2 wide controller and it worked pretty good.The howto at linuxdoc.org helped me get it working.I now use a Molex dual channel raid controller and it works even better,but try the howto its great.
 
Old 02-17-2001, 10:31 AM   #3
nabil
Member
 
Registered: Feb 2001
Location: MI, USA
Distribution: Debian Linux 100% GNU
Posts: 210

Original Poster
Rep: Reputation: 31
So it looks like Raid is the way to go !
I spent about $300 on my Adaptec Scsi card.........
Do you think if I have went with a Raid controller instead, I would have been better off????
 
Old 02-17-2001, 11:10 AM   #4
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 10,319

Rep: Reputation: 2612Reputation: 2612Reputation: 2612Reputation: 2612Reputation: 2612Reputation: 2612Reputation: 2612Reputation: 2612Reputation: 2612Reputation: 2612Reputation: 2612
You would be better off with a GOOD RAID controller, but these are quite expensive.
 
Old 02-17-2001, 11:17 AM   #5
ssadams
Member
 
Registered: Dec 2000
Location: Toronto Canada
Distribution: slackware 7.1
Posts: 95

Rep: Reputation: 15
not for home use.You will only experiance a small hit on your cpu.Your allready ahead of most people using IDE RAID with those new controllers or motherboards with it build in.The only reason I went this path is I was putting a system together for someone and they bailed from the raid at the last moment.
 
Old 02-17-2001, 11:18 AM   #6
nabil
Member
 
Registered: Feb 2001
Location: MI, USA
Distribution: Debian Linux 100% GNU
Posts: 210

Original Poster
Rep: Reputation: 31
Thanks,

Now I don't know whether I screwed up on my setup or not, but here it is:
I reinstalled everything with new Raid level 1 partitions

<Raid> md0 on both hard drive olso took out 512M for swap on <swap> sda.

Everything seems to be running ok and great, until I decided to check it.
I turned of Primary scsi hard drive and boot it the system.
It booted fine with mirror hard drive except it could not mount the swap partion....I guess I must have screwed up as I specified swap partition out of disk 1.
Although the system booted fine with out swap partition and seemed to be running ok on mirrir drive...

So I like to fix this swap partition mistake...
Can I do it now with out reinstalling everything????
 
Old 02-17-2001, 11:27 AM   #7
ssadams
Member
 
Registered: Dec 2000
Location: Toronto Canada
Distribution: slackware 7.1
Posts: 95

Rep: Reputation: 15
this will sound crazy,but untill you decide you need a reinstall throw an old small ide drive in and make a swap partition on it and adjust fstab.I have never tried to resize a partition in linux let alone one in a raid array.
 
Old 02-17-2001, 11:34 AM   #8
nabil
Member
 
Registered: Feb 2001
Location: MI, USA
Distribution: Debian Linux 100% GNU
Posts: 210

Original Poster
Rep: Reputation: 31
Yes that could be a solution for now,
but it seems like it can be done easily, cause We are only missing with swap partition and a mirror disk partition:

Here is my raidtab, and fstab if it helps any:

-----------
raiddev /dev/md0
raid-level 1
nr-raid-disks 2
chunk-size 64k
persistent-superblock 1
#nr-spare-disks 0
device /dev/sda1
raid-disk 0
device /dev/sdb1
raid-disk 1

~
"raidtab" [readonly] 11L, 222C

--------------


/dev/md0 / ext2 defaults 1 1
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro 0 0
/dev/cdrom1 /mnt/cdrom1 iso9660 noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
none /proc proc defaults 0 0
none /dev/pts devpts gid=5,mode=620 0 0
/dev/sda5 swap swap defaults 0 0
~
~
"fstab" [readonly] 7L, 532C



 
Old 02-17-2001, 11:47 AM   #9
ssadams
Member
 
Registered: Dec 2000
Location: Toronto Canada
Distribution: slackware 7.1
Posts: 95

Rep: Reputation: 15
does /dev/sdb1 use the entire disk or do you have some space you could throw a swap file on.I wont suggest resizing and rebuilding the array(id might try it if it was my box) because it might fsck your setup and like I said Ive
never tried it so I dont know how it would work
 
Old 02-17-2001, 11:58 AM   #10
nabil
Member
 
Registered: Feb 2001
Location: MI, USA
Distribution: Debian Linux 100% GNU
Posts: 210

Original Poster
Rep: Reputation: 31
I suspect it does have free space = sda5 = 512M,
If I do #df -a
I get:

[nabil@viper /etc]$ df -a
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/md0 8293572 2112240 5760036 27% /
none 0 0 0 - /proc
usbdevfs 0 0 0 - /proc/bus/usb
none 0 0 0 - /dev/pts
automount(pid471) 0 0 0 - /misc

Notice that /dev/md0 is 8.29 which is total disk capacity minus 512M for swap..

So
disk1 actual = 8.8
disk2 actual = 8.8
but After I took out 512M for swap on sda5, then md0 became
8.3 as total of both drives,..
I suspect that I still have about 512M unused on other drive???
 
Old 02-17-2001, 12:02 PM   #11
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
Are both drives identical in partitioning? Are there 512M for swap on both sda and sdb?

I haven't tried raiding, but to me the fstab line for swap seem strange.
If I understands it right the /dev/md0 is more like a handle for the raiding-system.
Like, save this file on raiding-system md0, and then the system takes care of the rest.
If this is right, then wouldn't the swap use something similar, like /dev/md1, and not /dev/sda5? As this would point only to sda5 and not to any raiding-system.
 
Old 02-17-2001, 12:11 PM   #12
nabil
Member
 
Registered: Feb 2001
Location: MI, USA
Distribution: Debian Linux 100% GNU
Posts: 210

Original Poster
Rep: Reputation: 31
Both drives are identical of actual capacity 9.1G which will only show 8.8 I think:
When I reinstalled redhat 7.0 and decided to partition using Raid 1,

before partitioning:

<sda> size 8.8
<sdb> size 8.8


I selected both unpartitoned drives and mounted to <RAID>
At that point configuration looked like this
<RAID> md0 size 8.8

Then I did make raid device and selected swap of 512M on sda which the primary disk.
Then configuration looked like this:
<swap> sda5 size 512M
<RAID> md0 size 8.3G

So really it seems like I am missing another 512M on sdb that is still unpartioned????

 
Old 02-17-2001, 12:19 PM   #13
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
To be sure about your drive sizes run:
# fdisk /dev/sda
and
# fdisk /dev/sdb
in fdisk use p to print out the partition-table to the screen. This would give you some answers.

As a newbie on this here are my thoughts:
Since a mirror has the same size as it's original, your face is just as big in your mirror as in reality, both sda and sdb was partitioned to 8.3M. To make a mirror of swap then I think that you would create a new device called /dev/md1 containing sda5 as swap and probably sdb5 as swap-mirror.
 
Old 02-17-2001, 12:33 PM   #14
nabil
Member
 
Registered: Feb 2001
Location: MI, USA
Distribution: Debian Linux 100% GNU
Posts: 210

Original Poster
Rep: Reputation: 31
root@viper /]# fdisk /dev/sda

The number of cylinders for this disk is set to 1115.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sda: 255 heads, 63 sectors, 1115 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1049 8426061 fd Linux raid autodetect
/dev/sda2 1050 1115 530145 5 Extended
/dev/sda5 1050 1115 530113+ 82 Linux swap


[root@viper /]# fdisk /dev/sdb

The number of cylinders for this disk is set to 1115.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sdb: 255 heads, 63 sectors, 1115 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 1115 8956206 fd Linux raid autodetect


 
Old 02-17-2001, 01:06 PM   #15
ssadams
Member
 
Registered: Dec 2000
Location: Toronto Canada
Distribution: slackware 7.1
Posts: 95

Rep: Reputation: 15
Disk /dev/sdb: 255 heads, 63 sectors, 1115 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 1115 8956206 fd Linux raid autodetect


your drive has one partition taking up the entire drive.You need to shrink it down and then add a swap partition.I dont know what you are using this for or how much ram you have but you could try and srink it by 128M and make a smaller swap partition.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why can't I mount this md0 raid? (mdadm and software raid) cruiserparts Linux - Software 35 01-05-2013 03:35 PM
Perc3Di SCSI RAID + Adaptec 2810SA RAID = Fatal Grub Error? LinuxOnTheEdge Linux - General 2 03-19-2005 02:35 PM
Can fake raid be converted to linux software raid? jmacdonald801 Linux - General 3 01-30-2005 12:33 PM
moving system from ide software raid to new box with scsi raid ftumsh Linux - General 0 10-28-2003 09:34 AM
Software SCSI or Hardware IDE on Raid 5? birdy827 Slackware 0 06-22-2003 07:42 AM


All times are GMT -5. The time now is 02:24 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration