Re: File Server with OpenBSD?

2017-03-07 Thread alexmcwhirter

On 2017-03-07 15:57, Karel Gardas wrote:

RAID10 should be simple. RAID6 is in tree in some form. W.r.t.
HAMMER2/ZFS as a ZFS user using ZFS solely for more than 10 years
already, I'm not so keen anymore about COW due to fragmentation.
Otherwise snapshots are nice, but I'd rather snapshots to be added to
ffs in not-so-optimal form and whole fs behaving nicely than having
nice snapshots in ZFS and whole fs killed perf-wise by fragmentation.


I'll be interested to see how HAMMER2 handles free space fragmentation. 
A while back someone on the ZFS team was looking at a way to clean this 
fragmentation and rewrite the block pointers. The problem ended up being 
that ZFS has so many features that redoing all of the block pointers 
would take forever and be very hard to do. Not to mention it also makes 
adding new features much more difficult.


Something like ZFS with a much more limited feature set would be ideal 
for this kind of project. But adding FFS snapshots and using softraid 
would probably be easier and accomplish the same goal.




Re: File Server with OpenBSD?

2017-03-07 Thread alexmcwhirter

On 2017-03-07 15:34, Karel Gardas wrote:

So if data correctness is your mantra, you don't need whole ZFS for it.


ZFS appeals to me for the snapshots / compression type stuff.


Well, I've not submitted my code yet
for the second attempt (first you can find in the archive) since I got
kind of stuck in rewrite for family/life reasons but I still keep my
hope on it and also hope it'll be delivered sooner than HAMMER2...


HAMMER2 looks good on paper for many reasons, especially the clusters 
support. But considering "on paper" is really all we have at the moment, 
it will likely be a long time. Either way, it's nice to see soft 
softraid development. One of these days i will get around to writing 
RAID10 and / or trying to finish up RAID6 if that isn't done by then.




Re: File Server with OpenBSD?

2017-03-07 Thread alexmcwhirter

On 2017-03-07 14:16, Stuart Henderson wrote:

- ZFS *does* checksum, even on mirrors, and can pick which of a pair of
mirrored drives is good and use it to correct the other one.


That i was not aware of, i only thought ZFS did that on RAIDZ pools. 
Regardless of whether it will happen or not, I would welcome ZFS into 
OpenBSD with arms wide open. In reality though, the only hope for 
something like ZFS here is probably HAMMER2, if it's ever finished.




Re: File Server with OpenBSD?

2017-03-07 Thread alexmcwhirter

On 2017-03-07 11:29, Roderick wrote:

Before I make a decision, I want to ask you for suggestions.

I want to make a small file server, just to separate important
files from my working system. Two disks as Raid 1. Files are to
be read with NFS. Emphasis:

(1) Data Integrity (not security :).



FFS has been around forever, i use it for mission critical data and have 
never had an issue. No issues with softraid and data integrity either.



(2) some degree of indepencence from hardware and operating system.
Disk are to be readable for many decades. Standard File System
readable after moving the Disks to another computer, different
hardware, perhaps with different OS.



You can move the disks between any hardware running OpenBSD without 
issue, as long as the both hardware archs are the same endianess. For 
example if you take a disk out of an AMD64 box and put it in a SPARC64 
box you wont be able to read it because AMD64 is little endian and 
SPARC64 is big endian. As long as you stay in the same endianess you 
should be fine as far as i know.


As far as other OS's, im not sure. I would think at least NetBSD could 
read our disk label and maybe FreeBSD, but i have never tested it.



I was thinking on doing it with FreeBSD and ZFS. I find the last
interesting because: (a) it make checksums and corrections if
a checksum in a disk is wrong (using the other disk in the array),
(b) many OS are implementing it. But I find horrible how
resource hungry it is.

Do you have an idea?



softraid / regular hardware raid does the same checksumming, ZFS just 
implements a ton of extra nice features such as snapshots, compression, 
cow, etc... at the cost of a large amount of RAM. It's probably safe to 
say we will never see it in OpenBSD with it's current license unless 
someone can make it work in ports which is unlikely as it needs a ton of 
kernel support.



I do preffer OpenBSD, but is there an appropriate file system
for archiving?



if you can live without snapshots, compression, cow, etc... FFS will 
work just fine.



I thank for any suggestion
Rodrigo.




Re: is it possible to speed up network to 1 Gb ?

2017-03-01 Thread alexmcwhirter

On 2017-03-01 14:23, kasak wrote:

Hello everybody.

I know that speed does not matter this days, and security matter.

But i want an advice, i have xeon computer with fresh disks, they work
pretty fast,

and also i have 1 gbit switch and 1gbit intel nic on both side, here
is iperf test:

$ doas iperf -s

Server listening on TCP port 5001
TCP window size: 16.0 KByte (default)

[  4] local 192.168.0.1 port 5001 connected with 192.168.0.77 port 
57972

[ ID] Interval   Transfer Bandwidth
[  4]  0.0-10.0 sec  1.04 GBytes   893 bits/sec

but when i try to upload something via samba or ftp speed is slower :(

the fastest speed i have is between linux and openbsd ftp server,
speed reaches 85 MBytes/sec

samba between linux and openbsd is 45 Mbytes/sec

I also have old imac with core2duo, and network perfomance between
linux and mac is faster, i can achieve speeds of 110-115 mbytes/sec.

I have not tried to tweak speed somehow, so this is default system 
perfomance.


Is there any chance to speed up my networking?

Thanks!


I think you are confusing various units here. The unit you really care 
about here is Mebibytes per second. A one gigabit nic can transmit data 
at a theoretical maximum speed on 1000 Megabits / 125 Megabytes / 119 
Mebibytes per second. You also have to take into consideration various 
other slowdowns. The more complex the protocol, the slower the transfer. 
85 MB/sec sounds about right for ftp in my opinion, samba may need some 
performance tuning.




Re: Canada and Software Backdoors

2016-12-05 Thread alexmcwhirter

On 2016-12-05 05:41, Theodoros wrote:

Hello misc,

I would like your comments on how could the below affect OpenBSD; if at 
all.


link:
http://www.tomshardware.com/news/canada-software-encryption-backdoors-feedback,33131.html


Best greetings,

Theodore


How i read this, it doesn't look like this will affect OpenBSD as a 
project. It would only affect companies using OpenBSD and require them 
to allow the Canadian government access (Im assuming by means of some 
form of official request) to that decrypted data. For companies storing 
data in decrypted form after being encrypted it would seem similar to 
how this is handled in the US, but it looks like companies who use end 
to end ecyrption (which have no access to decrypted user content) will 
have to provide a backdoor.




Re: 350MHz IBM Intel Pentium II runs 5.9 fine

2016-12-01 Thread alexmcwhirter

On 2016-12-01 22:01, Aaron Mason wrote:

I've got two Sun Netra X1s (400MHz ultraSPARC IIe, 2GB RAM, 2x40GB
drives) with 5.9 installed, they crash after awhile but I suspect
that's a cooling issue since these things run pretty hot.  I'd use
them as firewalls but I can't push any more than ~50Mbps through them
and I've got a 100/40 fibre connection coming once our house is built.

On Fri, Dec 2, 2016 at 12:19 PM,   wrote:
On a similar note, I have a Sun E6K (circa 1996, 30x 400Mhz CPU's 30GB 
of
RAM) running 6.0 like a dream, with some minor patches to support more 
than

8 disks in softraid 5.


Oddly enough i use netra X1's (500mhz) for routers. But mine routinely 
push ~100mb's without issue (no crashing either). ~100mbps seems to be 
pretty much the limit with them, mind you i have both nic's bonded with 
lacp into some cisco switch gear with public / private traffic split 
across vlans.




Re: 350MHz IBM Intel Pentium II runs 5.9 fine

2016-12-01 Thread alexmcwhirter
On a similar note, I have a Sun E6K (circa 1996, 30x 400Mhz CPU's 30GB 
of RAM) running 6.0 like a dream, with some minor patches to support 
more than 8 disks in softraid 5.




VMM with Hapertown?

2016-11-23 Thread alexmcwhirter
I have some systems with Hapertown CPUS that support VT-x, but not EPT. 
Does vmm currently require EPT to work?




Re: OpenBSD problems with headless boot

2016-11-18 Thread alexmcwhirter

On 2016-11-18 13:59, Bob Jones wrote:

Re: never reactivate the console unless you do it over ssh

Aah, well therein lies the twist, SSH never comes up, so I guess
you're right, its waiting for tty.

How do now I tell it to not use tty0 (and will doing so prevent me
from using the console port for diagnostics at a future date ?)

On 18 November 2016 at 18:08,   wrote:

On 2016-11-18 13:13, Bob Jones wrote:


I successfully installed OpenBSD 6 on a system that only has USB
console by broadly following the instructions here

http://unix.stackexchange.com/questions/292891/how-can-i-install-openbsd-using-the-serial-console-without-external-monitor-wi

When the console cable session is connected, the system boots up 
fine,

no problems.

When the console cable is disconnected, the system seems to hang
somewhere, and then once I re-connect to the console the boot process
continues fine.

I'm obviously unable to tell at which point the boot hangs because of
the need to press the return key a few times to get the initial
console response.

(During the install process, OpenBSD prompted whether I wanted 
default

console set to tty0 and I said yes).



The problem is that you've told the OS to use tty0 and when it boots 
there
is no tty0 unless the cable is plugged in. If tty0 doesn't exist it's 
going
to wait for it. There maybe be a timeout at which the OS continues 
without
it, but in this case it will probably never reactivate the console 
unless

you do it over ssh.


Have you tried waiting 10 minutes or so for tty0 to time out? I know it 
times out on FreeBSD, but i have never had to test this on OpenBSD so i 
am not sure.


If you tell it not to use tty0 then it wont use it at all unless you try 
to start it manually over ssh at a later point in time. IMO the point of 
the console is to be there is case you dont have ssh. The best solution 
is to probably leave the cable plugged in. Or if this machine has PCI 
ports get a serial card.




Re: OpenBSD problems with headless boot

2016-11-18 Thread alexmcwhirter

On 2016-11-18 13:13, Bob Jones wrote:

I successfully installed OpenBSD 6 on a system that only has USB
console by broadly following the instructions here
http://unix.stackexchange.com/questions/292891/how-can-i-install-openbsd-using-the-serial-console-without-external-monitor-wi

When the console cable session is connected, the system boots up fine,
no problems.

When the console cable is disconnected, the system seems to hang
somewhere, and then once I re-connect to the console the boot process
continues fine.

I'm obviously unable to tell at which point the boot hangs because of
the need to press the return key a few times to get the initial
console response.

(During the install process, OpenBSD prompted whether I wanted default
console set to tty0 and I said yes).


The problem is that you've told the OS to use tty0 and when it boots 
there is no tty0 unless the cable is plugged in. If tty0 doesn't exist 
it's going to wait for it. There maybe be a timeout at which the OS 
continues without it, but in this case it will probably never reactivate 
the console unless you do it over ssh.




Is 6.1 expected to happen soon?

2016-11-02 Thread alexmcwhirter

I know, it'll happen when it happens...

I have a few servers that could really use the updated SMP stuff that 
-current has. For some applications it's a night and day difference, but 
I'm not all to comfortable running -current on production machines. I'm 
just trying to gauge whether or not i should hold out a bit longer or 
just bite the bullet and test some snapshots. With 6.0 being released in 
September i am not sure if i should expect 6.1 any time soon.




Re: SPARC64: input/output error on softraid 5 with more than 8 disks

2016-10-06 Thread alexmcwhirter

On 2016-10-06 11:34, Kenneth Westerback wrote:


1) Why do you say >8 but only give an example using 10 disks?

2) fdisk and disklabels for all the disks you test would be useful, as 
would the verbatum output from newfs.


3) The size of the disks would also be useful (although the information 
above would contain this).


4) To eliminate the size of the resulting volume being a problem and 
possibly eliminating ffs2 vs ffs issues trying to create a volume with 
smaller chunks (say 100MB) on each disk would be another useful data 
point.


 Ken




1. That was a bit of an assumption on my part, just tested 9 disks and 
it works fine. My raid arrays have even disk spacing, so using odd 
numbered arrays is not ideal so i never tested it before hand. I can 
verify that 10 disk arrays, 11 disk arrays, and 12 disk arrays are 
broken in the same manner however.


2. To make testing a bit easier i decided to start doing debugging on my 
Sun T5120 at home. I only have 2 disks, but have setup 10 ~100MB 
partitions on sd0.


# disklabel sd0
# /dev/rsd0c:
type: SCSI
disk: SCSI disk
label: ST914602SSUN146G
duid: 82bafda60ea79f65
flags: vendor
bytes/sector: 512
sectors/track: 848
tracks/cylinder: 24
sectors/cylinder: 20352
cylinders: 14089
total sectors: 286739329
boundstart: 0
boundend: 286739329
drivedata: 0

16 partitions:
#size   offset  fstype [fsize bsize  cpg]
  a:   2238720RAID
  b:   223872   223872RAID
  c:2867393290  unused
  d:   223872   447744RAID
  e:   223872   671616RAID
  f:   223872   895488RAID
  g:   223872  1119360RAID
  h:   223872  1343232RAID
  i:   223872  1567104RAID
  j:   223872  1790976RAID
  k:   223872  2014848RAID
#dd

After that i setup raid 5 between all of these partitions...

# bioctl -c 5 -l sd0a,sd0b,sd0d,sd0e,sd0f,sd0g,sd0h,sd0i,sd0j,sd0k 
softraid0
sd2 at scsibus2 targ 1 lun 0:  SCSI2 0/direct 
fixed

sd2: 981MB, 512 bytes/sector, 2009088 sectors
softraid0: RAID 5 volume attached as sd2
#

Then add a disklabel to sd2 and format it...

# disklabel sd2
# /dev/rsd2c:
type: SCSI
disk: SCSI disk
label: SR RAID 5
duid: 9388bbda6be53605
flags: vendor
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 125
total sectors: 2009088
boundstart: 0
boundend: 2009088
drivedata: 0

16 partitions:
#size   offset  fstype [fsize bsize  cpg]
  a:  20081250  4.2BSD   2048 163841
  c:  20090880  unused
#
# newfs sd2a
/dev/rsd2a: 980.5MB in 2008124 sectors of 512 bytes
5 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
super-block backups (for fsck -b #) at:
 32, 414688, 829344, 1244000, 1658656,
#

And now we mount it and try to write data to it...

# mount /dev/sd2a /mnt
# cd /mnt
# dd if=/dev/zero of=test bs=1m count=128
dd: test: Input/output error
1+0 records in
0+0 records out
0 bytes transferred in 0.112 secs (0 bytes/sec)
#


I plan on building a debug kernel tonight see if i can get anything out 
more out of it.




SPARC64: input/output error on softraid 5 with more than 8 disks

2016-10-05 Thread alexmcwhirter
I'm forwarding this to a few other lists just to see if i can get some 
more input on it. I would like to think this is an arch specific bug as 
i imagine there are people using raid 5 with more than 8 disks on amd64 
/ i386. However i haven't tried this on amd64, so i am not certain.


1. Steps to reproduce (can be done in bsd.rd after issuing MAKEDEV for 
all disks)


Using sd2-sd11 for this example.

disklabel -E sd2(sd3,sd4,etc..) - Create partition "a" with all disk 
space as RAID type all disks are the same model.

bioctl -c 5 -l sd2a,sd3a,etc... softraid0 - comes out as sd12
disklabel -E sd12 - Create partition "a" with all disk space as BSD type
newfs sd12a
mount /dev/sd12a /mnt
cd /mnt
dd if=/dev/zero of=test bs=1m count=128

2. Output Received

dd will fail immediately with "Input/Output Error" with 0 records 
written. dmesg shows no errors. The test file is visible on the 
filesystem however.


3. Dmesg output, will post tomorrow. As stated below, this happens on 
two different sparc64 hosts with completely different hardware, disks, 
HBA's, and disk shelves. There are no dmesg errors added when dd fails.


4. Third party software, can be done in a base install or in bsd.rd. No 
third party software needed.


5. No kernel panic, system keep chugging along, filesystem stays 
mounted, fsck comes back clean, upon reboot raid is still in good 
standing and filesystem checks still pass.


 Original Message 
Subject: Input/Output error on softraid 5 with more that 8 disks
Date: 2016-10-05 19:19
From: alexmcwhir...@triadic.us
To: sp...@openbsd.org

Tested on a Sun E6K and Sun V210. It seems that if i create a raid 5 
array bigger than 8 disks (U320 SCSI) using softraid, i get a rather 
vague "Input / Output" error why attempting to write any significantly 
large data (dd if=/dev/zero of=/mnt/blah bs=1m count=128). newfs creates 
the filesystem fine and fsck comes back clean but trying to put anything 
on the array doesn't seem to do anything.


I was just wondering if this is something that has been reported in the 
past or if I'm the first to uncover it? I have obtained the same results 
from various hardware which seems to point to the softraid driver.


Hardware Tested

HBA's

qlw: isp1000, isp1040, isp10160
esp: fas336

Disk Shelfs

StorEdge D1000
StorEdge 3320