Jump to content
  • 0

Clean Pool Shutdown



A little backstory first :)

I have two drivepools on my server.  My main drivepool (E:) contains drives in two 8 bay usb enclosures and is roughly 80tb.  My second drivepool (Z:) is 48 4tb drives in two 24 bay jbods that are connected to my server via HD MiniSAS cables connected to an internal HBA.  The second drive pool is meant to be used as a backup destination for my primary drivepool.

The 24 bay JBODs are VERY loud, even when I have turned their fans all the way down.  They are server grade equipment, so they are built well and designed to keep the drives cool (at the expense of our ears :D )  

I am in the process of writing a script which will run nightly while we are asleep to do the following -

  • power on both JBODs (which will cause the second drive pool to automatically appear in the OS once all of the disks are back online)
  • Robocopy mirror each disk from the main drivepool to it's respective folder on the second drive pool (IE f: -> z:\f\; g: -> z:\g\; etc)
  • Once all Robocopies have finished, gracefully shut down the second drivepool (THIS IS THE PART I'M NOT SURE HOW TO DO)
  • power off both JBODs (saving on energy and lessening the ambient noise in our house)

I'm pretty sure If i just power off both JBODs after the robocopies have finished when the JBODs power on the next time they will need to re-measure and check the pool.  I am worried that if they are in the process of doing this when the next Robocopy finishes and the JBODs are powered off again that there may be corruption in the pool.

I should probably mention that both pools have no duplication settings, and the primary pool has balancing turned off (mostly to limit the amount of writing that has to happen to the secondary drive pool, I am not firmly set that this is necessary at this point, but that's how it's set up at the moment).

Is there a way to gracefully shutdown or take offline a drivepool via the command line?  I have done some reading on dpcmd, but i'm not sure if any of it's commands would work.  I'm thinking maybe ignoring all poolparts at the end of my script, and adding the pool parts back in at the beginning of my script might work, but wanted to reach out to the professionals before I tinker with it too much... :)

TIA for any help / suggestions you can provide :D

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

A less than ideal solution would be for me to use the DrivePool_RunningFile advanced setting and have my script watch for the the file to no longer exist before shutting down the jbods, that might work.  But I would much rather gracefully take the pool down/offline and prevent the need to re-measure each night if possible.

Link to comment
Share on other sites

  • 0

Did some looking. AFAICT there's no official DP method (command-line or GUI) to gracefully offline a pool. Tagging @Christopher (Drashna) ?

What I have so far found seems to work, with a bit of experimentation today, was the following:

1. Ensure that all relevant poolpart volumes appear to Windows as ejectable drives, then set the override for CoveFs_IsDiskRemovable to true and restart Windows; the pool drive composed from those volumes should now itself show up as an ejectable drive (but doing so via the Windows GUI will just have DrivePool immediately redetect and remount the pool).

2. In your batch file the command diskpart /s scriptfile.txt should now* be usable to take the pool offline where scriptfile.txt is the name of the file containing the following text (replacing pooldriveletter with the letter of your pool drive):

   SELECT VOLUME pooldriveletter

3. If the command was successful then the errorlevel for the diskpart command should be zero (if you need to check for that in your script) and the designated pool should gracefully disappear from DrivePool; you should then be able to eject / depower the relevant physical drives.

I might still recommend using DrivePool_RunningFile to ensure that DrivePool isn't in the middle of any maintenance operations, as I don't know if interrupting those in this manner would cause DrivePool to want to recheck the pool, but if you find it doesn't then I guess it won't be needed!

How are you scripting the JBODs to power on/off?

*I found that using diskpart to offline a non-removable pool drive would sometimes crash diskpart/drivepool/windows so I don't recommend trying that.

Link to comment
Share on other sites

  • 0

This is fantastic!  Thank you for the speedy and detailed reply.  I'm going to test this out and get back to you on how it works :)

As far as how I am shutting down and powering on the JBODs, they are SuperMicro server grade JBODs which have IPMI cards built in.  I am using IPMItool. :)

Link to comment
Share on other sites

  • 0

@Shane - Any suggestions on how to go about making #1 from your list happen?  The disks for my backup pool are connected to the tower via minisas cables to an HBA, so as far as windows is concerned they are internal devices :(. My googling thus far hasn't been super helpful... I guess there used to be a registry key that could be set to force windows to treat internal drives as external, but windows took it away.



Link to comment
Share on other sites

  • 0

Windows obtains the removability status from the hardware, so I'd suggest checking the documentation for the HBA to see if there's a internal setting or manufacturer utility to mark the drives/buses as hot-pluggable.

(There did indeed used to be such a key and yeah Microsoft removed it for their ineffable reasons.)

You might also try this piece of software http://mt-naka.com/hotswap/index_enu.htm as it does have command line functionality - but it may not support your hardware. Also, disclaimer, I haven't tried it myself; proceed with caution.

Link to comment
Share on other sites

  • 0

ok, I tried using hotswap!.exe to safely "eject" all 48 drives that make up my backup drivepool.  I then shut down both JBODs, waited 10 minutes and turned them back on.

All 48 drives came back online fine, and my backup drivepool came back online, but it needed to be measured and checked.

When it is done checking (it's been a little over an hour and it's only 50% done) I'm going to try something similar, but ejecting the drive letter of the backup drivepool instead of the individual drives.  we'll see how that goes :D

I'm starting to feel like the best path forward will be to use the DrivePool_RunningFile setting, and just let it measure and check every night while it's doing it's backup.

The question then is - Do I need to worry about the longevity of the disks that make up my backup drivepool?  Does measuring and checking the disks every day cause unnecessary wear and tear?

Again, thanks so much for your help!


Link to comment
Share on other sites

  • 0

There would be some extra wear, but honestly I think not much. Maybe vaguely comparable to doing a chkdsk of every drive (without checking for bad sectors)? If you're using enterprise/NAS drives I would expect it to be a drop in a bucket kind of situation.

Since hotswap!.exe appears to work to eject your drives but DP still does a re-measure, I'd suggest enabling CoveFs_IsDiskRemovable and then adding the DISKPART script to see if that works, e.g.:

  1. DrivePool_RunningFile check to ensure nothing is running
  2. stop the stablebit drivepool service to ensure nothing begins running
  3. DISKPART script to offline the relevant pool drive (log the errorlevel - if it's reliably zero and stable, keep using it)
  4. hotswap!.exe to eject the relevant poolpart drives
  5. restart the stablebit drivepool service
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...