Re: Hardware recommendation for small form factor, noiseless, server

2024-05-09 Thread James Johnson
Thanks a lot to you all for these recommendations.



Hardware recommendation for small form factor, noiseless, server

2024-05-06 Thread James Johnson
Hi all,

can anyone please advise on what computer I can purchase with the following 
requirements:

- fully supports OpenBSD
- no noise
- good quality wifi
- small form factor preferably
- processor does not need to be fast (no highly intensive compute load)
- low RAM need
- needs 1 TB of hard drive at least
- will be used only remotely, for basic and low-intensity server-type 
applications (no desktop use)
- under $500

Thanks!
James


Re: How to set up a data disk of 4TB?

2022-12-09 Thread James Johnson
Perfect, thanks a lot. It worked like a charm.

> On 9 Dec 2022, at 17:23, Crystal Kolipe  wrote:
> 
> On Fri, Dec 09, 2022 at 04:19:49PM +0000, James Johnson wrote:
>> Hi all,
>> 
>> I have installed an internal hard drive of 4TB. This drive will be used for 
>> storing data only. It will not contain the OpenBSD system itself.
>> 
>> Knowing the limitations of MBR, I have opted for a GPT partitioning system : 
>> fdisk -A sd0
> 
> If the disk is to be used exclusively with OpenBSD, you can use an MBR 
> partitioning system, even though it's 4 TB.
> 
>> Following this, I am trying to add the partition with disklabel.
>> 
>> I have created the a partition, of 2TB (the size suggested by the system).
>> Then I try to add another partition, but disklabel tells me I have no space 
>> remaining.
>> 
>> I am stuck. The only option that seems relevant in the man page is to modify 
>> the boundary with the -b option. I am scared to do so without specific 
>> advice though, as it could corrupt the OS if done improperly, from what the 
>> manual says.
>> 
>> I just want to be able to use the full size of the disk. Ideally, I would 
>> like a single 4TB partition, but if not possible, I am fine with 2 
>> partitions of 2TB.
>> 
>> Any recommendation?
> 
> For use with OpenBSD only, create a single MBR partition covering as much of 
> the disk as is possible with MBR, something like:
> 
> Disk: sd1 geometry: 267349/255/63 [4294961685 Sectors]
> Offset: 0 Signature: 0xAA55
>Starting Ending LBA Info:
> #: id  C   H   S -  C   H   S [   start:size ]
> ---
> 0: 00  0   0   0 -  0   0   0 [   0:   0 ] unused 
>  
> 1: 00  0   0   0 -  0   0   0 [   0:   0 ] unused 
>  
> 2: 00  0   0   0 -  0   0   0 [   0:   0 ] unused 
>  
> *3: A6  0   1   2 - 267348 254  63 [  64:  4294961621 ] OpenBSD   
>   
> 
> Then invoke disklabel -E, and adjust the bounds to fill the whole disk with 
> the b option, giving * as the size.
> 
> Finally, add a single large partition covering the whole disk in the normal 
> way.



How to set up a data disk of 4TB?

2022-12-09 Thread James Johnson
Hi all,

I have installed an internal hard drive of 4TB. This drive will be used for 
storing data only. It will not contain the OpenBSD system itself.

Knowing the limitations of MBR, I have opted for a GPT partitioning system : 
fdisk -A sd0

Following this, I am trying to add the partition with disklabel.

I have created the a partition, of 2TB (the size suggested by the system).
Then I try to add another partition, but disklabel tells me I have no space 
remaining.

I am stuck. The only option that seems relevant in the man page is to modify 
the boundary with the -b option. I am scared to do so without specific advice 
though, as it could corrupt the OS if done improperly, from what the manual 
says.

I just want to be able to use the full size of the disk. Ideally, I would like 
a single 4TB partition, but if not possible, I am fine with 2 partitions of 2TB.

Any recommendation?

Thanks!






Re: Configure OpenBSD for remote server rarely used

2022-11-28 Thread James Johnson
Ah, pretty cool, I'll keep it in mind for my next project ;)

On 28.11.2022 10:36, Bodie wrote:

And if you really need low consumption, rugged computer and do not mind
about the costs you can go eg. this way :-)

https://teguar.com/ip67-box-pc-twb-2945 
/


Re: Configure OpenBSD for remote server rarely used

2022-11-28 Thread James Johnson
Thanks a lot for all the great advice, that is very useful. It all makes sense.

> On 27 Nov 2022, at 21:10, Tomasz Rola  wrote:
> 
> On Sun, Nov 27, 2022 at 09:37:19AM +0000, James Johnson wrote:
>> Hi all,
>> 
>> OpenBSD is amazing. But I need help in configuring it correctly as a
>> remote server, rarely used. 
>> 
>> 
>> The main thing I am trying to do is to make it sleep every now and
>> then to protect resources. I am very flexible on how to do this, but
>> have been unable to do so.
>> Here's what I tried :
> [...]
> 
> So to sum up your requirements, you want a self driving box which
> waits, and once every month or six wakes up, does something, then goes
> idle again.
> 
> I would avoid power down/up completely - boot takes time, and fsck
> takes some more time. Also, AFAIK electronics wears down every time it
> goes on-off.
> 
> Modern HDD are said to live to 5 on-off cycles, so assume 2
> cold boots. But random things can happen, because on-off means power
> spike. If you have no problem with eletricity, I would keep it going
> all the time. I would however minimise writes. Work on temporary data
> in ramdisk, write results to disk. Something like this.
> 
> BIOS battery goes down faster when computer is powered down. When it
> is up, clock gets power from the wall and saves the battery. I assume
> the modern CMOS battery will only keep the clock for about a year
> without power and it will not recharge when you power up. After that
> time (and before that time, too, but less necessary), every boot
> should include query to time server and adjusting the hardware clock.
> 
> I would buy a decent PSU. Last time I wanted to know, Seasonic was the
> maker of best ones a mortal could buy. Their last unit I bought came
> with 10 years warranty. AND, according to description, it was built
> with classic electronic art, analog parts, no digital. So if you are
> so inclined, you can ask your electronic buddy to inspect it and
> perhaps even replace some parts with better ones. Or repair it. If
> microcontroller goes bunk, you are out of luck, I assume they somehow
> protect their eproms.
> 
> If you plan to store some long term data on this box, I would avoid
> SSD. They are fast but they also can go bunk and when they do, chance
> of recovering data is close to nil (from what I have read).
> 
> I would consider putting the box in a plastic bag to protect from dust
> and humidity. Dust will clog into radiators, make chips go hotter,
> ventillators work harder. I have not tested this, however. I assume
> thermal exchange with loose bag over the box should go ok, but you
> need to test it very carefully, monitoring temps all the time - all
> temps.
> 
> HTH
> 
> -- 
> Regards,
> Tomasz Rola
> 
> --
> ** A C programmer asked whether computer had Buddha's nature.  **
> ** As the answer, master did "rm -rif" on the programmer's home**
> ** directory. And then the C programmer became enlightened...  **
> ** **
> ** Tomasz Rola  mailto:tomasz_r...@bigfoot.com **



Re: Configure OpenBSD for remote server rarely used

2022-11-27 Thread James Johnson
Thank you for this interesting perspective. 

Combined with the previous advice, I am convinced. I will not try to have the 
machine sleep, or even try to put the drives in spun down. From what you guys 
are saying, it seems doing so would be over-engineering.

What are your thoughts regarding reboots? Should I do a daily, weekly, monthly 
reboot?


> On 27 Nov 2022, at 20:00, Bodie  wrote:
> 
> 
> 
> On 27.11.2022 10:37, James Johnson wrote:
>> Hi all,
>> OpenBSD is amazing. But I need help in configuring it correctly as a
>> remote server, rarely used.
>> The main thing I am trying to do is to make it sleep every now and
>> then to protect resources. I am very flexible on how to do this, but
>> have been unable to do so.
>> Here's what I tried :
>> 1) Make it sleep and wake up when woken up remotely
>> I investigated Wake On Lan, which I enabled via ifconfig. However,
>> this system is deployed remotely, and I have no access to other
>> computers on the LAN, so I am unable to make this work.
>> 2) Make it sleep for a few hours and then wake up
>> After 3hours+ of research in man pages and the internet, I have not
>> seen any solution for that.
>> 3) hard drives Spin down, CPU lower freq
>> I have been able to lower the CPU speed by running `apm -L`.
>> I haven't been able to spin down the hard drives.
>> How important is it to manually send a command to spin down the unused
>> harddrives? Will it be down by the system automatically?
>> I am trying to get info on the drives from the system but `atactl sd0
>> checkpower ` always shows `standby` even after I have just written on
>> the disk. I understand this does not work because my drives are SCSI
>> and not ATA.
>> I read the man page for scsi, and I see the command to spin down hard
>> drives : `scsi -f /dev/rsd2c -c "1b 0 0 0 0 0"`
>> However, I see no command to spin them back up. Is it automatic?
>> How can I request information on the spin state of the drive. I am
>> just a little worried about starting to send low levels instructions
>> to the hard drive, with little understanding of it. Is it safe to send
>> this command?
>> Thanks all !
>> PS : dmesg : I cannot share the full dmesg for security reasons, but
>> it is a fairly standard i386 machine, with 2 drives mounted as SCSI.
> 
> As already pointed out by others. Don't do that ;-) Unless you explain
> why you need to do that (I'm sure it is possible without disclosing much)
> 
> I build systems running for eg. 12 years, amd64 architecture, SATA disks,
> DDR RAM and so on. Serving number of virtual machines with constantly
> higher number of utilizations and in dozens of them only 2 problems
> during those years - battery for internal RAID run out :-)
> 
> Saw systems which were running for over 30 years and nothing wrong with
> them.
> 
> Can't talk about electricity as those are basically underground cities
> and there are different problems then if CPU is running 3 or 1GHz ;-)
> 
> Sounds like maybe some IoT solution, but then go for ARM or use virtual
> machine in eg. OpenBSD Amsterdam or you really need compute power on
> demand then go for free options in eg. Azure (12 months free basic Linux)
> or Oracle Cloud Infrastructure or whatever else you find fit.
> 
> Either it is so important, need to be physically under your control and
> then small differences in electricity does not matter or solutions above
> are perfectly fine for your needs.
> 
> Just one hint. No matter if own machine or something rented you want that
> machine to be worth the money that means to do something on it and not
> have it shut down ;-)



Re: Configure OpenBSD for remote server rarely used

2022-11-27 Thread James Johnson
"Does it just need to wake up to run a script and then shut down again" -> yes, 
that's basically that. Of course, requirements might evolve.
"Why does it even have to be a separate machine?" -> There are benefits to 
this, including data safety (different location).

Thank you for your help, have a great day.



> On 27 Nov 2022, at 18:09, Jan Stary  wrote:
> 
>>> As for rotating metal disks, they have a lifetime;
>>> that's why replacing them with SSD might be your best bet.
>> 
>> In the case of an SDD, is there no consideration of turning them off,
>> if they are unused for some time?
> 
> No.
> 
>> In the case of HDD, are you saying that putting them in "spun down"
>> mode actually would not increase their lifetime?
> 
> It might, at least they recognize (in smarttools)
> the number of hours spent rorating.
> 
> But as I said, I don;t thnik it's even worth it.
> 
>>> Wait, so you know in advance for how many _months_
>>> the machine can sleep?
>> 
>> Yes...
> 
> So how often is the machine up (per year) and for how long?
> Does it just need to wake up to run a script and then shut down again?
> (Why does it even have to be a separate machine?)
> 



Re: Configure OpenBSD for remote server rarely used

2022-11-27 Thread James Johnson



> On 27 Nov 2022, at 17:28, Jan Stary  wrote:
> 
> On Nov 27 17:10:11, mytraddr...@gmail.com wrote:
>> I am not intending to switch the machine.
> 
> Why?

It is just not an option for this specific project.

> 
>> In terms of resources, I am mainly concerned about hard drives
>> and cpu being worn down unnecessarily. I am not sure how much
>> of a concern this should be though.
> 
> The CPU is not being "worn down" by running.
> 
> As for rotating metal disks, they have a lifetime;
> that's why replacing them with SSD might be your best bet.

In the case of an SDD, is there no consideration of turning them off, if they 
are unused for some time?
In the case of HDD, are you saying that putting them in "spun down" mode 
actually would not increase their lifetime?

> 
> But even regular disks are dirt cheap now.
> I don't believe this concern is even worth the time spent on this.
> 
>> Yes, I do know in advance when the machine needs to run and when it can 
>> sleep.
> 
> Then you can set a wakeup alarm in the BIOS (if it has one),
> and simply shutdown -p via cron, at the appropriate time.

Ok, thanks for that. I will explore whether the bios has a wake alarm

> 
>> "How much resources would that save?" -> My thoughts was that
>> it would be better for hard drive longevity to have them spun down,
>> rather than them being up for months without any access needed.
> 
> Wait, so you know in advance for how many _months_
> the machine can sleep?

Yes...

> 
> 
>> 
>>> On 27 Nov 2022, at 15:50, Jan Stary  wrote:
>>> 
>>> On Nov 27 09:37:19, mytraddr...@gmail.com wrote:
 The main thing I am trying to do is to make it sleep
 every now and then to protect resources.
>>> 
>>> How much eletricity does the machine eat?
>>> (What other "resources" are you concerned about?)
>>> 
 1) Make it sleep and wake up when woken up remotely
 I investigated Wake On Lan, which I enabled via ifconfig. However, this 
 system is deployed remotely, and I have no access to other computers on 
 the LAN, so I am unable to make this work.
 
 2) Make it sleep for a few hours and then wake up
>>> 
>>> Do you know in advance at what hours the machine
>>> needs to run, and when it can sleep?
>>> 
 After 3hours+ of research in man pages and the internet,
 I have not seen any solution for that.
>>> 
>>> Some machines have a wake option in their BIOS.
>>> 
 3) hard drives Spin down, CPU lower freq
 I have been able to lower the CPU speed by running `apm -L`.
>>> 
>>> How much electricity have you saved by that?
>>> 
 I haven't been able to spin down the hard drives.
>>> 
>>> How much resources would that save?
>>> 
>>> I you are concerned about resources, wouldn't you be better off
>>> getting a low-power machine, with SSD disks?  There are machines
>>> out there that eat around 10W and get the job done (dependeing
>>> on the job of course); and SSD doesn't need to spin down.
>>> 
 I cannot share the full dmesg for security reasons
>>> 
>>> Bullshit.
>>> 
>> 
>> 



Re: Configure OpenBSD for remote server rarely used

2022-11-27 Thread James Johnson
Thank you for the pointer, I will look into that.

> On 27 Nov 2022, at 14:13, T K  wrote:
> 
> "I have been able to lower the CPU speed by running `apm -L`."
> For automation purposes consider using obsdfreqd (pkg_add obsdfreqd) instead.
> 
> niedz., 27 lis 2022, 10:39 użytkownik James Johnson  <mailto:mytraddr...@gmail.com>> napisał:
> Hi all,
> 
> OpenBSD is amazing. But I need help in configuring it correctly as a remote 
> server, rarely used.
> 
> 
> The main thing I am trying to do is to make it sleep every now and then to 
> protect resources. I am very flexible on how to do this, but have been unable 
> to do so.
> Here's what I tried :
> 
> 1) Make it sleep and wake up when woken up remotely
> I investigated Wake On Lan, which I enabled via ifconfig. However, this 
> system is deployed remotely, and I have no access to other computers on the 
> LAN, so I am unable to make this work.
> 
> 2) Make it sleep for a few hours and then wake up
> After 3hours+ of research in man pages and the internet, I have not seen any 
> solution for that.
> 
> 3) hard drives Spin down, CPU lower freq
> 
> I have been able to lower the CPU speed by running `apm -L`.
> I haven't been able to spin down the hard drives.
> How important is it to manually send a command to spin down the unused 
> harddrives? Will it be down by the system automatically?
> 
> I am trying to get info on the drives from the system but `atactl sd0 
> checkpower ` always shows `standby` even after I have just written on the 
> disk. I understand this does not work because my drives are SCSI and not ATA.
> I read the man page for scsi, and I see the command to spin down hard drives 
> : `scsi -f /dev/rsd2c -c "1b 0 0 0 0 0"`
> However, I see no command to spin them back up. Is it automatic?
> How can I request information on the spin state of the drive. I am just a 
> little worried about starting to send low levels instructions to the hard 
> drive, with little understanding of it. Is it safe to send this command?
> 
> Thanks all !
> 
> 
> PS : dmesg : I cannot share the full dmesg for security reasons, but it is a 
> fairly standard i386 machine, with 2 drives mounted as SCSI.
> 
> 
> 



Re: Configure OpenBSD for remote server rarely used

2022-11-27 Thread James Johnson
Thanks for your response.

I am not intending to switch the machine. In terms of resources, I am mainly 
concerned about hard drives and cpu being worn down unnecessarily. I am not 
sure how much of a concern this should be though.

Yes, I do know in advance when the machine needs to run and when it can sleep.

"Some machines have a wake option in their BIOS." -> thanks for the pointer, I 
will look into that.

"How much electricity have you saved by that?" -> I don't know. The main 
concern is not using the hardware unnecessarily, to hopefully increase its 
lifetime. Though less electricity usage is a nice side bonus.

"How much resources would that save?" -> My thoughts was that it would be 
better for hard drive longevity to have them spun down, rather than them being 
up for months without any access needed. I don't know in practice if that 
matters for life expectancy of the drive?






> On 27 Nov 2022, at 15:50, Jan Stary  wrote:
> 
> On Nov 27 09:37:19, mytraddr...@gmail.com wrote:
>> The main thing I am trying to do is to make it sleep
>> every now and then to protect resources.
> 
> How much eletricity does the machine eat?
> (What other "resources" are you concerned about?)
> 
>> 1) Make it sleep and wake up when woken up remotely
>> I investigated Wake On Lan, which I enabled via ifconfig. However, this 
>> system is deployed remotely, and I have no access to other computers on the 
>> LAN, so I am unable to make this work.
>> 
>> 2) Make it sleep for a few hours and then wake up
> 
> Do you know in advance at what hours the machine
> needs to run, and when it can sleep?
> 
>> After 3hours+ of research in man pages and the internet,
>> I have not seen any solution for that.
> 
> Some machines have a wake option in their BIOS.
> 
>> 3) hard drives Spin down, CPU lower freq
>> I have been able to lower the CPU speed by running `apm -L`.
> 
> How much electricity have you saved by that?
> 
>> I haven't been able to spin down the hard drives.
> 
> How much resources would that save?
> 
> I you are concerned about resources, wouldn't you be better off
> getting a low-power machine, with SSD disks?  There are machines
> out there that eat around 10W and get the job done (dependeing
> on the job of course); and SSD doesn't need to spin down.
> 
>> I cannot share the full dmesg for security reasons
> 
> Bullshit.
> 



Configure OpenBSD for remote server rarely used

2022-11-27 Thread James Johnson
Hi all,

OpenBSD is amazing. But I need help in configuring it correctly as a remote 
server, rarely used.


The main thing I am trying to do is to make it sleep every now and then to 
protect resources. I am very flexible on how to do this, but have been unable 
to do so.
Here's what I tried :

1) Make it sleep and wake up when woken up remotely
I investigated Wake On Lan, which I enabled via ifconfig. However, this system 
is deployed remotely, and I have no access to other computers on the LAN, so I 
am unable to make this work.

2) Make it sleep for a few hours and then wake up
After 3hours+ of research in man pages and the internet, I have not seen any 
solution for that.

3) hard drives Spin down, CPU lower freq

I have been able to lower the CPU speed by running `apm -L`.
I haven't been able to spin down the hard drives.
How important is it to manually send a command to spin down the unused 
harddrives? Will it be down by the system automatically?

I am trying to get info on the drives from the system but `atactl sd0 
checkpower ` always shows `standby` even after I have just written on the disk. 
I understand this does not work because my drives are SCSI and not ATA.
I read the man page for scsi, and I see the command to spin down hard drives : 
`scsi -f /dev/rsd2c -c "1b 0 0 0 0 0"`
However, I see no command to spin them back up. Is it automatic?
How can I request information on the spin state of the drive. I am just a 
little worried about starting to send low levels instructions to the hard 
drive, with little understanding of it. Is it safe to send this command?

Thanks all !


PS : dmesg : I cannot share the full dmesg for security reasons, but it is a 
fairly standard i386 machine, with 2 drives mounted as SCSI.