Re: [DNG] backup

2020-05-19 Thread Rod Rodolico
As an aside, I have a set of USB drives at a client location. All have
the label "archives" on the partition. I then create an fstab entry:

LABEL=archives /media/archives ext4 noauto 0 2

or something like that (I don't remember the exact entry). They swap the
drives out at will, and just before the backup begins, I try to mount
/media/archives.

The client wanted to rotate 5 drives throughout the week to back up the
backup service we provide, and it has worked well for them.

Rod

On 5/19/20 10:56 AM, william moss via Dng wrote:
> If you set the partition label for the target of a file system archive,
> then the use of findmnt eliminates the need for a special location. For
> example:
> findmnt -P -t ext4,xfs -o source,target,label
> 
> Note, the file systems in the example should be set to what you use for
> your archive media.
> 
> Since I back up to network attached storage, I parse the output of the
> following command to find a sub-directory of the primary mount points.
> findmnt -P -t cifs,nfs,auto -o source,target,label |& \
> while read Q
> do
>   [[ "${Q}" =~ LABEL=\"([^\"]*)\" ]] &&   
> LBL="${BASH_REMATCH[1]}"
>   [[ "${Q}" =~ TARGET=\"([^\"]*)\" ]] &&  
> TGT="${BASH_REMATCH[1]}/`hostname -s`"
>   [[ "${Q}" =~ SOURCE=\"([^\"]*)\" ]] &&  
> SRC="${BASH_REMATCH[1]}"  
> 
>   [ -n "$SRC" ] || continue
>   [ -n "$TGT" ] || continue
>   [ -d "$TGT" ] || continue
> 
>   # The actions to perform are then based on the source,
>   # the label (if any) and any other criteria that can be
>   # found with other options to findmnt.
>   ...
> done
> 
> I schedule the script that does. I use a custom run-crons
> (/usr/lib/cron/run-crons) but a script in /etc/cron.d would also be a
> good choice.
> 
> Rather than dmesg, try
> 
> alias lsblock='lsblk -o name,label,fstype,size,type,tran -x name'
> 

-- 
Rod Rodolico
Daily Data, Inc.
POB 140465
Dallas TX 75214-0465 US
http://dailydata.net
214.827.2170
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] f2fs and beowulf: installation

2020-05-19 Thread ael
On Tue, May 19, 2020 at 10:35:22PM +0200, Antony Stone wrote:
> On Tuesday 19 May 2020 at 22:30:50, ael wrote:
> 
> > I am hoping to install beowulf onto a new laptop in a week or two.
> > I use f2fs on several drives with good results, so I want to
> > use it on the root partition. f2fs seems the obvious choice on ssd's.
> 
> https://howtos.davidsebek.com/debian-f2fs.html may be what you need.

Thanks for that. That seems to be a workaround for the deficiences of
the debian installer, and I guess that I might have to do something like
that. But I was hoping that the devuan installer might be a bit better.

I hope that the devuan installer already has the f2fs modules in its
initramfs: despite that howto, I think that it is only the f2fs module
itself that is needed. So that would be a simple lightweight change to
the devuan version if it is not already there.

Then the f2fs-tools,libf2fs-format4 and libf2fs5 packages need to be
added to the pool. Is much else needed? 

I suppose that I might be able to build an installation image like that
myself and see what happens.

ael

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] f2fs and beowulf: installation

2020-05-19 Thread Antony Stone
On Tuesday 19 May 2020 at 22:30:50, ael wrote:

> I am hoping to install beowulf onto a new laptop in a week or two.
> I use f2fs on several drives with good results, so I want to
> use it on the root partition. f2fs seems the obvious choice on ssd's.

https://howtos.davidsebek.com/debian-f2fs.html may be what you need.


Antony.

-- 
Wanted: telepath.   You know where to apply.

   Please reply to the list;
 please *don't* CC me.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


[DNG] f2fs and beowulf: installation

2020-05-19 Thread ael
I am hoping to install beowulf onto a new laptop in a week or two.
I use f2fs on several drives with good results, so I want to
use it on the root partition. f2fs seems the obvious choice on ssd's.

I have just downloaded devuan_beowulf_3.0.0_RC_desktop-amd64.iso, loop
mounted it, and looked for any f2fs packages in the pool. I didn't
find anything, although I only used a rather simplistic 'find'
search.

Does the beowulf installer support f2fs as a root partition? Perhaps I
need to use the net-install approach? I see that grub has supported
f2fs for over two years, so that part should be OK.

ael

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] without-systemd.org not working

2020-05-19 Thread Rick Moen via Dng
Quoting Hendrik Boom (hend...@topoi.pooq.com):

> Specifically, it says:
> 
> "Do you think the Red Hat model would apply equally well to other
> areas of software?  "
> 
> "Red Hat's model works because of the complexity of the technology we
> work with. An operating platform has a lot of moving parts, and
> customers are willing to pay to be insulated from that complexity."
> 
> "I don't think you can take one finite element - like Apache - and
> make a business out of it [using our model]. You need product
> complexity."
> 
> Presumably Steve Litt's point is that Red Hat has to make the
> internals complex so that there's complexity to shield the costomer
> from.

Steve's is a classic non-testable paranoid conspiracy hypothesis.  
These have had fans on a recurring basis in (among other places)
Steve's native USA.  

https://harpers.org/archive/1964/11/the-paranoid-style-in-american-politics/

(Richard Hofstadter essay has never seemed more timely, and I don't mean 
in relation to Steve's theorising.)

-- 
Cheers,
Rick MoenDiaeresis:  Keeping the cow out of co-worker since 700 AD.
r...@linuxmafia.com
McQ! (4x80)   
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] When spaces aren't just spaces [Was] Has anybody else experienced Raspberry Pi breakage ?

2020-05-19 Thread tuxd3v

Hello,
Thanks for pointing that out :)
Unfortunately I am responding via the integrated editor in the webmail.

Citando marc :


Hello

This is a bit unrelated, but might be worth warning people about.  
Some editors
no longer seem to be satisfied inserting plain spaces, but now deem  
it necessary

the extra bytes . This might break small parsers which only consider
' ' and \t as a delimiter. 'cat -A' will help you find them

Below is the fstab entry that you included in your mail, run through 'cat -A'

and my fstab:$
'# cat /etc/fstab$
$
# M-BM- M-BM-  M-BM- M-BM- M-BM-  M-BM-  
M-BM- M-BM-  M-BM- M-BM- M-BM-  M-BM- M-BM- M-BM-   
M-BM-

M-BM- M-BM-  M-BM- M-BM- M-BM-  M-BM- $
/dev/mmcblk0p1M-BM- M-BM-  M-BM- M-BM- M-BM-  M-BM- /bootM-BM-  
M-BM-  M-BM- vfatM-BM- M-BM-  M-BM- defaultsM-BM- M-BM-  M-BM-  
M-BM- M-BM-  M-BM- 0M-BM- M-BM-  M-BM- M-BM- M-BM-  M-BM- 2$
/dev/mmcblk0p2M-BM- M-BM-  M-BM- M-BM- M-BM-  M-BM- /M-BM- M-BM-   
M-BM- ext4M-BM- M-BM-  M-BM- defaults,noatimeM-BM- M-BM-  M-BM-

0M-BM- M-BM-  M-BM- M-BM- M-BM-  M-BM- 1$
/dev/zram0 M-BM- M-BM-  M-BM- M-BM- M-BM-  M-BM- swapM-BM- M-BM-  
M-BM-  swapM-BM- M-BM- M-BM-  pri=1M-BM- M-BM-  M-BM- M-BM- M-BM-   
M-BM- M-BM- M-BM-  M-BM- 0M-BM- M-BM-  M-BM- M-BM- M-BM-  M-BM- 0'$

$


The copy &paste could bring indeed unwanted special chars..
I sould have no better, that webemail clients, usually do not comply

But Again, thanks for pointing that out :)

Best Regards,
tuxd3v
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Device naming: was Felker Init: was without-systemd.org not working

2020-05-19 Thread Rick Moen via Dng
Quoting Jim Jackson (j...@franjam.org.uk):

> My detachable backups devices have unique partitions labels and I place a 
> specifically named file in the root of the partition. My backup scripts 
> check for both and give up if they can't find both. THEN I do the dmesg 
> thing :-)

Both really good ideas.

I'm also reminded, by your mention of partition labels, of a real
stumper of a problem that was described many years ago on the Silicon
Valley Linux User Group mailing list:  A Linux host kernel panicked and
fell over any time a particular hard drive was physically attached to it
during boot up, but the hard drive was well behaved and had normal,
apparently valid Linux filesystems on it, as viewed on other Linux
hosts or using a live CD distro.

The solution was that the afflicted host had a partition with label of,
say, USR_PART, and the seemingly problematic hard drive also had one
with the identical label string.  The booting kernel got confused and
died because of the ambiguity, when it tried to parse and implement
/etc/fstab.

You did, of course, say _unique_ partition labels, which avoids that
gentleman's quite perplexing problem.

-- 
Cheers,
Rick MoenDiaeresis:  Keeping the cow out of co-worker since 700 AD.
r...@linuxmafia.com
McQ! (4x80)   
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


[DNG] backup

2020-05-19 Thread william moss via Dng
If you set the partition label for the target of a file system archive,
then the use of findmnt eliminates the need for a special location. For
example:
findmnt -P -t ext4,xfs -o source,target,label

Note, the file systems in the example should be set to what you use for
your archive media.

Since I back up to network attached storage, I parse the output of the
following command to find a sub-directory of the primary mount points.
findmnt -P -t cifs,nfs,auto -o source,target,label |& \
while read Q
do
  [[ "${Q}" =~ LABEL=\"([^\"]*)\" ]] && 
LBL="${BASH_REMATCH[1]}"
  [[ "${Q}" =~ TARGET=\"([^\"]*)\" ]] &&
TGT="${BASH_REMATCH[1]}/`hostname -s`"
  [[ "${Q}" =~ SOURCE=\"([^\"]*)\" ]] &&
SRC="${BASH_REMATCH[1]}"

  [ -n "$SRC" ] || continue
  [ -n "$TGT" ] || continue
  [ -d "$TGT" ] || continue

  # The actions to perform are then based on the source,
  # the label (if any) and any other criteria that can be
  # found with other options to findmnt.
  ...
done

I schedule the script that does. I use a custom run-crons
(/usr/lib/cron/run-crons) but a script in /etc/cron.d would also be a
good choice.

Rather than dmesg, try

alias lsblock='lsblk -o name,label,fstype,size,type,tran -x name'

-- 
William (Bill) Moss
billm...@acm.org
NY (USA)
  Those who will not reason, are bigots,
  those who cannot, are fools,
  and those who dare not, are slaves.
by Lord Byron
  Justice will not be served until those who are
  unaffected are as outraged as those who are.
by Benjamin Franklin
  Honor, justice and humanity forbid us tamely to
  surrender that freedom which we received from
  our gallant ancestors and which our innocent
  posterity have a right to receive from us. We
  cannot endure the infamy and guilt of resigning
  succeeding generations to that wretchedness which
  inevitably awaits them if we basely entail
  hereditary bondage on them.
by Thomas Jefferson
Declaration of the Causes and Necessities of Taking up Arms
6 July 1775
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Device naming: was Felker Init: was without-systemd.org not working

2020-05-19 Thread Jim Jackson



On Mon, 18 May 2020, Rick Moen via Dng wrote:

> (I do detachable backups to external USB hard drives, and make a point of
> doing 'dmesg | tail' before mounting, to make sure it really is
> /dev/sdc1 this time.)

My detachable backups devices have unique partitions labels and I place a 
specifically named file in the root of the partition. My backup scripts 
check for both and give up if they can't find both. THEN I do the dmesg 
thing :-)

Jim
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Device naming: was Felker Init: was without-systemd.org not working

2020-05-19 Thread karl
Handrik:
...
> What's sg_map?
> 
> I don't seem to have one.
...

$ man sg_map
...
   sg_map - displays mapping between Linux sg and other SCSI devices
...


$ apt-file search sg_map
sg3-utils: /usr/bin/sg_map
sg3-utils: /usr/bin/sg_map26
sg3-utils: /usr/share/man/man8/sg_map.8.gz
sg3-utils: /usr/share/man/man8/sg_map26.8.gz
votca-csg: /usr/bin/csg_map
votca-csg: /usr/share/man/man1/csg_map.1.gz

To get the serial number of a disk, do

# sg_inq  /dev/sda

Regards,
/Karl Hammar


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] without-systemd.org not working

2020-05-19 Thread dal
> I am. I eschew Occam's Razor in favor of Litt's Razor, which can be
> paraphrased "Follow the money."
> 
> As one piece of evidence I present the words of a Redhat exec long
> before systemd existed:
> 
> http://asay.blogspot.com/2006/10/interview-with-red-hat-cto-brian.html
> 
> Search the word "complexity" to get right to the piece of evidence that
> Redhat profits from complexifying Linux.

A very good illustration, thanks Steve.

/D
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] When spaces aren't just spaces [Was] Has anybody else experienced Raspberry Pi breakage ?

2020-05-19 Thread Hendrik Boom
On Tue, May 19, 2020 at 08:45:44AM +0200, Dr. Nikolaus Klepp wrote:
> Anno domini 2020 Tue, 19 May 08:09:46 +0200
>  marc scripsit:
> > Hello
> > 
> > This is a bit unrelated, but might be worth warning people about. Some 
> > editors
> > no longer seem to be satisfied inserting plain spaces, but now deem it 
> > necessary
> > the extra bytes . This might break small parsers which only consider
> > ' ' and \t as a delimiter. 'cat -A' will help you find them 
> > 
> > Below is the fstab entry that you included in your mail, run through 'cat 
> > -A'
> > 
> > > and my fstab:$
> > > '# cat /etc/fstab$
> > > $
> > > # M-BM- M-BM-  M-BM- M-BM- M-BM-  M-BM- M-BM- 
> > > M-BM-  M-BM- M-BM- M-BM-  M-BM- M-BM- M-BM-  M-BM-
> > > M-BM- M-BM-  M-BM- M-BM- M-BM-  M-BM- $
> > > /dev/mmcblk0p1M-BM- M-BM-  M-BM- M-BM- M-BM-  M-BM- /bootM-BM- M-BM-  
> > > M-BM- vfatM-BM- M-BM-  M-BM- defaultsM-BM- M-BM-  M-BM- M-BM- M-BM-  
> > > M-BM- 0M-BM- M-BM-  M-BM- M-BM- M-BM-  M-BM- 2$
> > > /dev/mmcblk0p2M-BM- M-BM-  M-BM- M-BM- M-BM-  M-BM- /M-BM- M-BM-  M-BM- 
> > > ext4M-BM- M-BM-  M-BM- defaults,noatimeM-BM- M-BM-  M-BM-
> > > 0M-BM- M-BM-  M-BM- M-BM- M-BM-  M-BM- 1$
> > > /dev/zram0 M-BM- M-BM-  M-BM- M-BM- M-BM-  M-BM- swapM-BM- M-BM- M-BM-  
> > > swapM-BM- M-BM- M-BM-  pri=1M-BM- M-BM-  M-BM- M-BM- M-BM-  M-BM- M-BM- 
> > > M-BM-  M-BM- 0M-BM- M-BM-  M-BM- M-BM- M-BM-  M-BM- 0'$
> > > $
> 
> Which editors do this?

And why would they insist on using non-breaking spaces?

-- hendrik

> 
> Nik
> 
> > 
> > regards
> > 
> > marc
> > 
> > 
> > ___
> > Dng mailing list
> > Dng@lists.dyne.org
> > https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
> > 
> 
> 
> 
> -- 
> Please do not email me anything that you are not comfortable also sharing 
> with the NSA, CIA ...
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] without-systemd.org not working

2020-05-19 Thread Hendrik Boom
On Mon, May 18, 2020 at 09:39:11PM -0400, Steve Litt wrote:
> On Mon, 18 May 2020 08:57:39 -0700
> Ian Zimmerman  wrote:
> 
> > On 2020-05-18 16:42, Didier Kryn wrote:
> > 
> > > In particular by porting Window$ on top of Systemd-Gnu-Linux, just
> > > like MacOS lives on top of FreeBSD and makes big profit.  
> > 
> > How would that work from the legal POV? Linux is still GPL, pretty
> > much for this very reason.
> > 
> > I do believe that systemd was meant to be more than init from the
> > start, but I'm not going as far as Didier. 
> 
> I am. I eschew Occam's Razor in favor of Litt's Razor, which can be
> paraphrased "Follow the money."
> 
> As one piece of evidence I present the words of a Redhat exec long
> before systemd existed:
> 
> http://asay.blogspot.com/2006/10/interview-with-red-hat-cto-brian.html
> 
> Search the word "complexity" to get right to the piece of evidence that
> Redhat profits from complexifying Linux.
>  

Specifically, it says:

"Do you think the Red Hat model would apply equally well to other areas of 
software?
"
"Red Hat's model works because of the complexity of the technology we work 
with. An operating platform has a lot of moving parts, and customers are 
willing to pay to be insulated from that complexity.
"
"I don't think you can take one finite element - like Apache - and make a 
business out of it [using our model]. You need product complexity.

Presumably Steve Litt's point is that Red Hat has to make the internals complex 
so that 
there's complexity to shield the costomer from.

-- hendrik

> SteveT
> 
> Steve Litt 
> May 2020 featured book: Troubleshooting Techniques
>  of the Successful Technologist
> http://www.troubleshooters.com/techniques
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Device naming: was Felker Init: was without-systemd.org not working

2020-05-19 Thread Hendrik Boom
On Tue, May 19, 2020 at 12:54:23AM +0200, k...@aspodata.se wrote:
> Rick:
> > Quoting Ian Zimmerman (i...@very.loosely.org):
> ...
> > > it. If only I had listened to my nagging inner voice and looked at
> > > /dev/disk/by-id first, I'd have been okay.
> > I'm a lot more concerned about servers, personally, and am not going to
> > permit overengineered software on my server just because someone
> > couldn't bother looking at 'dmesg | tail' before running dd against an
> > SD card.
> ...
> 
>  There is more than one way to do it:
> sg_map -x -i

What's sg_map?

I don't seem to have one.

-- hendrik
> 
> Regards,
> /Karl Hammar
> 
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] without-systemd.org not working

2020-05-19 Thread Peter Duffy
Apologies for following up on my own post - just an afterthought.

When I originally encountered systemd, the word was that it was so
pervasive that it couldn't be removed (obviously, now we know
different ;) ) 

Given the alleged non-optionality of systemd, I started to wonder about
some kind of an init system wrapper (or even jail) - an abstraction
layer which would sit between the init subsystem and the main system,
and sanitise and homogenise interactions between the two; init systems,
including systemd, could be plugged and unplugged into the top surface
as desired; the abstraction layer would manage commands and responses
(including lying to the init subsystem if the latter tried to do
something dangerous or antisocial). 

I know - first reaction is to recoil in horror and disgust at the very
thought (adding another layer of complexity to something which is
already overcomplex). But there's something tantalising about it.

On Mon, 2020-05-18 at 12:04 +0100, Peter Duffy wrote:
> One of the things which always baffles me about systemd was that right
> from the word go, there was something which would have nipped in the bud
> all the controversy, pain, recriminations, etc. etc. Make systemd
> optional (so that, for example, it could be selected at install time
> from a range of available init systems, and later, if desired, removed
> and reinstalled). 
> 


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] without-systemd.org not working

2020-05-19 Thread al3xu5 / dotcommon
Mon, 18 May 2020 08:57:39 -0700 - Ian Zimmerman :

> On 2020-05-18 16:42, Didier Kryn wrote:
> 
> > In particular by porting Window$ on top of Systemd-Gnu-Linux, just
> > like MacOS lives on top of FreeBSD and makes big profit.  
> 
> How would that work from the legal POV? Linux is still GPL, pretty much
> for this very reason.


and herein lies the original sin...

the GPL (which is not one license but a set of licenses) has three main flaws:

- the LGPL license, which has allowed GNU/Linux environmental pollution over
  time

- the lack of a non-commercial mandatory clause in the GPLs

- the mistake of confusing 4 simple legal rights with freedom (which is
something much broader I think), leading people to remain confined within
technical, legal and - above all - economic aspects

just my humble opinion

Regards

-- 
al3xu5

Say NO to copyright, patents, trademarks and any industrial design restrictions.

Public GPG/PGP key
ID:   4096 bit RSA key F94CFE23
Fingerprint:  59C6 9DC7 CD4B CF2F A190  E3DE 69C5 977B F94C FE23


pgpw0YTRdYopN.pgp
Description: Firma digitale OpenPGP
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Device naming: was Felker Init: was without-systemd.org not working

2020-05-19 Thread Rick Moen via Dng
Quoting Steve Litt (sl...@troubleshooters.com):

> Substitute the word "needlessly complex" for "overengineered" and I
> don't like it either. But 1), I don't think you'd get anywhere near
> universal agreement that by_path, by_id, etc is either overengineered
> or needlessly complex, [...]

One interesting fact about applying _local policy_ to system
administration is that universal agreement (i.e., vetted by others
elsewhere) is neither required nor useful.

> and 2) ANYBODY can make a typo, completely
> unrelated to "not bothering to look at dmesg | tail". 

That's a risk with almost _any_ invocation using root authority of
inherently dangerous tools like /bin/dd .  The earliest and most
important lesson for all junior sysadmins is 'If you break it, you buy
it.'

> I think a more relevant constructive criticism would have been "where
> were the backups?".

And 'Be incredibly sure of your syntax before running /bin/dd as root.'


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng