March 17, 200818 yr Telnet into the unRaid server cd /mnt/diskX Now, from a web browser, try to stop the array. This will fail because the shell is holding one of the disks from being unmounted. However, the other disks will unmount, and the GUI will report the other disks as "unformatted". I'm guessing other operations (inflight read/write?) might be able to cause the same problem. Haven't tried doing any write-accesses to the disk yet to see if it corrupts parity - I'm assuming it wouldn't, but too scared to try
March 17, 200818 yr This was in 4.2.x as well. I always just had to remember to stop using the disk shares in my consoles before hitting stop.
March 17, 200818 yr Actually this "problem" has been around since day 1. Probably will also happen if you have an open ftp session and you try to Stop the array... Need to think about best way to fix this. BTW, we've been ignoring this issue because most customers never see it - only advanced users who do stuff via shell - and you guys should know better than to leave a shell chdir'ed into a mounted disk directory
March 17, 200818 yr Yeah I never bothered posting about it because it didn't really bother me. If I did it, then I'd just change dir and then hit stop again. No big hassle. I'm not too sure what would happen, but if you implemented the checkbox to ensure the user really wanted to stop the array, you could use that as a checkbox to ensure the user was happy for force the unmount as well. I'm not up-to-scratch on what happens to a console dir'd into a disk mount if it was force unmounted (if you can do that).
March 18, 200818 yr Author Its definitely minor, especially if samba can't hold the mount. If you felt like it, a better status indicator (versus saying unformatted) would be nice - I'd imagine a 'robust' solution would be hard since you can't know the unmount will fail in advance, and remounting everything might not be wise....
March 18, 200818 yr fuser available in unRAID? (sorry just finally getting around to building my server so I haven't actually starting running unraid yet. ) If so I could hack something together quick and easy that would throw an error if there was process holding open the mount.
March 18, 200818 yr Well again I don't have unraid so I haven't tested it there, but this should get you the process(es) that have a hold on the mount. for i in $(fuser -cu /filesystem 2>/dev/null]); do ps -ef | grep $i | grep -v -e grep -e ps;done fuser output is odd, notice that it treats some of it as stderr??!? Only the pids get treated as stdout. No idea why, but it makes for a simple loop Hopefully will get unraid setup this weekend I'll see what i can hack together, but from the above you could use awk to grab the pid, process name, or ppid and follow it up the chain, and do some sort of a quick check to make sure nothing has a hold of the mount.
March 18, 200818 yr S'more food for thought. I found the need to check /mnt/disk* and /mnt/user Anywhere here is my shell derived from above. Hope this helps you get closer to a solution. Rob. rroot@unraid:/mnt/disk1# cat /boot/fuser.sh #!/bin/sh for fs in /mnt/user /mnt/disk* do if [ ! -d ${fs} ] ; then continue ; fi echo fuser -cu $fs for pid in $(fuser -cu $fs 2>/dev/null) do echo ps --no-headers -fp ${pid} ps --no-headers -fp ${pid} done done And the output root@unraid:/mnt/user/images# cd /mnt/user root@unraid:/mnt/user/images# /boot/fuser.sh fuser -cu /mnt/user ps --no-headers -fp 23186 root 23186 23185 0 10:22 pts/1 00:00:00 -bash ps --no-headers -fp 30966 root 30966 23186 0 12:56 pts/1 00:00:00 /bin/sh /boot/fuser.sh ps --no-headers -fp 30967 fuser -cu /mnt/disk1 fuser -cu /mnt/disk2 root@unraid:/mnt/user/images# cd /mnt/disk1 root@unraid:/mnt/disk1# /boot/fuser.sh fuser -cu /mnt/user fuser -cu /mnt/disk1 ps --no-headers -fp 23186 root 23186 23185 0 10:22 pts/1 00:00:00 -bash ps --no-headers -fp 30976 root 30976 23186 0 12:57 pts/1 00:00:00 /bin/sh /boot/fuser.sh ps --no-headers -fp 30979 fuser -cu /mnt/disk2
March 19, 200818 yr Just adding +1 to the number of users that live with this "problem", well +4 if you consider I run 4 Unraid servers I would also be happy to see a solution to this, I run quite a few mapped drives and pretty much always have problems on reboots. Mark.
March 24, 200818 yr Had to do another reboot and disk4 is persistently stating it is unformatted. Please resolve the issue soon ad this is very stressful. All my music is on that HDD and I'm dreading the idea of re-ripping all my CDs. Mark.
March 24, 200818 yr I updated to the latest beta version unRAID Server 4.3-beta3 and my disk number 5 showed needing to be formated, so i went back to version 4.2.3 and drive 5 is just fine. Any ideas?
March 24, 200818 yr Exactly the same for me, except disk4. What I did was:- Telnet into the server. samba stop [all your shares will disappear from network] umount /dev/mdX ['X' corresponds to disk number X=1 for Disk1 etc] reiserfsck /dev/mdX [answer 'Yes' to prompt to check] Once check completed the index had been corrected and all was ok, but if any errors had been found I would have:- reiserfsck --fix-fixable /dev/mdX [answer 'Yes' to prompt to fix] Once completed mount /dev/mdX /mnt/diskX [important to match up the 'md1' with 'disk1', 'md2' with 'disk2', etc.] samba start [all shares should again be visible, but in my case I had to reboot to see them That should fix it. Hope this helps, Mark.
March 26, 200818 yr Thanks that fixed it! You're welcome, all I did was follow the file checking how-to instructions in this thread. http://lime-technology.com/forum/index.php?topic=463.0 Mark.
Archived
This topic is now archived and is closed to further replies.