LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-21-2008, 05:36 PM   #1
alirezan1
Member
 
Registered: Nov 2004
Location: Vancouver
Distribution: Ubunty, CentOS ,Mandriva, Gentoo, RedHat, Fedora, Knoppix
Posts: 150

Rep: Reputation: 15
Mount takes forever and Linux crashes?


hi guys,

okay, am creating a RAID0 array though a BASH script. After the RAID is created, I want to mount the md device created but as soon as I try to do this, mount takes forever, and when I look at the "top", my script keeps duplicating like crazy and eventually the machine goes down. dmesg doesn't show much except once and only once it said: ./script1: Out of Memory or something along that line...

But funny thing is, I can mount it manually with no problem. Any ideas?

Thanks
 
Old 10-21-2008, 05:39 PM   #2
Total-MAdMaN
Member
 
Registered: May 2008
Distribution: Gentoo
Posts: 306

Rep: Reputation: 34
Post the script.
 
Old 10-21-2008, 05:52 PM   #3
alirezan1
Member
 
Registered: Nov 2004
Location: Vancouver
Distribution: Ubunty, CentOS ,Mandriva, Gentoo, RedHat, Fedora, Knoppix
Posts: 150

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Total-MAdMaN View Post
Post the script.
Thanks for the reply. The script is huge and I can't post it here. Here's the function that does what I just said:
Quote:
function create_raid0 {
md_dev="/dev/md$6"
command=`$S_PATH/redundancy -setup $md_dev 0 2 /dev/$vgname_a/$1 /dev/$vgname_b/$1`
if [ $? -eq 0 ]; then
echo "RAID 0 array started successfully with /dev/$vgname_a/$1 /dev/$vgname_b/$1"
echo "Checking the MOUNT"
mnt=`mount $md_dev /mnt/raid`
if [ $? -eq 0 ]; then
echo "Mounted successfully"
else
echo "Not mounted"
fi
exit
else
echo "Unable to start RAID 0 array with /dev/$vgname_a/$1 /dev/$vgname_b/$1"
exit 1
fi
}
It sets up RAID0 on top of LVM.

It sets up the raid successfully and it even prints "Checking the MOUNT" but then it goes crazy after that. One more thing, I tried doing: mnt=`mount /dev/md1 /mnt/raid` just to see if it just doesn't like variables, but still same thing...

thanks

Last edited by alirezan1; 10-21-2008 at 05:55 PM.
 
Old 10-21-2008, 06:05 PM   #4
alirezan1
Member
 
Registered: Nov 2004
Location: Vancouver
Distribution: Ubunty, CentOS ,Mandriva, Gentoo, RedHat, Fedora, Knoppix
Posts: 150

Original Poster
Rep: Reputation: 15
when I call this function, here's the output:

Quote:
CREATING RAID
mdadm: /dev/RBkJ6XJ4/rbn1 appears to contain an ext2fs file system
size=2097152K mtime=Thu Jan 1 00:00:00 1970
mdadm: /dev/RBkJ6XJ4/rbn1 appears to be part of a raid array:
level=raid0 devices=2 ctime=Sat Jan 1 00:42:18 2000
mdadm: /dev/RBbKfhEz/rbn1 appears to contain an ext2fs file system
size=2097152K mtime=Thu Jan 1 00:00:00 1970
mdadm: /dev/RBbKfhEz/rbn1 appears to be part of a raid array:
level=raid0 devices=2 ctime=Sat Jan 1 00:42:18 2000
Continue creating array? mdadm: array /dev/md1 started.
RAID 0 array started successfully with /dev/RBkJ6XJ4/rbn1 /dev/RBbKfhEz/rbn1
Checking the MOUNT
and then it freezes and goes all crazy...

I replaced my other function call with correct MDADM call:

Quote:
md_dev="/dev/md$6"
# command=`$S_PATH/redundancy -setup $md_dev 0 2 /dev/$vgname_a/$1 /dev/$vgname_b/$1`
echo "CREATING RAID"
command=`echo y | mdadm --create $md_dev --level=0 --raid-devices=2 /dev/$vgname_a/$1 /dev/$vgname_b/$1`
if [ $? -eq 0 ]; then
echo "RAID 0 array started successfully with /dev/$vgname_a/$1 /dev/$vgname_b/$1"
echo "Checking the MOUNT"
mnt=`mount /dev/md1 /mnt/raid`
if [ $? -eq 0 ]; then
echo "Mounted successfully"
else
echo "Not mounted successfully"
fi
exit
else
echo "Unable to start RAID 0 array with /dev/$vgname_a/$1 /dev/$vgname_b/$1"
exit 1
fi
}
Thanks!
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
nfs mount takes forever muddywaters Linux - Networking 3 04-29-2006 01:13 AM
Using SuSe Linux, Takes forever running Office Program dragonhawk7 Linux - Newbie 9 04-18-2006 08:11 AM
Ubuntu won't automount, manual mount takes forever leupi Linux - Networking 1 01-22-2006 05:36 PM
SMB4k crashes/hangs/takes forever/wont refresh network bemused0 Linux - Networking 2 07-17-2005 01:42 AM
my iBook takes forever to ssh into my linux boxes johnson_steve Other *NIX 2 06-06-2005 12:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:47 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration