Jump to content

Shutting down UnRaid

LAazsx

Hi guys,

 

I'm planning on setting up a 2 staff 1 pc  with unraid. My problem is that we cut the power after every work day, which means the pc has to be turned off. is there a way to properly shutdown unraid from within the vm without going through the webui? 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Why would you need to cut the power when leaving?

when not in use the server could not be consuming so much power as to make it a problem so the best soulution is just to let it stay on all the time.

Otherwise can't you just put the unraid server on a UPS and tell it to send the shutdown message to the server when the power is cut?

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, bjotte said:

Why would you need to cut the power when leaving?

 

 

because the boss wants it that way. ?‍♂️

 

 

 

4 minutes ago, bjotte said:

 

Otherwise can't you just put the unraid server on a UPS and tell it to send the shutdown message to the server when the power is cut?

 

 

nice idea but it will only accelerate the wear on the battery.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, LAazsx said:

because the boss wants it that way. ?‍♂️

 

 

 

nice idea but it will only accelerate the wear on the battery.

 

 

Well those are your two options.

 

1. WebUI

2. UPS with automated shutdown

 

Pick one or build two PCs ;)

PC Specs - AMD Ryzen 7 5800X3D MSI B550M Mortar - 32GB Corsair Vengeance RGB DDR4-3600 @ CL16 - ASRock RX7800XT 660p 1TBGB & Crucial P5 1TB Fractal Define Mini C CM V750v2 - Windows 11 Pro

 

Link to comment
Share on other sites

Link to post
Share on other sites

You can use a cronjob to do a "powerdown" command.

 

But I agree with the Above, UPS with automated shutdown would be the best and will add protection to the server. You should already have one ! :)

Link to comment
Share on other sites

Link to post
Share on other sites

The wear and tear of this application with a ups would be miniscule at best worst-case you swap a 10-20$ battery about every 2 or 3 years instead of every 4 or 5 years. Either way as nka pointed out that server should be on a ups either way. 

The problem with a cron job is that it is a timed event not a triggered event so if you at all deviate from "normal" working hours then the server goes down in the middle of someone working. If unraid have something like Ifttt you most likely can set up an event trigger that will monitor your vms and shutdown the server when both/all are/has been off for x amount of time. but as I do not use unraid I would not know if that exists. It's the last solution I can think of for now tho. 

Link to comment
Share on other sites

Link to post
Share on other sites

You could schedule a shutdown, assuming you cut the power at the same time every day, and never need to stay late, etc.

 

I'm curious why you decided to even go "2 staff, one PC" route - not ideal for a business environment where downtime = lost income. Though that's just a curiosity and doesn't matter in the end.

 

unRAID and the systems like it (FreeNAS, ESXi, etc), are not meant to be used as workstations that get shut off every day. They're Server OS's. They're meant to be left on all the time. But as mentioned, a cronjob scheduling a shutdown command at the same time every day would be the best way to accomplish this, without going into the WebUI.

For Sale: Meraki Bundle

 

iPhone Xr 128 GB Product Red - HP Spectre x360 13" (i5 - 8 GB RAM - 256 GB SSD) - HP ZBook 15v G5 15" (i7-8850H - 16 GB RAM - 512 GB SSD - NVIDIA Quadro P600)

 

Link to comment
Share on other sites

Link to post
Share on other sites

Quote

The wear and tear of this application with a ups would be miniscule at best worst-case you swap a 10-20$ battery about every 2 or 3 years instead of every 4 or 5 years. Either way as nka pointed out that server should be on a ups either way. 

But but having the battery go from 0-100 and back every day might make that 4-5 years into 1-2 years. office is at the second floor and main breaker is near the entrance. small company.

 

Quote

You can use a cronjob to do a "powerdown" command.

 

But I agree with the Above, UPS with automated shutdown would be the best and will add protection to the server. You should already have one ! 

yea, having a USP is a no brainer. all our pc's have one.

 

 

Quote

 If unraid have something like Ifttt you most likely can set up an event trigger that will monitor your vms and shutdown the server when both/all are/has been off for x amount of time. 

i'll probably go with this one if it is available in unraid. if not

 

Quote

I'm curious why you decided to even go "2 staff, one PC" route - not ideal for a business environment where downtime= lost income. Though that's just a curiosity and doesn't matter in the end.

I want to use unraid as both staff will have extremely light workloads. Not enough to justify buying a new PC. i'll just be re-purposing an old g4560 rig.

 

 

anyhow, thanks for the input guys! 

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, LAazsx said:

....

 

I want to use unraid as both staff will have extremely light workloads. Not enough to justify buying a new PC. i'll just be re-purposing an old g4560 rig.

 

 

anyhow, thanks for the input guys! 

Do you have access to the PC?

 

If the VMs are shutdown you could press the power button. It triggers de Shutdown of Unraid. 

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, LAazsx said:

I want to use unraid as both staff will have extremely light workloads. Not enough to justify buying a new PC. i'll just be re-purposing an old g4560 rig.

 

anyhow, thanks for the input guys! 

So they're getting one core each? Wow that's pretty crap lol. Might've been a better idea to get a thinstuff license to make it a fake terminal server.

PC Specs - AMD Ryzen 7 5800X3D MSI B550M Mortar - 32GB Corsair Vengeance RGB DDR4-3600 @ CL16 - ASRock RX7800XT 660p 1TBGB & Crucial P5 1TB Fractal Define Mini C CM V750v2 - Windows 11 Pro

 

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, LAazsx said:

But but having the battery go from 0-100 and back every day might make that 4-5 years into 1-2 years. office is at the second floor and main breaker is near the entrance. small company.

 

 

the point is not to have it going from 100 to 0 but the server shuting down gracefully asap after the ups detecting the power being off. you would be using a minimum of power from the battery. you would only set the settings to power off immediatly instead of waiting.

Link to comment
Share on other sites

Link to post
Share on other sites

4 hours ago, LAazsx said:

But but having the battery go from 0-100 and back every day might make that 4-5 years into 1-2 years. office is at the second floor and main breaker is near the entrance. small company.

 

You won't do 100-0% every day. You will do about 100-30%. You could even program it to do a shutdown at 80% is you wish too... It's not "bad" for the battery. It will still last 3-4 years as it should.

Link to comment
Share on other sites

Link to post
Share on other sites

8 hours ago, LAazsx said:

I want to use unraid as both staff will have extremely light workloads. Not enough to justify buying a new PC. i'll just be re-purposing an old g4560 rig.

Anouther option is to use something like multipoint on windows. That will let you shutdown the system from either user(with permissions). and Then you don't have to use vms and can use one gpu for both users and is just simpler to use.

Link to comment
Share on other sites

Link to post
Share on other sites

Why not create a script / command as mentioned above, and either create a shortcut on the user(s) desktop or as part of the shutdown process from within windows?

 

I mean you just need to be able to SSH from the windows box to the unraid management and have it gracefully shutdown all the VMs and turn that into a shurtcut. Instruct users to stop using start > shutdown and just use that desktop shortcut.

Link to comment
Share on other sites

Link to post
Share on other sites

just get 2 ex lease machines? 

Spoiler

Desktop: Ryzen9 5950X | ASUS ROG Crosshair VIII Hero (Wifi) | EVGA RTX 3080Ti FTW3 | 32GB (2x16GB) Corsair Dominator Platinum RGB Pro 3600Mhz | EKWB EK-AIO 360D-RGB | EKWB EK-Vardar RGB Fans | 1TB Samsung 980 Pro, 4TB Samsung 980 Pro | Corsair 5000D Airflow | Corsair HX850 Platinum PSU | Asus ROG 42" OLED PG42UQ + LG 32" 32GK850G Monitor | Roccat Vulcan TKL Pro Keyboard | Logitech G Pro X Superlight  | MicroLab Solo 7C Speakers | Audio-Technica ATH-M50xBT2 LE Headphones | TC-Helicon GoXLR | Audio-Technica AT2035 | LTT Desk Mat | XBOX-X Controller | Windows 11 Pro

 

Spoiler

Server: Fractal Design Define R6 | Ryzen 3950x | ASRock X570 Taichi | EVGA GTX1070 FTW | 64GB (4x16GB) Corsair Vengeance LPX 3000Mhz | Corsair RM850v2 PSU | Fractal S36 Triple AIO | 12 x 8TB HGST Ultrastar He10 (WD Whitelabel) | 500GB Aorus Gen4 NVMe | 2 x 2TB Samsung 970 Evo Plus NVMe | LSI 9211-8i HBA

 

Link to comment
Share on other sites

Link to post
Share on other sites

This is a neat project but I would caution against it. For starters, Unraid is somewhat hobby-grade and if it blows up you might have trouble getting someone more experienced to fix it for you. Secondly, you're basically engineering a single point of failure where you don't really need one. When we do VDI deployments there is usually a business need for it (no security at the edge network, workers who change locations frequently, application that doesn't work well over the network). At just two workstations I do not think VDI will be a good solution.

 

If you want to save on hardware costs, look into just getting offlease or refurbished computers. Here's a quick quote from dell warehouse for example:

Dell Optiplex 5060 small form factor, w10 pro, 128GB SSD, 8GB memory, 8th gen i5 processor, with 3 years ProSupport (next business day dude in your office with a replacement motherboard, callcenter is in Texas) for $645 per unit. Try to get these financed and throw in a business platform (o365 at $12.50/mo/user or G-suite at $5/user/mo) and some basic domainless management software (jumpcloud is free for under 10 users) and you will have an extremely reliable and robust managed business network. Present the final monthly cost to your boss and it will be approved.

 

Keep in mind that at LMG they do "cowboy operations" specifically because linus thinks it is good showbusiness. In return for some fun channel content, they do have to deal with the occasional production outage generated by their little jankfest. They also are not saving money doing this since they are using new higher end components.

 

Another thing is from a philosophical standpoint... if you pinch pennies with your business equipment you're gonna pay for it later in other ways. This equipment is a tool that you use to ply your trade, and in that sense it will pay for itself pretty quickly. If you give your company a crappy network held together with duct tape and paper clips, some jagoff consultant like me is going to take your boss to lunch and sell him a managed services solution that alleviates all his pain points and costs a lot more than the money you think you are saving by going this route.

Intel 11700K - Gigabyte 3080 Ti- Gigabyte Z590 Aorus Pro - Sabrent Rocket NVME - Corsair 16GB DDR4

Link to comment
Share on other sites

Link to post
Share on other sites

On 3/3/2019 at 4:50 AM, jake9000 said:

 

 

Another thing is from a philosophical standpoint... if you pinch pennies with your business equipment you're gonna pay for it later in other ways. This equipment is a tool that you use to ply your trade, and in that sense it will pay for itself pretty quickly. If you give your company a crappy network held together with duct tape and paper clips, some jagoff consultant like me is going to take your boss to lunch and sell him a managed services solution that alleviates all his pain points and costs a lot more than the money you think you are saving by going this route.

I failed to mention that this will be a temporary thing. I did, however, mention this is partly due to space constraints. yes, I could go with a NUC/small factor but it immediately takes away my ability to upgrade for N years.

 

The important files will be saved to a network share anyway. So there isn't really any problem should the system go down.

 

By going this route, I could save space, upgrade to a better setup once needed, and have a unRaid license when I have to add some other VMs (NAS, CCTV, etc). And of course, I just love doing these kinds of projects. 

 

Also, I'm not THAT stupid and have mission critical stuff on jank setups.

 

Link to comment
Share on other sites

Link to post
Share on other sites

With a NUC, you can upgrade everything except the CPU, which for most workloads, will generally outlast the time the computer should be replaced anyway.

 

You can still upgrade RAM + Storage easily.

 

And if space is a constraint, get creative. Use an under-desk shelf or mount to stick a compact case (you can still go full upgradability in a small mITX case, and even squeeze in a full size dual slot GPU).

 

I am pleased to learn this is only temporary. I worked at a place where "compromise" for tech was the status quo - it's not a great thing, long term. You make a compromise, then you get used to that compromise, then you make more compromises, etc.

 

Granted, I had no authority (and failed to convince the owner) to change things. And likely, you don't either. But if you do have any say in the matter, please try and convince your management to step away from this solution, and figure out individual workstations instead.

 

You can keep the "NAS" itself to run VM's as servers - that part of unRAID is great. I would just personally get rid of the virtual workstations ASAP.

For Sale: Meraki Bundle

 

iPhone Xr 128 GB Product Red - HP Spectre x360 13" (i5 - 8 GB RAM - 256 GB SSD) - HP ZBook 15v G5 15" (i7-8850H - 16 GB RAM - 512 GB SSD - NVIDIA Quadro P600)

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×