Re: Raid 1, can't get the second disk added back in.

2008-01-09 Thread dean gaudet
On Tue, 8 Jan 2008, Bill Davidsen wrote:

 Neil Brown wrote:
  On Monday January 7, [EMAIL PROTECTED] wrote:

   Problem is not raid, or at least not obviously raid related.  The problem
   is that the whole disk, /dev/hdb is unavailable. 
  
  Maybe check /sys/block/hdb/holders ?  lsof /dev/hdb ?
  
  good luck :-)
  

 losetup -a may help, lsof doesn't seem to show files used in loop mounts. Yes,
 long shot...

and don't forget dmsetup ls... (followed immediately by apt-get remove 
evms if you're on an unfortunate version of ubuntu which helpfully 
installed that partition-stealing service for you.)

-dean
-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Raid 1, can't get the second disk added back in.

2008-01-08 Thread Bill Davidsen

Neil Brown wrote:

On Monday January 7, [EMAIL PROTECTED] wrote:
  
Problem is not raid, or at least not obviously raid related.  The 
problem is that the whole disk, /dev/hdb is unavailable. 



Maybe check /sys/block/hdb/holders ?  lsof /dev/hdb ?

good luck :-)

  
losetup -a may help, lsof doesn't seem to show files used in loop 
mounts. Yes, long shot...


--
Bill Davidsen [EMAIL PROTECTED]
 Woe unto the statesman who makes war without a reason that will still
 be valid when the war is over... Otto von Bismark 



-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Raid 1, can't get the second disk added back in.

2008-01-07 Thread Jim

Neil Brown wrote:

On Saturday January 5, [EMAIL PROTECTED] wrote:
  

[EMAIL PROTECTED]:~# mdadm /dev/md0 --add /dev/hdb5
mdadm: Cannot open /dev/hdb5: Device or resource busy

All the solutions I've been able to google fail with the busy.  There is 
nothing that I can find that might be  using /dev/hdb5 except the raid 
device and it appears it's not either.



Very odd. But something must be using it.

What does
   ls -l /sys/block/hdb/hdb5/holders
show?
What about
   cat /proc/mounts
   cat /proc/swaps
   lsof /dev/hdb5
  
??

NeilBrown
-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  
I agree but for the life of me I can't figure out what, other than some 
raid daemon.


[EMAIL PROTECTED]:~# ls -l /sys/block/hdb/hdb5/holders
total 0
[EMAIL PROTECTED]:~# cat /proc/mounts
none /sys sysfs rw,nosuid,nodev,noexec 0 0
none /proc proc rw,nosuid,nodev,noexec 0 0
udev /dev tmpfs rw 0 0
/dev/disk/by-uuid/4f67dae8-cdcb-460e-86cd-a5f0e4009422 / ext3 
rw,data=ordered 0 0
/dev/disk/by-uuid/4f67dae8-cdcb-460e-86cd-a5f0e4009422 /dev/.static/dev 
ext3 rw,data=ordered 0 0

tmpfs /var/run tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /var/lock tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /dev/shm tmpfs rw 0 0
devpts /dev/pts devpts rw 0 0
usbfs /dev/bus/usb/.usbfs usbfs rw 0 0
udev /proc/bus/usb tmpfs rw 0 0
usbfs /proc/bus/usb/.usbfs usbfs rw 0 0
tmpfs /var/run tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /var/lock tmpfs rw,nosuid,nodev,noexec 0 0
/dev/sda5 /home ext3 rw,data=ordered 0 0
/dev/md0 /backupmirror ext3 rw,data=ordered 0 0
/dev/hda1 /vz ext3 rw,data=ordered 0 0
/vz/private/225 /vz/root/225 simfs rw 0 0
/vz/private/300 /vz/root/300 simfs rw 0 0
/proc /vz/root/225/proc proc rw 0 0
/sys /vz/root/225/sys sysfs rw 0 0
none /vz/root/225/dev/pts devpts rw 0 0
/proc /vz/root/300/proc proc rw 0 0
/sys /vz/root/300/sys sysfs rw 0 0
none /vz/root/300/dev/pts devpts rw 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
[EMAIL PROTECTED]:~# cat /proc/mounts | grep hdb
[EMAIL PROTECTED]:~# cat /proc/swaps
[EMAIL PROTECTED]:~# lsof /dev/hdb5

-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Raid 1, can't get the second disk added back in.

2008-01-07 Thread Jim

Neil Brown wrote:

On Saturday January 5, [EMAIL PROTECTED] wrote:
  

[EMAIL PROTECTED]:~# mdadm /dev/md0 --add /dev/hdb5
mdadm: Cannot open /dev/hdb5: Device or resource busy

All the solutions I've been able to google fail with the busy.  There is 
nothing that I can find that might be  using /dev/hdb5 except the raid 
device and it appears it's not either.



Very odd. But something must be using it.

What does
   ls -l /sys/block/hdb/hdb5/holders
show?
What about
   cat /proc/mounts
   cat /proc/swaps
   lsof /dev/hdb5
  
??

NeilBrown
-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  
Problem is not raid, or at least not obviously raid related.  The 
problem is that the whole disk, /dev/hdb is unavailable. 


[EMAIL PROTECTED]:~# for i in /dev/hdb?
 do
 mount $i /mnt
 done
mount: /dev/hdb1 already mounted or /mnt busy
mount: /dev/hdb2 already mounted or /mnt busy
mount: /dev/hdb3 already mounted or /mnt busy
mount: /dev/hdb4 already mounted or /mnt busy
mount: /dev/hdb5 already mounted or /mnt busy
mount: /dev/hdb6 already mounted or /mnt busy
[EMAIL PROTECTED]:~# mount /dev/hda1 /mnt

I can fdisk it but none of the partitons are available. Knoppix can 
access it normally so it's not a hardware issue.  No funny messages in 
the syslog. So I'll go off and stop harassing this list.  ;)


Thanks,
Jim.
-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Raid 1, can't get the second disk added back in.

2008-01-07 Thread Neil Brown
On Monday January 7, [EMAIL PROTECTED] wrote:
 Problem is not raid, or at least not obviously raid related.  The 
 problem is that the whole disk, /dev/hdb is unavailable. 

Maybe check /sys/block/hdb/holders ?  lsof /dev/hdb ?

good luck :-)

NeilBrown
-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Raid 1, can't get the second disk added back in.

2008-01-06 Thread Jim

Nagilum wrote:



Since /dev/hdb5 has been part of this array before you should use 
--re-add instead of --add.

Kind regards,
Alex.


OK

[EMAIL PROTECTED]:~# mdadm  /dev/md0 --re-add /dev/hdb5
mdadm: Cannot open /dev/hdb5: Device or resource busy

Jim
-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Raid 1, can't get the second disk added back in.

2008-01-06 Thread Nagilum

- Message from [EMAIL PROTECTED] -
Date: Sun, 06 Jan 2008 06:13:06 -0500
From: Jim [EMAIL PROTECTED]


[EMAIL PROTECTED]:~# mdadm  /dev/md0 --re-add /dev/hdb5
mdadm: Cannot open /dev/hdb5: Device or resource busy


Have you tried stopping (-S) /dev/md0 and then re-assemble the array (-A)?



#_  __  _ __ http://www.nagilum.org/ \n icq://69646724 #
#   / |/ /__  _(_) /_  _  [EMAIL PROTECTED] \n +491776461165 #
#  // _ `/ _ `/ / / // /  ' \  Amiga (68k/PPC): AOS/NetBSD/Linux   #
# /_/|_/\_,_/\_, /_/_/\_,_/_/_/_/   Mac (PPC): MacOS-X / NetBSD /Linux #
#   /___/ x86: FreeBSD/Linux/Solaris/Win2k  ARM9: EPOC EV6 #




cakebox.homeunix.net - all the machine one needs..



pgpRdoUuWn4nt.pgp
Description: PGP Digital Signature


Re: Raid 1, can't get the second disk added back in.

2008-01-06 Thread Jim

Nagilum wrote:

- Message from [EMAIL PROTECTED] -
Date: Sun, 06 Jan 2008 06:13:06 -0500
From: Jim [EMAIL PROTECTED]


[EMAIL PROTECTED]:~# mdadm  /dev/md0 --re-add /dev/hdb5
mdadm: Cannot open /dev/hdb5: Device or resource busy


Have you tried stopping (-S) /dev/md0 and then re-assemble the array 
(-A)?
Yes, I did that yesterday.  Something is holding on to /dev/hdb5, 'cause 
I got the device busy message from that attempt too.  I think I'm going 
to remove the partition and see what happens.


Thanks,
Jim.
-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Raid 1, can't get the second disk added back in.

2008-01-06 Thread Neil Brown
On Saturday January 5, [EMAIL PROTECTED] wrote:
 
 Since /dev/hdb5 has been part of this array before you should use  
 --re-add instead of --add.
 Kind regards,
 Alex.

That is not correct.

--re-add is only needed for arrays without metadata, for which you use
--build to start them.

NeilBrown
-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Raid 1, can't get the second disk added back in.

2008-01-06 Thread Neil Brown
On Saturday January 5, [EMAIL PROTECTED] wrote:
 [EMAIL PROTECTED]:~# mdadm /dev/md0 --add /dev/hdb5
 mdadm: Cannot open /dev/hdb5: Device or resource busy
 
 All the solutions I've been able to google fail with the busy.  There is 
 nothing that I can find that might be  using /dev/hdb5 except the raid 
 device and it appears it's not either.

Very odd. But something must be using it.

What does
   ls -l /sys/block/hdb/hdb5/holders
show?
What about
   cat /proc/mounts
   cat /proc/swaps
   lsof /dev/hdb5
  
??
NeilBrown
-
To unsubscribe from this list: send the line unsubscribe linux-raid in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Raid 1, can't get the second disk added back in.

2008-01-05 Thread Nagilum

- Message from [EMAIL PROTECTED] -
Date: Sat, 05 Jan 2008 11:05:00 -0500
From: Jim [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
 Subject: Raid 1, can't get the second disk added back in.
  To: linux-raid@vger.kernel.org



Sometime in the distant past, I lost a member of my raid 1 group.
Here's some output:

[EMAIL PROTECTED]:~# mdadm /dev/md0 --add /dev/hdb5
mdadm: Cannot open /dev/hdb5: Device or resource busy
[EMAIL PROTECTED]:~# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 hda5[1]
 93771264 blocks [2/1] [_U]

unused devices: none
[EMAIL PROTECTED]:~# cat /etc/mdadm.conf
DEVICE /dev/hdb5 /dev/hda5
ARRAY /dev/md0 level=raid1 num-devices=2

[EMAIL PROTECTED]:~# fdisk -l /dev/hdb

Disk /dev/hdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot  Start End  Blocks   Id  System
/dev/hdb1   1 973 7815591   83  Linux
/dev/hdb2 9741946 7815622+  83  Linux
/dev/hdb319472919 7815622+  83  Linux
/dev/hdb42920   14593937714055  Extended
/dev/hdb52920   1459393771373+  83  Linux
[EMAIL PROTECTED]:~# fdisk -l /dev/hda

Disk /dev/hda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot  Start End  Blocks   Id  System
/dev/hda1   *   1 973 7815591   83  Linux
/dev/hda2 9741946 7815622+  83  Linux
/dev/hda319472919 7815622+  83  Linux
/dev/hda42920   14593937714055  Extended
/dev/hda52920   1459393771373+  83  Linux

I attempted to boot single user mode and fsck /dev/hdb5 but single user
doesn't seem to do what it used to, for some reason /dev/md0 was
mounted.  However I did boot Knoppix CD and do a fsck -f /dev/hdb5.  It
had no errors and when I rebooted back it still wouldn't install.

I've searched the documentation and pretty much anything I try ends up
with a Cannot open /dev/hdb5: Device or resource busy message.

Here's what mount says:
/dev/sda3 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda5 on /home type ext3 (rw)
/dev/md0 on /backupmirror type ext3 (rw)
/dev/hda1 on /vz type ext3 (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

from dmesg:
md: md0 stopped.
md: bindhdb5
md: bindhda5
md: kicking non-fresh hdb5 from array!
md: unbindhdb5
md: export_rdev(hdb5)
raid1: raid set md0 active with 1 out of 2 mirrors

And :
mdadm --detail /dev/md0
/dev/md0:
   Version : 00.90.03
 Creation Time : Fri Feb 23 15:03:40 2007
Raid Level : raid1
Array Size : 93771264 (89.43 GiB 96.02 GB)
   Device Size : 93771264 (89.43 GiB 96.02 GB)
  Raid Devices : 2
 Total Devices : 1
Preferred Minor : 0
   Persistence : Superblock is persistent

   Update Time : Sat Jan  5 10:45:47 2008
 State : clean, degraded
Active Devices : 1
Working Devices : 1
Failed Devices : 0
 Spare Devices : 0

  UUID : d01d66b4:16efa6c2:d7493088:59f3fe68
Events : 0.28752

   Number   Major   Minor   RaidDevice State
  0   000  removed
  1   351  active sync   /dev/hda5


- End message from [EMAIL PROTECTED] -

Since /dev/hdb5 has been part of this array before you should use  
--re-add instead of --add.

Kind regards,
Alex.


#_  __  _ __ http://www.nagilum.org/ \n icq://69646724 #
#   / |/ /__  _(_) /_  _  [EMAIL PROTECTED] \n +491776461165 #
#  // _ `/ _ `/ / / // /  ' \  Amiga (68k/PPC): AOS/NetBSD/Linux   #
# /_/|_/\_,_/\_, /_/_/\_,_/_/_/_/   Mac (PPC): MacOS-X / NetBSD /Linux #
#   /___/ x86: FreeBSD/Linux/Solaris/Win2k  ARM9: EPOC EV6 #




cakebox.homeunix.net - all the machine one needs..



pgpdYCCG6cBuv.pgp
Description: PGP Digital Signature