View previous topic :: View next topic |
Author |
Message |
j5 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 18 Apr 2005 Posts: 9 Location: Blumenau / SC
|
Posted: Fri Jun 24, 2005 8:23 pm Post subject: Umont Root raid device |
|
|
Hi everyone,
I had a little problem in my new Firewall server: (Software RAID-1 on /)
When i ran the shutdown process, it runs /lib/rcscripts/addon/raid-stop.sh, and then it fails with Device or Resource Busy..
I've tried to put a ps aux; lsof before the mdadm command, but i had just found kernel processes, udevd the the /sbin/rc command...
I've also killed udevd before the shutdown process but the error persists. Then i made some research and Slackware for example doesnt execute any raidtop /dev/md0 or mdadm -S /dev/md0 on the shutdown process.
How i temporary solved the problem? rm /lib/rcscripts/addon/* . But very strange, maybe a design problem ? IMHO, that script shoudn't be in /lib... maybe some script libraries, but not a shutdown process itself.
Sorry my bad english, with best regards...
---
Giovanni F. Moser Frainer _________________ Giovanni |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
R!tman Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/1908578499403a17853e807.gif)
Joined: 18 Dec 2003 Posts: 1303 Location: Zurich, Switzerland
|
Posted: Sat Jul 09, 2005 10:55 pm Post subject: |
|
|
I get the same problem:
Code: | * Unmounting filesystems ... [ ok ]
* Shutting down RAID devices (mdadm) ...
mdadm fail to stop array./dev/md1: Device or resource busy [ !! ]
* Remounting remaining filesystems readonly ... [ ok ] |
No wonder it is busy when it wants to shut down the raid devices before unmounting the filesystem mounted on them.
Can raid devices be shut down at all, if the filesystems are only remounted readonly and not completely unmounted?
Simply removing the files you mentioned seems to be a nasty hack. Isn't there a proper solution to this?
EDIT: I believe this did not occur before the latest version of pam (0.78-r2). |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
richard.scott Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 19 May 2003 Posts: 1497 Location: Oxfordshire, UK
|
Posted: Fri Jul 22, 2005 6:33 pm Post subject: |
|
|
I had the same problem and also noticed I had both madam and raidtools installed.
I uninstalled mdadm and found the problem went away.
I gues its a one or the other kind of thing? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
R!tman Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/1908578499403a17853e807.gif)
Joined: 18 Dec 2003 Posts: 1303 Location: Zurich, Switzerland
|
Posted: Fri Jul 22, 2005 8:29 pm Post subject: |
|
|
richard.scott wrote: | I had the same problem and also noticed I had both madam and raidtools installed.
I uninstalled mdadm and found the problem went away.
I gues its a one or the other kind of thing? |
But I would like to keep mdadm....
There must be a better way! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
richard.scott Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 19 May 2003 Posts: 1497 Location: Oxfordshire, UK
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
R!tman Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/1908578499403a17853e807.gif)
Joined: 18 Dec 2003 Posts: 1303 Location: Zurich, Switzerland
|
Posted: Sat Jul 23, 2005 6:58 am Post subject: |
|
|
Unfortunately, I have only mdadm installed. But what I find very strange is this:
Code: | qpkg -f /lib/rcscripts/addons/raid-stop.sh |
This does not belong to any program. Neither to mdadm nor to raidtools.
I found that out by only installing one of the programs at a time and running the command above. Pretty strange...
EDIT: As the files in /lib/rcscripts/addon/ did not belong to any program, I simply deleted the whole directory. The error message is gone now, but I am not convinced this is the correct way of doing it. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
richard.scott Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 19 May 2003 Posts: 1497 Location: Oxfordshire, UK
|
Posted: Sat Jul 23, 2005 10:45 am Post subject: |
|
|
You could try unmerging both packages (if any are still installed) and re-emerging mdadm and see if that updates the portage database of who own's what.
My problem seems to be because the root partition has not bee unmounted when it try's to stop the raid-array. I can't see any major problem with not having the raid-stop.sh script as each boot seems to be ok with the filesysem being checked at boot up. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
R!tman Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/1908578499403a17853e807.gif)
Joined: 18 Dec 2003 Posts: 1303 Location: Zurich, Switzerland
|
Posted: Sat Jul 23, 2005 10:55 am Post subject: |
|
|
I believe I know the cause of the problem now :
On my computer the files raid-start.sh and raid-stop.sh are, for obvious reasons, not in /lib/rcscripts. They are in /lib64/rcscripts.
I believe that was the cause of the error message. Now, I also get this:
Code: | # qpkg -f /lib64/rcscripts/addons/raid-start.sh
sys-fs/mdadm * |
Probably somehow these files got into /lib instead of /lib64, I believe during the first gentoo installation, and for earlier pam versions, it maybe did not matter that these files were there as there were no error messages .
I consider this solved . Thanks, richard.scott! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
R!tman Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/1908578499403a17853e807.gif)
Joined: 18 Dec 2003 Posts: 1303 Location: Zurich, Switzerland
|
Posted: Sat Jul 23, 2005 11:13 am Post subject: |
|
|
Well, maybe not solved .
Although when I emerge mdadm I get this
Code: | >>> Merging sys-fs/mdadm-1.11.0 to /
--- /etc/
--- /etc/init.d/
>>> /etc/init.d/mdadm
>>> /etc/mdadm.conf
--- /usr/
--- /usr/share/
--- /usr/share/doc/
>>> /usr/share/doc/mdadm-1.11.0/
>>> /usr/share/doc/mdadm-1.11.0/ANNOUNCE-1.11.0.gz
>>> /usr/share/doc/mdadm-1.11.0/TODO.gz
>>> /usr/share/doc/mdadm-1.11.0/INSTALL.gz
--- /usr/share/man/
--- /usr/share/man/man4/
>>> /usr/share/man/man4/md.4.gz
--- /usr/share/man/man5/
>>> /usr/share/man/man5/mdadm.conf.5.gz
--- /usr/share/man/man8/
>>> /usr/share/man/man8/mdadm.8.gz
--- /sbin/
>>> /sbin/mdadm
--- /lib64/
--- /lib64/rcscripts/
>>> /lib64/rcscripts/addons/
>>> /lib64/rcscripts/addons/raid-stop.sh
>>> /lib64/rcscripts/addons/raid-start.sh
>>> Regenerating /etc/ld.so.cache...
>>> sys-fs/mdadm-1.11.0 merged.
>>> Recording sys-fs/mdadm in "world" favorites file... |
there are these two files in /lib/rcscripts/addons. Both do not belong to mdadm.
Simply deleting the directory gets rid of the error message...
Is that an error in the ebuild? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
richard.scott Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 19 May 2003 Posts: 1497 Location: Oxfordshire, UK
|
Posted: Sat Jul 23, 2005 11:30 am Post subject: |
|
|
ah, this explains things a little more:
https://bugs.gentoo.org/show_bug.cgi?id=99611
In answer to why we now see the errors this bug says:
Quote: | it's always done that
the difference is that the older version used to pipe the errors to /dev/null
and ignore the result
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
richard.scott Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 19 May 2003 Posts: 1497 Location: Oxfordshire, UK
|
Posted: Sat Jul 23, 2005 11:32 am Post subject: |
|
|
are you using a 64bit chip?
I don't get the /lib64 directory listed in my setup. I get this:
Code: | >>> Completed installing mdadm-1.11.0 into /var/tmp/portage/mdadm-1.11.0/image/
>>> Merging sys-fs/mdadm-1.11.0 to /
--- /etc/
--- /etc/init.d/
>>> /etc/init.d/mdadm
>>> /etc/mdadm.conf
--- /lib/
--- /lib/rcscripts/
--- /lib/rcscripts/addons/
>>> /lib/rcscripts/addons/raid-stop.sh
>>> /lib/rcscripts/addons/raid-start.sh
--- /usr/
--- /usr/share/
--- /usr/share/doc/
>>> /usr/share/doc/mdadm-1.11.0/
>>> /usr/share/doc/mdadm-1.11.0/ANNOUNCE-1.11.0.gz
>>> /usr/share/doc/mdadm-1.11.0/TODO.gz
>>> /usr/share/doc/mdadm-1.11.0/INSTALL.gz
--- /usr/share/man/
--- /usr/share/man/man4/
>>> /usr/share/man/man4/md.4.gz
--- /usr/share/man/man5/
>>> /usr/share/man/man5/mdadm.conf.5.gz
--- /usr/share/man/man8/
>>> /usr/share/man/man8/mdadm.8.gz
--- /sbin/
>>> /sbin/mdadm
>>> Regenerating /etc/ld.so.cache...
>>> sys-fs/mdadm-1.11.0 merged.
>>> Recording sys-fs/mdadm in "world" favorites file... |
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
R!tman Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/1908578499403a17853e807.gif)
Joined: 18 Dec 2003 Posts: 1303 Location: Zurich, Switzerland
|
Posted: Sat Jul 23, 2005 12:06 pm Post subject: |
|
|
I use the "multilib" use flag. Maybe that is why I have some libs in lib64.
And for the bug report: Do I understand this correct that the error was always there, only it was output to /dev/null?
EDIT: The "WONTFIX" is a little disturbing regarding the bug report . |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Rusty1973 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/1079367708420cbdadee9b1.jpg)
Joined: 20 Jan 2005 Posts: 67 Location: Hamburg Germany
|
Posted: Fri Aug 04, 2006 8:31 am Post subject: Had the same Problem |
|
|
I had the same Problem, that my md1 / wouldn't unmount on shutdown.
I just unemerged mdadm and left raidtools on the system and it works.
Now i only have the Problem Disabling barriers, not supported by the underlying device XFS mounting for filesystem :md2 _________________ I think Linux is able to replace Redmound's Software it is just a matter of time
"Vista just arrived and DRM will take place"
Some years ago it was "FREE KEVIN"
Today it is "FREE THE DESKTOP" |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mgbowman n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/14160078842ed4c833afbd.jpg)
Joined: 31 Jul 2005 Posts: 47
|
Posted: Wed Aug 16, 2006 2:40 pm Post subject: |
|
|
I just recently started exploring the wonderful world of software RAID and have been experiencing the same issues (along with the similar error at bootup). Am I to understand this correctly that the communitity doesn't want to do anything about this? I agree with R!tman with the WONTFIX status being disturbing and know this is a minor issue, but it's just not right.
--mgb _________________ "Computer programs only do what you tell them to do, not what you want them to do." |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
SweepingOar Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/1268684260493dbf970e9d4.jpg)
Joined: 31 Dec 2003 Posts: 263 Location: LA
|
Posted: Fri Jan 19, 2007 9:20 am Post subject: |
|
|
Any action on this issue? I've got the same error on shutdown.
Code: | Stopping syslog-ng ... [ok]
Deactivating swap ... [ok]
Unmounting filesystems ... [ok]
Shutting down RAID devices (mdadm) ... [ok]
mdadm: stopped /dev/md0
mdadm: fail to stop array /dev/md1: Device or resource busy [!!]
Remounting remaining filesystems readonly ... [ok] |
_________________ -SweepingOar |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
MaDDeePee Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/2498918174231e57e13cd5.gif)
Joined: 18 Aug 2004 Posts: 393 Location: Germany
|
Posted: Tue Mar 13, 2007 8:03 pm Post subject: |
|
|
Since Raidtools is gone, i need a solution.
I dont like error messages... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
andretti Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 25 Feb 2007 Posts: 94
|
Posted: Sun Apr 08, 2007 3:01 pm Post subject: |
|
|
Actually why do we need to (or should) stop raid devices before powering the machine off? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
honeymak Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Final Fantasy/Final_Fantasy_8_-_Squall.gif)
Joined: 30 Dec 2002 Posts: 595
|
Posted: Fri May 11, 2007 1:53 am Post subject: |
|
|
i have lvm2 on raid1
/ resides on lvm2
/dev/md0 - consists of /dev/sda1 /dev/sdb1 - /boot - ext3 - raid1
/dev/md1 - consists of /dev/sda2 /dev/sdb2 - swap - raid1
/dev/md2 - consists of /dev/sda3 /dev/sdb3 - / - jfs on lvm2 on raid1
i didn't try the hard way (pipe error to /dev/null)
i see error msg like u guys when shutting down
after a reboot, i can't vgchange/vgdisplay, thus, it does mean something not clean
i just telinit 1
then jfs_fsck on /
it has something to replay
thus it means something not really clean, though it seems not really fs level (every reboot, checkroot reports / is clean)
after that fsck,
telinit 3
i can vgdisplay normally
thus, that busy thing cannot work in /
is this really a bug?
raidtools or pipe to /dev/null is safe? it's a doubt
maybe for the meantime, don't make anything on / ?
just rsync? ohoh
![Rolling Eyes :roll:](images/smiles/icon_rolleyes.gif) _________________ hackers - make sth real
academics - read sth said to be real |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
stuorguk Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/3ebee6c03e22249456ad0.jpg)
Joined: 13 Jan 2003 Posts: 106 Location: UK
|
Posted: Tue Aug 21, 2007 8:20 am Post subject: |
|
|
Any updates to this? I am using Raid1 with Reiser4. Every time I shutdown, the root partition is not being unmounted, and causes problems on boot up. ![Sad :(](images/smiles/icon_sad.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ferg Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/706189951435234094a686.jpg)
Joined: 15 Nov 2002 Posts: 540 Location: Cambridge, UK
|
Posted: Wed Aug 22, 2007 11:00 am Post subject: |
|
|
I've always seen this error, regarding my root partition. I don't see a problem with the error message though. Remember it's still unmounting the filesystem stored on the RAID array and remounting it Read Only, it's just not stopping the RAID array where the filesystem is stored. As long as the filesystem is unmounted then all is well.
I guess if the error message really annoys you then do as Richard.Scott points out about earlier incarnations, and edit the file to pipe the error to /dev/null.
Cheers
Ferg _________________ Climb up it, kayak down it + make sure it runs on GNU/Linux
"cease to exist, giving my goodbye, drive my car into the ocean,
you think I'm dead, but i sail away, on a wave of mutilation!" |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
stuorguk Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/3ebee6c03e22249456ad0.jpg)
Joined: 13 Jan 2003 Posts: 106 Location: UK
|
Posted: Wed Aug 22, 2007 11:11 am Post subject: |
|
|
It's more than just am error message. Every other boot fails, as the drive was not unmounted cleanly. The kernel loads, and then halts until you do a Ctrl-D to restart it again. Second time around it's ok, until the next reboot. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ferg Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/706189951435234094a686.jpg)
Joined: 15 Nov 2002 Posts: 540 Location: Cambridge, UK
|
Posted: Wed Aug 22, 2007 1:30 pm Post subject: |
|
|
stuorguk wrote: | It's more than just am error message. Every other boot fails, as the drive was not unmounted cleanly. The kernel loads, and then halts until you do a Ctrl-D to restart it again. Second time around it's ok, until the next reboot. |
Hi Stuorguk,
I was talking about the original poster's question. Do you have exactly the same issue?
I'm not that familar with Reiserfs, but with Ext2/3 filesystems you only get the CTRL-D single user option when they're are fs errors caused by the unclean shutdown. Otherwise it just checks the filesystem before mounting it rw. Do you always get this is a Resierfs filesystem is not umounted cleanly?
I would reiterate that stopping a raid array is different and much less serious than umounting the filesystem on the raid array.
Cheers
Ferg _________________ Climb up it, kayak down it + make sure it runs on GNU/Linux
"cease to exist, giving my goodbye, drive my car into the ocean,
you think I'm dead, but i sail away, on a wave of mutilation!" |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
snailhead n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 13 Nov 2006 Posts: 5
|
Posted: Sun May 10, 2009 4:39 am Post subject: Umont Root raid device |
|
|
I propose this for raid-stop.sh
Code: | [ -f /proc/mdstat ] || exit 0
# Stop software raid with mdadm if not mounted on root
mdadm_conf="/etc/mdadm/mdadm.conf"
[ -e /etc/mdadm.conf ] && mdadm_conf="/etc/mdadm.conf"
if [ -x /sbin/mdadm -a -f "${mdadm_conf}" ] ; then
ebegin "Shutting down RAID devices (mdadm)"
for i in `ls -t /dev/md` ; do
mounted=`mount | egrep "md${i} on / "`
if [ -n "${mounted}" ] ; then
echo /dev/md${i} is mounted on root and should *not* be stopped
ret=0
fi
if [ -z "${mounted}" ] ; then
active=`cat /proc/mdstat | egrep active | egrep md${i}`
ret=0
if [ -n "${active}" ] ; then
output=$(mdadm -S /dev/md${i})
ret=$?
fi
fi
[ ${ret} -ne 0 ] && echo "${output}" && return=$?
done
eend ${return}
fi
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|