LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-10-2011, 11:00 AM   #1
satoshi
LQ Newbie
 
Registered: Sep 2011
Posts: 1

Rep: Reputation: Disabled
RAID 1 - Unable to remove a disk from an array


Hi there,

I'm trying to remove a disk from an array but I get a device busy error.

Code:
# mdadm --fail /dev/md2 /dev/sdd2
mdadm: set /dev/sdd2 faulty in /dev/md2
# mdadm --remove /dev/md2 /dev/sdd2
mdadm: hot remove failed for /dev/sdd2: Device or resource busy
The strange thing is that if a remove the /dev/sdd2 partition using fdisk and then I restart the server, the /dev/md2 RAID partition disappears. But when I create the /dev/sdd2 partition again and I restart the server, the /dev/md2 partition appears again (and the /dev/sdd2 is still busy).

Any help is really appreciated.

Some useful information:

cat /etc/mdadm.conf
Code:
(... comments...)
ARRAY /dev/md1 level=raid1 num-devices=4 UUID=f05a1031:ad1bd9fe:a4d2adc2:26fd5302
cat /proc/mdstat
Code:
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath] [faulty]
md1 : active raid1 sdd1[3] sdc1[2] sdb1[1] sda1[0]
      6142912 blocks [4/4] [UUUU]

md2 : active raid1 sdd2[3]
      1048512 blocks [4/1] [___U]

unused devices: <none>
mdadm --detail --scan
Code:
ARRAY /dev/md/2_0 metadata=0.90 UUID=56e4c700:1889447e:34b941fd:060f7980
ARRAY /dev/md1 metadata=0.90 UUID=f05a1031:ad1bd9fe:a4d2adc2:26fd5302
mount
Code:
rootfs on / type rootfs (rw)
/dev/root on / type ext4 (rw,relatime,errors=remount-ro,user_xattr,acl,barrier=1,data=ordered)
proc on /proc type proc (rw,relatime)
rc-svcdir on /lib64/rc/init.d type tmpfs (rw,nosuid,nodev,noexec,relatime,size=1024k,mode=755)
sysfs on /sys type sysfs (rw,relatime)
/dev on /dev type devtmpfs (rw,relatime,size=4046860k,nr_inodes=1011715,mode=755)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime)
nfsd on /proc/fs/nfsd type nfsd (rw,nosuid,nodev,noexec,relatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
fdisk -l
Code:
Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00081621

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            4096    12290048     6142976+  fd  Linux raid autodetect
/dev/sdb2        12290049    14387200     1048576   fd  Linux raid autodetect

Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00061093

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        4096    12290048     6142976+  fd  Linux raid autodetect
/dev/sda2        12290049    14387200     1048576   fd  Linux raid autodetect

Disk /dev/sdd: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c5988

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1            4096    12290048     6142976+  fd  Linux raid autodetect
/dev/sdd2        12290049    14387200     1048576   fd  Linux raid autodetect

Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000a2f73

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            4096    12290048     6142976+  fd  Linux raid autodetect
/dev/sdc2        12290049    14387200     1048576   fd  Linux raid autodetect

Disk /dev/md2: 1073 MB, 1073676288 bytes
2 heads, 4 sectors/track, 262128 cylinders, total 2097024 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md2 doesn't contain a valid partition table

Disk /dev/md1: 6290 MB, 6290341888 bytes
2 heads, 4 sectors/track, 1535728 cylinders, total 12285824 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md1 doesn't contain a valid partition table
uname -r
Code:
gentoo-2.6.39-hardened-r8-xxxx-std-64
 
Old 09-15-2011, 12:09 AM   #2
ranelson
LQ Newbie
 
Registered: Jan 2005
Posts: 8

Rep: Reputation: 0
you can not remove the ONLY disk in an array

mdadm will use a faulty disk before accepting NO disk
 
  


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
[SOLVED] Unable to grow a raid 5 array horde Linux - Server 1 09-14-2009 07:40 AM
Unable to access RAID array from CentOS5 marcdbl Linux - Server 2 04-07-2009 02:30 AM
How access disk from raid 1 (mirror) array Dlinny Linux - Server 13 02-02-2009 11:29 AM
How to create an initial raid 5 array with 2 disk? metabaron Linux - General 2 12-09-2006 05:54 PM
Unable to Mount NTFS RAID O Array lpboarder23 SUSE / openSUSE 1 03-14-2006 04:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:12 AM.

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