Re: What are the disadvantages of soft updates?
Thank you for your answer. That clarifies things for me. w.r.t a couple of points: I did make an inference. Alexander stated several points, and I used deduction to summarize his statements. 1. (Increased CPU)&(Increased Memory)->(Increased Overhead). 2. (I will grant that here I restated what he said using synonyms). To your second point, which argues that journaling/soft updates do not affect "data safety," I would respond as follows. -- Metadata is a form of data. -- Filesystem corruption can also cause application data loss. Therefore data-safety is an applicable term, but probably not the most precise term. I was mainly curious as to why soft updates were not enabled by default if they have so many good qualities. Your answers explained this well. --Currell -- Original Message -- From: "Nick Holland" To: misc@openbsd.org Sent: 1/19/2015 4:25:51 PM Subject: Re: What are the disadvantages of soft updates? On 01/19/15 14:10, Currell Berry wrote: I infer from your response that soft updates possess: 1. increased overhead over default FFS settings. 2. increased implementation complexity over default FFS settings. for a "he stated" definition of "you infer", sure. Also, I infer that journaling and soft updates provide equivalent data safety um. I think we have a terms issue here with "data safety"... guarantees "in theory." Do they provide equivalent guarantees in practice? Being there are many journaled file systems in Linux, if you wish to get to real life, you will have to specify one. But ... Being that FFS+soft updates has been in development and production longer than just about any currently used Linux file system ("of the week" -- sorry, I just feel the urge to add those three words after referencing Linux file systems), and almost all the BSD file system works goes into FFS, rather than split up among lots of options, I'd put my money (and data) on FFS+softupdates. But that's me. I tend to put my money where my mouth is -- I have no UPSs in use, and if it would take longer to login and halt a machine than to wait for an fsck, I just wack the power button or yank the cord. Keep in mind, what softupdates promises is /file system/ integrity. Journaling does similar. If the power goes out or the system crashes mid-Big Data Write, the goal is to get the file system back into sane shape so the system can come back up and resume its tasks, NOT that the 1.7TB of a 1.8TB write will be sitting on disk waiting for you, or that your database is consistent. It is entirely likely -- probable, in fact -- that you will find your actively written file truncated to zero bytes. Depending on your application, this is probably a GOOD thing -- if you find a zero byte file, that normally means something went wrong (or hasn't yet gone right). A 1.7TB file? You have no idea if that's complete or not. If you want true "data safety", you probably want some kind of application transaction tracking BEYOND the file system. Nick. Thank you, Currell -- Original Message -- From: "Alexandre Ratchov" To: currellbe...@gmail.com Cc: misc@openbsd.org Sent: 1/19/2015 4:44:59 AM Subject: Re: What are the disadvantages of soft updates? On Mon, Jan 19, 2015 at 03:59:34AM +, currellbe...@gmail.com wrote: Hello, The FAQ[1] states that soft updates result in "a large performance increase in disk writing performance," and links to a resource[2] which claims that soft updates, in addition to being a performance enhancement, "can also maintain better disk consistency." Resource 2 links to several academic papers[3][4], which while they are a bit above my level, contain discussions of how soft updates can increase performance and speed recovery on crash. My question is: what are the downsides of soft updates? - softdep consumes more cpu in kernel mode, which hurts interactive programms on very slow machines. It has the reputation of consuming more memory. - the softdep code is more complex (likely to have more bugs). Also, does journaling provide a better data-safety guarantee? They are not the same. On OpenBSD, softdep makes cerain operations much faster while ensuring that upon power loss, all inconsistencies can be automatically fixed by fsck on next boot. Journaling would write data twice (first in the journal, then in the filesystem) and would allow last operations to be replayed on next boot, so no need to run fsck, which in turn makes system boot fast after a power loss. In theory, from data safety point of view they are equivalent.
Re: nginx question...
On 01/19/15 22:25, worik wrote: Summary: The files under /var/www/htdocs are by default it seems all owned by root:wheel. What are the issues with changing that to be a normal user? The long version My work flow involves building a directory structure on another machine and using 'rsync' when I am ready to transfer it to the OpenBSD machine to be served by the public facing webserver. Having the files owned by a user other than the one I log in as for a rsync session is causing all sorts of headaches and warnings from rsync. So I have changed the ownership of all the files and directories to be foo:foo where 'foo' is the user/group name I login as. This makes my life much simpler. But I have a nagging doubt that I am doing some thing I will regret. Perhaps I need to use rsync differently or modify my workflow Worik rsync [OPTION...] SRC... rsync://user@[WEBSERVER]/var/www/htdocs should allow you to set the user on the webserver - what errors are you getting? nginx runs chrooted by default, which should limit exploits. I also chmod 644 or 640 if I'm feeling more paranoid all the files below /var/www/htdocs - although the files are in group www. hth Fred
OpenBSD talk at ScotLUG, Glasgow
Hi misc@ If anyone is in Glasgow on Thursday evening - I'm giving a talk at the Scottish Linux User Group (http://scotlug.github.io/) on Building redundant and transparent firewalls with OpenBSD. See you there! Cheers Fred
nginx question...
Summary: The files under /var/www/htdocs are by default it seems all owned by root:wheel. What are the issues with changing that to be a normal user? The long version My work flow involves building a directory structure on another machine and using 'rsync' when I am ready to transfer it to the OpenBSD machine to be served by the public facing webserver. Having the files owned by a user other than the one I log in as for a rsync session is causing all sorts of headaches and warnings from rsync. So I have changed the ownership of all the files and directories to be foo:foo where 'foo' is the user/group name I login as. This makes my life much simpler. But I have a nagging doubt that I am doing some thing I will regret. Perhaps I need to use rsync differently or modify my workflow Worik -- Why is the legal status of chardonnay different to that of cannabis? worik.stan...@gmail.com 021-1680650, (03) 4821804 Aotearoa (New Zealand) I voted for love
Re: What are the disadvantages of soft updates?
On 01/19/15 14:10, Currell Berry wrote: > I infer from your response that soft updates possess: > > 1. increased overhead over default FFS settings. > 2. increased implementation complexity over default FFS settings. for a "he stated" definition of "you infer", sure. > Also, I infer that journaling and soft updates provide equivalent data > safety um. I think we have a terms issue here with "data safety"... > guarantees "in theory." Do they provide equivalent guarantees in > practice? Being there are many journaled file systems in Linux, if you wish to get to real life, you will have to specify one. But ... Being that FFS+soft updates has been in development and production longer than just about any currently used Linux file system ("of the week" -- sorry, I just feel the urge to add those three words after referencing Linux file systems), and almost all the BSD file system works goes into FFS, rather than split up among lots of options, I'd put my money (and data) on FFS+softupdates. But that's me. I tend to put my money where my mouth is -- I have no UPSs in use, and if it would take longer to login and halt a machine than to wait for an fsck, I just wack the power button or yank the cord. Keep in mind, what softupdates promises is /file system/ integrity. Journaling does similar. If the power goes out or the system crashes mid-Big Data Write, the goal is to get the file system back into sane shape so the system can come back up and resume its tasks, NOT that the 1.7TB of a 1.8TB write will be sitting on disk waiting for you, or that your database is consistent. It is entirely likely -- probable, in fact -- that you will find your actively written file truncated to zero bytes. Depending on your application, this is probably a GOOD thing -- if you find a zero byte file, that normally means something went wrong (or hasn't yet gone right). A 1.7TB file? You have no idea if that's complete or not. If you want true "data safety", you probably want some kind of application transaction tracking BEYOND the file system. Nick. > > Thank you, > Currell > > -- Original Message -- > From: "Alexandre Ratchov" > To: currellbe...@gmail.com > Cc: misc@openbsd.org > Sent: 1/19/2015 4:44:59 AM > Subject: Re: What are the disadvantages of soft updates? > >>On Mon, Jan 19, 2015 at 03:59:34AM +, currellbe...@gmail.com wrote: >>> Hello, >>> >>> The FAQ[1] states that soft updates result in "a large performance >>>increase >>> in disk writing performance," and links to a resource[2] which claims >>>that >>> soft updates, in addition to being a performance enhancement, "can >>>also >>> maintain better disk consistency." Resource 2 links to several >>>academic >>> papers[3][4], which while they are a bit above my level, contain >>>discussions >>> of how soft updates can increase performance and speed recovery on >>>crash. >>> >>> My question is: what are the downsides of soft updates? >> >>- softdep consumes more cpu in kernel mode, which hurts interactive >> programms on very slow machines. It has the reputation of >> consuming more memory. >> >>- the softdep code is more complex (likely to have more bugs). >> >>> Also, does journaling provide a better data-safety guarantee? >> >>They are not the same. On OpenBSD, softdep makes cerain operations >>much faster while ensuring that upon power loss, all >>inconsistencies can be automatically fixed by fsck on next boot. >> >>Journaling would write data twice (first in the journal, then in >>the filesystem) and would allow last operations to be replayed on >>next boot, so no need to run fsck, which in turn makes system boot >>fast after a power loss. >> >>In theory, from data safety point of view they are equivalent.
Re: Whereis my Gbytes on hdd
Dmitry, your free space is after the k partition. 286442096 512 byte blocks = 136.5862350464 G The allocated space is consistent, i.e. without holes ... # sizeoffset END a: 2097152 64 2097216 b: 2569344 2097216 4666560 c: 976773168 0 d: 8388608 4666560 13055168 e: 124787201305516825533888 f: 4194304 2553388829728192 g: 2097152 2972819231825344 h: 209715203182534452796864 i: 4194304 5279686456991168 j: 4194304 5699116861185472 k: 629145600 61185472690331072 286442096 690331072 there are 286442096 unallocated blocks (976773168 - 690331072) Best regards, Jan On Tue, Jan 20, 2015 at 12:40:38AM +0500, Dmitry Orlov wrote: > What place in disklabel output point me unallocated space? > > And how i can "allocate" "unallocated" ? :) > > Below output without -h > > # disklabel sd0 > # /dev/rsd0c: > type: SCSI > disk: SCSI disk > label: Hitachi HTS72755 > duid: 1881213cdc5807e9 > flags: > bytes/sector: 512 > sectors/track: 36 > tracks/cylinder: 158 > sectors/cylinder: 5688 > cylinders: 171725 > total sectors: 976773168 > boundstart: 64 > boundend: 976771800 > drivedata: 0 > > 16 partitions: > #size offset fstype [fsize bsize cpg] > a: 2097152 64 4.2BSD 2048 163841 # / > b: 2569344 2097216swap # none > c:9767731680 unused > d: 8388608 4666560 4.2BSD 2048 163841 # /tmp > e: 12478720 13055168 4.2BSD 2048 163841 # /var > f: 4194304 25533888 4.2BSD 2048 163841 # /usr > g: 2097152 29728192 4.2BSD 2048 163841 # > /usr/X11R6 > h: 20971520 31825344 4.2BSD 2048 163841 # > /usr/local > i: 4194304 52796864 4.2BSD 2048 163841 # /usr/src > j: 4194304 56991168 4.2BSD 2048 163841 # /usr/obj > k:629145600 61185472 4.2BSD 4096 327681 # /home > > > On 20.01.2015 00:34, Philip Guenther wrote: > >On Mon, Jan 19, 2015 at 11:20 AM, Dmitry Orlov > >wrote: > >>Capacity is 465.8G > >>Sum of labels is > >> > >>1.0G+1.2G+4.0G+6.0G+2.0G+1.0G+10.0G+2.0G+2.0G+300.0G = 329.2G > >> > >>Where is 136.6G ? > >> > >> > >># disklabel -h sd0 > >># /dev/rsd0c: > >... > >>16 partitions: > >>#size offset fstype [fsize bsize cpg] > >> a: 1.0G 64 4.2BSD 2048 163841 # / > >> b: 1.2G 2097216swap # none > >> c: 465.8G0 unused > >> d: 4.0G 4666560 4.2BSD 2048 163841 # /tmp > >> e: 6.0G 13055168 4.2BSD 2048 163841 # /var > >> f: 2.0G 25533888 4.2BSD 2048 163841 # /usr > >> g: 1.0G 29728192 4.2BSD 2048 163841 # > >>/usr/X11R6 > >> h:10.0G 31825344 4.2BSD 2048 163841 # > >>/usr/local > >> i: 2.0G 52796864 4.2BSD 2048 163841 # /usr/src > >> j: 2.0G 56991168 4.2BSD 2048 163841 # /usr/obj > >> k: 300.0G 61185472 4.2BSD 4096 327681 # /home > > > >You'll need to compare that output with the output of "disklabel sd0", > >without the -h option, to figure out whether there's unallocated space > >after some partition(s), or if it's a math error in the -h display. > > > > > >Philip Guenther > -- Be the change you want to see in the world.
Re: Whereis my Gbytes on hdd
Sorry. I thought that all the remaining space is distributed to /home. On 20.01.2015 00:34, Philip Guenther wrote: > On Mon, Jan 19, 2015 at 11:20 AM, Dmitry Orlov > wrote: >> Capacity is 465.8G >> Sum of labels is >> >> 1.0G+1.2G+4.0G+6.0G+2.0G+1.0G+10.0G+2.0G+2.0G+300.0G = 329.2G >> >> Where is 136.6G ? >> >> >> # disklabel -h sd0 >> # /dev/rsd0c: > ... >> 16 partitions: >> #size offset fstype [fsize bsize cpg] >>a: 1.0G 64 4.2BSD 2048 163841 # / >>b: 1.2G 2097216swap # none >>c: 465.8G0 unused >>d: 4.0G 4666560 4.2BSD 2048 163841 # /tmp >>e: 6.0G 13055168 4.2BSD 2048 163841 # /var >>f: 2.0G 25533888 4.2BSD 2048 163841 # /usr >>g: 1.0G 29728192 4.2BSD 2048 163841 # >> /usr/X11R6 >>h:10.0G 31825344 4.2BSD 2048 163841 # >> /usr/local >>i: 2.0G 52796864 4.2BSD 2048 163841 # /usr/src >>j: 2.0G 56991168 4.2BSD 2048 163841 # /usr/obj >>k: 300.0G 61185472 4.2BSD 4096 327681 # /home > > You'll need to compare that output with the output of "disklabel sd0", > without the -h option, to figure out whether there's unallocated space > after some partition(s), or if it's a math error in the -h display. > > > Philip Guenther
Re: Whereis my Gbytes on hdd
What place in disklabel output point me unallocated space? And how i can "allocate" "unallocated" ? :) Below output without -h # disklabel sd0 # /dev/rsd0c: type: SCSI disk: SCSI disk label: Hitachi HTS72755 duid: 1881213cdc5807e9 flags: bytes/sector: 512 sectors/track: 36 tracks/cylinder: 158 sectors/cylinder: 5688 cylinders: 171725 total sectors: 976773168 boundstart: 64 boundend: 976771800 drivedata: 0 16 partitions: #size offset fstype [fsize bsize cpg] a: 2097152 64 4.2BSD 2048 163841 # / b: 2569344 2097216swap # none c:9767731680 unused d: 8388608 4666560 4.2BSD 2048 163841 # /tmp e: 12478720 13055168 4.2BSD 2048 163841 # /var f: 4194304 25533888 4.2BSD 2048 163841 # /usr g: 2097152 29728192 4.2BSD 2048 163841 # /usr/X11R6 h: 20971520 31825344 4.2BSD 2048 163841 # /usr/local i: 4194304 52796864 4.2BSD 2048 163841 # /usr/src j: 4194304 56991168 4.2BSD 2048 163841 # /usr/obj k:629145600 61185472 4.2BSD 4096 327681 # /home On 20.01.2015 00:34, Philip Guenther wrote: On Mon, Jan 19, 2015 at 11:20 AM, Dmitry Orlov wrote: Capacity is 465.8G Sum of labels is 1.0G+1.2G+4.0G+6.0G+2.0G+1.0G+10.0G+2.0G+2.0G+300.0G = 329.2G Where is 136.6G ? # disklabel -h sd0 # /dev/rsd0c: ... 16 partitions: #size offset fstype [fsize bsize cpg] a: 1.0G 64 4.2BSD 2048 163841 # / b: 1.2G 2097216swap # none c: 465.8G0 unused d: 4.0G 4666560 4.2BSD 2048 163841 # /tmp e: 6.0G 13055168 4.2BSD 2048 163841 # /var f: 2.0G 25533888 4.2BSD 2048 163841 # /usr g: 1.0G 29728192 4.2BSD 2048 163841 # /usr/X11R6 h:10.0G 31825344 4.2BSD 2048 163841 # /usr/local i: 2.0G 52796864 4.2BSD 2048 163841 # /usr/src j: 2.0G 56991168 4.2BSD 2048 163841 # /usr/obj k: 300.0G 61185472 4.2BSD 4096 327681 # /home You'll need to compare that output with the output of "disklabel sd0", without the -h option, to figure out whether there's unallocated space after some partition(s), or if it's a math error in the -h display. Philip Guenther
Re: Whereis my Gbytes on hdd
As result of default installation process. Whole Disk + Automatic disklabel On 20.01.2015 00:27, Jan Stary wrote: On Jan 20 00:20:55, dmitry.sen...@gmail.com wrote: Hi! OpenBSD 5.7 (19 Jan 2015) Strange math. for me. Capacity is 465.8G Sum of labels is 1.0G+1.2G+4.0G+6.0G+2.0G+1.0G+10.0G+2.0G+2.0G+300.0G = 329.2G Where is 136.6G ? Unallocated after sd0k? Or did your last partition just happen to have exactly 300G? # disklabel -h sd0 # /dev/rsd0c: type: SCSI disk: SCSI disk label: Hitachi HTS72755 duid: 1881213cdc5807e9 flags: bytes/sector: 512 sectors/track: 36 tracks/cylinder: 158 sectors/cylinder: 5688 cylinders: 171725 total sectors: 976773168 # total bytes: 465.8G boundstart: 64 boundend: 976771800 drivedata: 0 16 partitions: #size offset fstype [fsize bsize cpg] a: 1.0G 64 4.2BSD 2048 163841 # / b: 1.2G 2097216swap # none c: 465.8G0 unused d: 4.0G 4666560 4.2BSD 2048 163841 # /tmp e: 6.0G 13055168 4.2BSD 2048 163841 # /var f: 2.0G 25533888 4.2BSD 2048 163841 # /usr g: 1.0G 29728192 4.2BSD 2048 163841 # /usr/X11R6 h:10.0G 31825344 4.2BSD 2048 163841 # /usr/local i: 2.0G 52796864 4.2BSD 2048 163841 # /usr/src j: 2.0G 56991168 4.2BSD 2048 163841 # /usr/obj k: 300.0G 61185472 4.2BSD 4096 327681 # /home
Re: Whereis my Gbytes on hdd
>From disklabel(8): Space left after all partitions have reached their maximum size is left unallocated. On 1/19/15, Dmitry Orlov wrote: > Hi! > > OpenBSD 5.7 (19 Jan 2015) > > Strange math. for me. > > Capacity is 465.8G > Sum of labels is > > 1.0G+1.2G+4.0G+6.0G+2.0G+1.0G+10.0G+2.0G+2.0G+300.0G = 329.2G > > Where is 136.6G ? > > > # disklabel -h sd0 > # /dev/rsd0c: > type: SCSI > disk: SCSI disk > label: Hitachi HTS72755 > duid: 1881213cdc5807e9 > flags: > bytes/sector: 512 > sectors/track: 36 > tracks/cylinder: 158 > sectors/cylinder: 5688 > cylinders: 171725 > total sectors: 976773168 # total bytes: 465.8G > boundstart: 64 > boundend: 976771800 > drivedata: 0 > > 16 partitions: > #size offset fstype [fsize bsize cpg] >a: 1.0G 64 4.2BSD 2048 163841 # / >b: 1.2G 2097216swap # none >c: 465.8G0 unused >d: 4.0G 4666560 4.2BSD 2048 163841 # /tmp >e: 6.0G 13055168 4.2BSD 2048 163841 # /var >f: 2.0G 25533888 4.2BSD 2048 163841 # /usr >g: 1.0G 29728192 4.2BSD 2048 163841 # > /usr/X11R6 >h:10.0G 31825344 4.2BSD 2048 163841 # > /usr/local >i: 2.0G 52796864 4.2BSD 2048 163841 # > /usr/src >j: 2.0G 56991168 4.2BSD 2048 163841 # > /usr/obj >k: 300.0G 61185472 4.2BSD 4096 327681 # /home
Re: Whereis my Gbytes on hdd
On Mon, Jan 19, 2015 at 11:20 AM, Dmitry Orlov wrote: > Capacity is 465.8G > Sum of labels is > > 1.0G+1.2G+4.0G+6.0G+2.0G+1.0G+10.0G+2.0G+2.0G+300.0G = 329.2G > > Where is 136.6G ? > > > # disklabel -h sd0 > # /dev/rsd0c: ... > 16 partitions: > #size offset fstype [fsize bsize cpg] > a: 1.0G 64 4.2BSD 2048 163841 # / > b: 1.2G 2097216swap # none > c: 465.8G0 unused > d: 4.0G 4666560 4.2BSD 2048 163841 # /tmp > e: 6.0G 13055168 4.2BSD 2048 163841 # /var > f: 2.0G 25533888 4.2BSD 2048 163841 # /usr > g: 1.0G 29728192 4.2BSD 2048 163841 # > /usr/X11R6 > h:10.0G 31825344 4.2BSD 2048 163841 # > /usr/local > i: 2.0G 52796864 4.2BSD 2048 163841 # /usr/src > j: 2.0G 56991168 4.2BSD 2048 163841 # /usr/obj > k: 300.0G 61185472 4.2BSD 4096 327681 # /home You'll need to compare that output with the output of "disklabel sd0", without the -h option, to figure out whether there's unallocated space after some partition(s), or if it's a math error in the -h display. Philip Guenther
Re: Whereis my Gbytes on hdd
On Jan 20 00:20:55, dmitry.sen...@gmail.com wrote: > Hi! > > OpenBSD 5.7 (19 Jan 2015) > > Strange math. for me. > > Capacity is 465.8G > Sum of labels is > > 1.0G+1.2G+4.0G+6.0G+2.0G+1.0G+10.0G+2.0G+2.0G+300.0G = 329.2G > > Where is 136.6G ? Unallocated after sd0k? Or did your last partition just happen to have exactly 300G? > # disklabel -h sd0 > # /dev/rsd0c: > type: SCSI > disk: SCSI disk > label: Hitachi HTS72755 > duid: 1881213cdc5807e9 > flags: > bytes/sector: 512 > sectors/track: 36 > tracks/cylinder: 158 > sectors/cylinder: 5688 > cylinders: 171725 > total sectors: 976773168 # total bytes: 465.8G > boundstart: 64 > boundend: 976771800 > drivedata: 0 > > 16 partitions: > #size offset fstype [fsize bsize cpg] > a: 1.0G 64 4.2BSD 2048 163841 # / > b: 1.2G 2097216swap # none > c: 465.8G0 unused > d: 4.0G 4666560 4.2BSD 2048 163841 # /tmp > e: 6.0G 13055168 4.2BSD 2048 163841 # /var > f: 2.0G 25533888 4.2BSD 2048 163841 # /usr > g: 1.0G 29728192 4.2BSD 2048 163841 # > /usr/X11R6 > h:10.0G 31825344 4.2BSD 2048 163841 # > /usr/local > i: 2.0G 52796864 4.2BSD 2048 163841 # /usr/src > j: 2.0G 56991168 4.2BSD 2048 163841 # /usr/obj > k: 300.0G 61185472 4.2BSD 4096 327681 # /home
Re: Martin Luther King Jr. Day
On Mon, 19 Jan 2015, Alexander Hall wrote: > On January 19, 2015 5:43:58 PM CET, Richard wrote: > >Today is Martin Luther King Jr. Day in the United States, > >a federal holiday in all 52 states. > > Darn, man. That subject and initial sentence was pretty darn close to hit the > spam training bucket. :-) > It does look like spam. As ropers pointed out to me, there are 50 states not 52... The point I want to make is that Martin Luther King Jr. Day is a holiday in all US states, not just New York state alone. Richard
Whereis my Gbytes on hdd
Hi! OpenBSD 5.7 (19 Jan 2015) Strange math. for me. Capacity is 465.8G Sum of labels is 1.0G+1.2G+4.0G+6.0G+2.0G+1.0G+10.0G+2.0G+2.0G+300.0G = 329.2G Where is 136.6G ? # disklabel -h sd0 # /dev/rsd0c: type: SCSI disk: SCSI disk label: Hitachi HTS72755 duid: 1881213cdc5807e9 flags: bytes/sector: 512 sectors/track: 36 tracks/cylinder: 158 sectors/cylinder: 5688 cylinders: 171725 total sectors: 976773168 # total bytes: 465.8G boundstart: 64 boundend: 976771800 drivedata: 0 16 partitions: #size offset fstype [fsize bsize cpg] a: 1.0G 64 4.2BSD 2048 163841 # / b: 1.2G 2097216swap # none c: 465.8G0 unused d: 4.0G 4666560 4.2BSD 2048 163841 # /tmp e: 6.0G 13055168 4.2BSD 2048 163841 # /var f: 2.0G 25533888 4.2BSD 2048 163841 # /usr g: 1.0G 29728192 4.2BSD 2048 163841 # /usr/X11R6 h:10.0G 31825344 4.2BSD 2048 163841 # /usr/local i: 2.0G 52796864 4.2BSD 2048 163841 # /usr/src j: 2.0G 56991168 4.2BSD 2048 163841 # /usr/obj k: 300.0G 61185472 4.2BSD 4096 327681 # /home
Re: What are the disadvantages of soft updates?
I infer from your response that soft updates possess: 1. increased overhead over default FFS settings. 2. increased implementation complexity over default FFS settings. Also, I infer that journaling and soft updates provide equivalent data safety guarantees "in theory." Do they provide equivalent guarantees in practice? Thank you, Currell -- Original Message -- From: "Alexandre Ratchov" To: currellbe...@gmail.com Cc: misc@openbsd.org Sent: 1/19/2015 4:44:59 AM Subject: Re: What are the disadvantages of soft updates? On Mon, Jan 19, 2015 at 03:59:34AM +, currellbe...@gmail.com wrote: Hello, The FAQ[1] states that soft updates result in "a large performance increase in disk writing performance," and links to a resource[2] which claims that soft updates, in addition to being a performance enhancement, "can also maintain better disk consistency." Resource 2 links to several academic papers[3][4], which while they are a bit above my level, contain discussions of how soft updates can increase performance and speed recovery on crash. My question is: what are the downsides of soft updates? - softdep consumes more cpu in kernel mode, which hurts interactive programms on very slow machines. It has the reputation of consuming more memory. - the softdep code is more complex (likely to have more bugs). Also, does journaling provide a better data-safety guarantee? They are not the same. On OpenBSD, softdep makes cerain operations much faster while ensuring that upon power loss, all inconsistencies can be automatically fixed by fsck on next boot. Journaling would write data twice (first in the journal, then in the filesystem) and would allow last operations to be replayed on next boot, so no need to run fsck, which in turn makes system boot fast after a power loss. In theory, from data safety point of view they are equivalent.
Re: Ruby 2.2.0 build fails on OpenBSD 5.5
On Mon, Jan 19, 2015 at 9:19 AM, wrote: > Hi! > > Anybody know why I'm getting this Ruby 2.2.0 build error? > > % uname -a > OpenBSD dev.my.domain 5.5 GENERIC#276 i386 > % ruby-install ruby 2.2.0 > ... > linking shared-object digest/sha2.so > installing default sha2 libraries > generating constant definitions > compiling etc.c > linking shared-object etc.so > compiling fcntl.c > linking shared-object fcntl.so > compiling fiber.c > linking shared-object fiber.so > *** Parse error in /home/dev/src/ruby-2.2.0/ext/fiddle: Wrong mix of > special targets (Makefile:370) > .PHONYclean-libffidistclean-libffirealclean-libffi > *** Parse error: Wrong mix of special targets (Makefile:371) > .PHONYclean-nonedistclean-nonerealclean-none > *** Parse error: Wrong mix of special targets (Makefile:377) > .PHONYconfigure > *** Error 1 in . (exts.mk:177 'ext/fiddle/all') > *** Error 1 in /home/dev/src/ruby-2.2.0 (Makefile:684 'build-ext') > !!! Compiling ruby 2.2.0 failed! > > Thanks! > > O.D. > > Our make doesn't handle some syntax they used in that file. I'm not sure if it's an issue with our make or a bug in exts.mk. It's currently patched out in the lang/ruby/2.2 port. Thanks, Jeremy
Re: Clarification on patching 5.5-release...
On Mon, Jan 19, 2015 at 08:11, Stuart Henderson wrote: > On 2015-01-17, Daniel Dickman wrote: >>> 1) Can patches be applied selectively and out of order? >> >> Don't do that. > > Actually, yes they can. If you can identify that a particular patch > doesn't apply to your use of the system there's no particular need to > apply it. I can't think of any patches where the order matters, though > it might happen occasionally. I wouldn't trust all the libssl diffs to apply cleanly out of order.
Re: Martin Luther King Jr. Day
On January 19, 2015 5:43:58 PM CET, Richard wrote: >Today is Martin Luther King Jr. Day in the United States, >a federal holiday in all 52 states. Darn, man. That subject and initial sentence was pretty darn close to hit the spam training bucket. :-) /Alexander > >The /usr/bin/calendar program shows incorrectly that yesterday, Jan 18, >was Martin Luther King day in New York. > >And it does not show that today, Jan 19 the third Monday in January, >is >the correct US holiday. > >Below are my suggested patches to calendar.holiday and >calendar.usholiday: > >Richard Narron >- >--- calendar.holiday.orig Mon Jan 19 00:33:44 2015 >+++ calendar.holidayMon Jan 19 08:16:06 2015 >@@ -32,7 +32,6 @@ > 01/19 Nameday of Archbishop Makarios in Cyprus > 01/20 Army Day in Mali > 01/20 National Heroes Day in Guinea-Bissau >-01/SunThirdMartin Luther King Day in New York (3rd Sunday) > 01/MonThirdRobert E. Lee's Birthday in Alabama & Mississippi (3rd >Monday) > 01/MonThirdLee-Jackson Day in Virginia (3rd Monday) > 01/21 Our Lady of Altagracia in Dominican Republic > >--- calendar.usholiday.orig Mon Jan 19 00:33:44 2015 >+++ calendar.usholiday Mon Jan 19 08:06:28 2015 >@@ -8,6 +8,7 @@ > #define _calendar_usholiday_ > > 01/01 New Year's Day >+01/MonThirdMartin Luther King Jr. Day (3rd Monday of January) > 02/02 Groundhog Day > 02/14 St. Valentine's Day > 02/MonThirdPresident's Day (3rd Monday of February)
Ruby 2.2.0 build fails on OpenBSD 5.5
Hi! Anybody know why I'm getting this Ruby 2.2.0 build error? % uname -a OpenBSD dev.my.domain 5.5 GENERIC#276 i386 % ruby-install ruby 2.2.0 ... linking shared-object digest/sha2.so installing default sha2 libraries generating constant definitions compiling etc.c linking shared-object etc.so compiling fcntl.c linking shared-object fcntl.so compiling fiber.c linking shared-object fiber.so *** Parse error in /home/dev/src/ruby-2.2.0/ext/fiddle: Wrong mix of special targets (Makefile:370) .PHONYclean-libffidistclean-libffirealclean-libffi *** Parse error: Wrong mix of special targets (Makefile:371) .PHONYclean-nonedistclean-nonerealclean-none *** Parse error: Wrong mix of special targets (Makefile:377) .PHONYconfigure *** Error 1 in . (exts.mk:177 'ext/fiddle/all') *** Error 1 in /home/dev/src/ruby-2.2.0 (Makefile:684 'build-ext') !!! Compiling ruby 2.2.0 failed! Thanks! O.D.
Network redirection
Hi, I need help for this problem: (router1 and router2 are openbsd router, pc1 can be anything) pc1 --- | router1 (b1) - (b2) router2 (a2) - internet (a1) | --- internet I want all outgoing packets from pc1 going to internet through interface router2 (a2) (default gateway, working fine) But incomming connection to pc1 can be redirected from router1 (a1) or from router2 (a2). From router2 (a2) it works just fine, but from router1 (a1), the SYN is correctly received but the answer go through router2 (a2) so it doesn't work? How to achieve this? I've tried to play with mpath but not working. Thanks by adavance, Sebastien
Martin Luther King Jr. Day
Today is Martin Luther King Jr. Day in the United States, a federal holiday in all 52 states. The /usr/bin/calendar program shows incorrectly that yesterday, Jan 18, was Martin Luther King day in New York. And it does not show that today, Jan 19 the third Monday in January, is the correct US holiday. Below are my suggested patches to calendar.holiday and calendar.usholiday: Richard Narron - --- calendar.holiday.orig Mon Jan 19 00:33:44 2015 +++ calendar.holidayMon Jan 19 08:16:06 2015 @@ -32,7 +32,6 @@ 01/19 Nameday of Archbishop Makarios in Cyprus 01/20 Army Day in Mali 01/20 National Heroes Day in Guinea-Bissau -01/SunThirdMartin Luther King Day in New York (3rd Sunday) 01/MonThirdRobert E. Lee's Birthday in Alabama & Mississippi (3rd Monday) 01/MonThirdLee-Jackson Day in Virginia (3rd Monday) 01/21 Our Lady of Altagracia in Dominican Republic --- calendar.usholiday.orig Mon Jan 19 00:33:44 2015 +++ calendar.usholiday Mon Jan 19 08:06:28 2015 @@ -8,6 +8,7 @@ #define _calendar_usholiday_ 01/01 New Year's Day +01/MonThirdMartin Luther King Jr. Day (3rd Monday of January) 02/02 Groundhog Day 02/14 St. Valentine's Day 02/MonThirdPresident's Day (3rd Monday of February)
Re: man shutdown 8 diff in BSDs
> >> OpenBSD > >> # shutdown -ph 1501161730 > >> > >> other BSDs > >> # shutdown -p 1501161730 > > > > It makes sense to me to imply -h when specifying -p. > > I'd love it, but for all I know somebody may have a strong opinion > against it. I don't have anything against it. -p was added a very very long time ago. Do take note that the proposed change would forever block the addition of non-halting poweroff. :-)
Re: man shutdown 8 diff in BSDs
On 2015-01-19, Remco wrote: >> OpenBSD >> # shutdown -ph 1501161730 >> >> other BSDs >> # shutdown -p 1501161730 > > It makes sense to me to imply -h when specifying -p. I'd love it, but for all I know somebody may have a strong opinion against it. On the one hand, "shutdown -hp" is inconsistent because we don't have "shutdown -hr" either. On the other hand, "-hp" mirrors "halt -p". > --- shutdown.c16 Jan 2015 06:40:01 - 1.38 > +++ shutdown.c19 Jan 2015 12:03:03 - > @@ -134,6 +134,7 @@ main(int argc, char *argv[]) > nosync = 1; > break; > case 'p': > + dohalt = 1; > dopower = 1; > break; > case 'r': I don't like this. Instead, all the places that handle dohalt and doreboot should be extended with dopower; see the FreeBSD code. -- Christian "naddy" Weisgerber na...@mips.inka.de
Please help upvote OpenBSD at DigitalOcean (again)
Hi, As we all know DigitalOcean now supports FreeBSD. Despite over half of the upvotes at the main BSD thread (https://digitalocean.uservoice.com/forums/136585-digitalocean/suggestions/3232571-support-bsd-os) being for OpenBSD, OpenBSD users have been forced to open up their own separate request thread: http://digitalocean.uservoice.com/forums/136585-digitalocean/suggestions/6963821-support-openbsd So please stop by and give us your upvotes. Thanks! O.D.
Re: man shutdown 8 diff in BSDs
f5b wrote: > Want > Power off host at the specified time using "shutdown" > > OpenBSD > # shutdown -ph 1501161730 > > other BSDs > # shutdown -p 1501161730 > > Why? Will we sync? > > > man shutdown 8 in OpenBSD > -h The system is halted at the specified time when shutdown execs > halt(8). > -p The -p flag is passed on to halt(8), causing machines which > support automatic power down to do so after halting. > > It makes sense to me to imply -h when specifying -p. To me the man page already implies the -h option when passing -p. The code appears to require -h to be set for -p to work. I think making -h implicit when specifying -p meets this requirement. This patch changes that, it also removes a check that I think cannot be triggered anymore. (tested only once, use at your own risk !) Index: shutdown.c === RCS file: /cvs/src/sbin/shutdown/shutdown.c,v retrieving revision 1.38 diff -u -p -u -r1.38 shutdown.c --- shutdown.c 16 Jan 2015 06:40:01 - 1.38 +++ shutdown.c 19 Jan 2015 12:03:03 - @@ -134,6 +134,7 @@ main(int argc, char *argv[]) nosync = 1; break; case 'p': + dohalt = 1; dopower = 1; break; case 'r': @@ -156,11 +157,6 @@ main(int argc, char *argv[]) if (doreboot && dohalt) { (void)fprintf(stderr, "shutdown: incompatible switches -h and -r.\n"); - usage(); - } - if (dopower && !dohalt) { - (void)fprintf(stderr, - "shutdown: switch -p must be used with -h.\n"); usage(); } getoffset(*argv++);
Re: Report of an NSA Employee about a Backdoor in the OpenSSH Daemon [pdf] (spiegel.de)
On Sat, Jan 17, 2015, at 11:41 PM, Stefan Sperling wrote: > On Sat, Jan 17, 2015 at 10:59:19PM +0100, Daniel Cegiełka wrote: > > http://www.spiegel.de/media/media-35663.pdf > > > > "PANT SPARTY is a backdoor in the SSH daemon for *NIX, based on > > OpenSSH portable" > > They are not talking about the official OpenSSH code. > > To save everyone a bit of time (and hassle with a PDF), from the same > document: > > "It allows a public key to be embedded in the sshd binary and will then > always grant a root login shell if presented with the proper key pair > for that key. [...] authorized_keys as a quick-and-easy method of > persistence [...] obviously isn't very stealthy [...] The goal for this > project was to provide the same level of persistence but embedded in > the sshd binary itself (obviously, assuming root access, as before)" > > In other works, no backdoor in sshd unless the system has already been > rooted by other means and sshd replaced with a bugged binary. Boohoo. > Stefan correctly mentions that the document specifically talks about the portable version. Some interesting things I found in the document: - it's not a stealthy upstreamed backdoor - just local source modifications that are supposed to be dropped on an already compromised system (like Stefan mentioned) - the code was modified to allow root login regardless of configuration - 'SSH has a _lot_ of checks to make sure you can't switch usernames in the middle of a login (go figure) so this was a bit tricky to bypass'. That's a nice advertisment for the quality of OpenSSH code base :) even with source access the guy had to jump hoops to achieve login switching - '..wanted to allow an arbitrary username to be provided... This led to all sorts of problems where I didn't even get a valid authorization context at all, and I couldn't manually call the C function to get one for root because the connection is a de-privileged child process'. Again a nice advertisment for OpenSSH :) - fake accounts can login, the log will state it failed and hide the fact that ssh authed an authorized key for root It took him 2 days, with full source code access and intrusive checks added to the code in order to disable the internal mitigations in OpenSSH. I seriously doubt a change like that could be upstreamed without anyone noticing :) Regards, -- Adam Wolk adam.w...@koparo.com
softdep FAQ wording
A performance increase in performance? Jan --- faq14.html.orig Mon Jan 19 11:53:40 2015 +++ faq14.html Mon Jan 19 11:53:53 2015 @@ -898,7 +898,7 @@ and Yale Patt and developed for FreeBSD by SoftUpdates imposes a partial ordering on the buffer cache operations which permits the requirement for synchronous writing of directory entries to be removed from the FFS code. Thus, a large -performance increase is seen in disk writing performance. +performance increase is seen in disk writing. Enabling soft updates must be done with a mount-time option. When
Re: What are the disadvantages of soft updates?
On Mon, Jan 19, 2015 at 03:59:34AM +, currellbe...@gmail.com wrote: > Hello, > > The FAQ[1] states that soft updates result in "a large performance increase > in disk writing performance," and links to a resource[2] which claims that > soft updates, in addition to being a performance enhancement, "can also > maintain better disk consistency." Resource 2 links to several academic > papers[3][4], which while they are a bit above my level, contain discussions > of how soft updates can increase performance and speed recovery on crash. > > My question is: what are the downsides of soft updates? - softdep consumes more cpu in kernel mode, which hurts interactive programms on very slow machines. It has the reputation of consuming more memory. - the softdep code is more complex (likely to have more bugs). > Also, does journaling provide a better data-safety guarantee? They are not the same. On OpenBSD, softdep makes cerain operations much faster while ensuring that upon power loss, all inconsistencies can be automatically fixed by fsck on next boot. Journaling would write data twice (first in the journal, then in the filesystem) and would allow last operations to be replayed on next boot, so no need to run fsck, which in turn makes system boot fast after a power loss. In theory, from data safety point of view they are equivalent.
Re: OpenBSD 5.5 ISAKMPD
On 1/19/15 3:19 AM, Stuart Henderson wrote: > On 2015-01-17, Daniel Ouellet wrote: >> Just go to 5.6 or even better to current that is almost 5.7 now and use >> ikev2 instead. > > This might add confusion though, ikev2 (iked) isn't compatible with v1, > and I'm imagining that somebody with a specific set of parameters to use will > be connecting to an existing vpn. > True, but the man page indicate this clearly. I assume someone would read the man page. Or they may use this instead of the version 1. But yes you are 100% correct. As I said at the end of my suggestion, trying it and he may fall in love with. I didn't say it was the solution for all.
Re: Symon on 5.6
On 2015-01-15, Steve Shockley wrote: > On 1/14/2015 9:47 AM, Predrag Punosevac wrote: >>> and I ran >>> the chroot enable script from rrdtool. > >> As documented in the rrdtool pkg-readme, you must do: >> /usr/local/share/examples/rrdtool/rrdtool-chroot enable >> >> You should look under /usr/local/share/doc/pkg-readmes/, it comes with a >> *lot* of OpenBSD specific information.. > > Thanks. I did run rrd-chroot enable, and changed rrdtool_path in > setup.inc to /usr/local/bin/rrdtool (which is where rrdtool-chroot > copies it in the chroot). Even with that, nothing worked until I > coincidentally copied /bin/sh to the chroot. > > Maybe $this->exec($cmdline) in php (class_rrdtool.inc line 103) requires > sh? But that wouldn't explain if it works for everyone else. Various things in php (including the function to send mail) require /bin/sh.
Re: OpenBSD 5.5 ISAKMPD
On 2015-01-17, Daniel Ouellet wrote: > Just go to 5.6 or even better to current that is almost 5.7 now and use > ikev2 instead. This might add confusion though, ikev2 (iked) isn't compatible with v1, and I'm imagining that somebody with a specific set of parameters to use will be connecting to an existing vpn.
Re: Clarification on patching 5.5-release...
> On 2015-01-17, Daniel Dickman wrote: > >> 1) Can patches be applied selectively and out of order? > > > > Don't do that. > > Actually, yes they can. If you can identify that a particular patch > doesn't apply to your use of the system there's no particular need to > apply it. I can't think of any patches where the order matters, though > it might happen occasionally. Around 3 releases ago we noticed that our patches were becoming quite independent. That made me wonder whether we could make the descriptions less assertive. That might make people relax a bit, so they don't need to get a in a panic over a every diff for a feature they don't use. Don't worry. When diffs overlap in the future, we'll let you know. Otherwise, just track the assessments and make a decision. Risks have been quite low.
Re: Clarification on patching 5.5-release...
On 2015-01-17, Daniel Dickman wrote: >> 1) Can patches be applied selectively and out of order? > > Don't do that. Actually, yes they can. If you can identify that a particular patch doesn't apply to your use of the system there's no particular need to apply it. I can't think of any patches where the order matters, though it might happen occasionally.