LinuxQuestions.org
Help answer threads with 0 replies.
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 07-09-2013, 01:50 PM   #1
karthik-naren
LQ Newbie
 
Registered: Jun 2013
Posts: 16

Rep: Reputation: 0
unable to unmount raid array or unable to stop raid array


i have created three raid enabled partitions
sda{8,9,10,11}

partprobe

mdadm -C /dev/md0 -n4 /dev/sda{8,9,10,11} -l5

mkfs.ext3 /dev/md0

mkdir /raid

mount /dev/md0 /raid

vi /etc/fstab

mount -a

cp -rvf /lib /raid

cd /raid

dd if=/dev/zero of=bingo bs=1024 count=100000


mdadm -f /dev/md0 /dev/sda10

mdadm -D /dev/md0

Code:
/dev/md0:
        Version : 0.90
  Creation Time : Tue Jul  9 21:47:31 2013
     Raid Level : raid5
     Array Size : 602112 (588.10 MiB 616.56 MB)
  Used Dev Size : 200704 (196.03 MiB 205.52 MB)
   Raid Devices : 4
  Total Devices : 4
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Tue Jul  9 22:25:50 2013
          State : clean, degraded
 Active Devices : 3
Working Devices : 3
 Failed Devices : 1
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 64K

           UUID : 2fb404f1:e83d88da:a2724c44:4c722220
         Events : 0.4

    Number   Major   Minor   RaidDevice State
       0       8        8        0      active sync   /dev/sda8
       1       8        9        1      active sync   /dev/sda9
       2       0        0        2      removed
       3       8       11        3      active sync   /dev/sda11

       4       8       10        -      faulty spare   /dev/sda10
watch cat /proc/mdstat

mdadm -r /dev/md0 /dev/sda10

mdadm -D /dev/md0

Code:
/dev/md0:
        Version : 0.90
  Creation Time : Tue Jul  9 21:47:31 2013
     Raid Level : raid5
     Array Size : 602112 (588.10 MiB 616.56 MB)
  Used Dev Size : 200704 (196.03 MiB 205.52 MB)
   Raid Devices : 4
  Total Devices : 3
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Tue Jul  9 22:30:03 2013
          State : clean, degraded
 Active Devices : 3
Working Devices : 3
 Failed Devices : 0
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 64K

           UUID : 2fb404f1:e83d88da:a2724c44:4c722220
         Events : 0.6

    Number   Major   Minor   RaidDevice State
       0       8        8        0      active sync   /dev/sda8
       1       8        9        1      active sync   /dev/sda9
       2       0        0        2      removed
       3       8       11        3      active sync   /dev/sda11
fdisk /dev/sda
partprobe
fdisk -l
mkfs.ext3 /dev/sda12


mdadm -a /dev/md0 /dev/sda12

mdadm -D /dev/md0

Code:
/dev/md0:
        Version : 0.90
  Creation Time : Tue Jul  9 21:47:31 2013
     Raid Level : raid5
     Array Size : 602112 (588.10 MiB 616.56 MB)
  Used Dev Size : 200704 (196.03 MiB 205.52 MB)
   Raid Devices : 4
  Total Devices : 4
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Tue Jul  9 22:36:21 2013
          State : clean
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 64K

           UUID : 2fb404f1:e83d88da:a2724c44:4c722220
         Events : 0.8

    Number   Major   Minor   RaidDevice State
       0       8        8        0      active sync   /dev/sda8
       1       8        9        1      active sync   /dev/sda9
       2       8       12        2      active sync   /dev/sda12
       3       8       11        3      active sync   /dev/sda11
As I try to unmount,stop raid array this is the message i get

umount /raid

Code:
umount: /raid: device is busy
umount: /raid: device is busy
mdadm -S /dev/md0

Code:
mdadm: fail to stop array /dev/md0: Device or resource busy
Perhaps a running process, mounted filesystem or active volume group?
 
Old 07-09-2013, 02:14 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 19,321

Rep: Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470
Quote:
Originally Posted by karthik-naren View Post
i have created three raid enabled partitions sda{8,9,10,11}


As I try to unmount,stop raid array this is the message i get
umount /raid
Code:
umount: /raid: device is busy
umount: /raid: device is busy
mdadm -S /dev/md0

Code:
mdadm: fail to stop array /dev/md0: Device or resource busy
Perhaps a running process, mounted filesystem or active volume group?
Ok...so what's the problem? There's obviously a process/user that is accessing the mounted file system. So, either stop the process or log the user off.
 
1 members found this post helpful.
Old 07-09-2013, 02:25 PM   #3
karthik-naren
LQ Newbie
 
Registered: Jun 2013
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by TB0ne View Post
Ok...so what's the problem? There's obviously a process/user that is accessing the mounted file system. So, either stop the process or log the user off.

iam a newbie
could you please give detailed explaination.
i have logged in as root.

Last edited by karthik-naren; 07-09-2013 at 02:32 PM.
 
Old 07-09-2013, 02:54 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 19,321

Rep: Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470
Quote:
Originally Posted by karthik-naren View Post
iam a newbie
could you please give detailed explaination.
Not much more detail to add. As said, you cannot unmount a file system if something/someone is accessing it. So, either find the process that's accessing the disk, or make sure no one else is logged in. Since you've got the file system mounted as /raid, run "lsof /raid". That will list all the open files on that file system. The second column is the PID you need to kill if you want to unmount the file system.

If you have a terminal window open and you're in the /raid path somewhere, type in "cd /".
Quote:
i have logged in as root.
...which is NEVER a good idea, unless you're doing something that specifically requires it. Only log in as root sparingly, and use sudo whenever possible.
 
1 members found this post helpful.
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to boot from degraded RAID array? sailor420 Linux - Hardware 3 02-18-2012 08:33 AM
RAID 1 - Unable to remove a disk from an array satoshi Linux - Server 1 09-15-2011 01:09 AM
[SOLVED] Unable to grow a raid 5 array horde Linux - Server 1 09-14-2009 08:40 AM
Unable to access RAID array from CentOS5 marcdbl Linux - Server 2 04-07-2009 03:30 AM
Unable to Mount NTFS RAID O Array lpboarder23 SUSE / openSUSE 1 03-14-2006 05:29 PM

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

All times are GMT -5. The time now is 04:04 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration