Re: Linux supprt (was: Hardware for a back up server? [WAS Re: How to use dmsetuup?])

2023-11-13 Thread Larry Martell
On Mon, Nov 13, 2023 at 7:48 AM Stefan Monnier  wrote:
>
> >> Indeed, technically-inclined people are often better served with Free
> >> Software, and Free Software can also be a great choice for large
> >> corporations who can either have on-site techsupport people or can hire
> >> external support, but it is a lot more difficult to find commercial
> >> support for merely non-techie user.  This is mostly the domain of
> >> proprietary software :-(
> >
> > The way out of this is having strong local user groups, which is,
> > of course, easier in densely populated areas.
>
> I think this still only covers a small fraction of the problem.
> It just lowers the bar of the "technically-inclined" limit.
> I think many more people just want to have someone they can call on
> the phone to help them get through their yearly technical problem.

In my experience I get much better support from the user community of
an open source product then I get from paid support of a commercial
product. Frequently I know more about the product than the person I am
dealing with.



Re: Hardware for a back up server? [WAS Re: How to use dmsetuup?]

2023-11-13 Thread Stefan Monnier
Anssi Saari [2023-11-13 12:34:13] wrote:
> Stefan Monnier  writes:
>> My home NAS is in a completely different category:
>> an ARM SBC with on-board SATA.  Much smaller, extremely quiet (no fan),
>> and between 5W and 10W of power consumption depending on whether it's
>> mostly idle (the overwhelmingly common case) or not.
> So which ARM SBC and does it run stock Debian? And how many SATA ports?

In my case, I'm currently using a BananaPi at one place and at the other
I upgraded to an ODroid-M1.  In both cases there's only a single SATA
port (tho the ODroid has an nvme-M2 port as well which I'm not
currently using).  The ODroid-M1 is the main "backup server" and the
other holds my backup's backup.

Both run stock Debian stable (in both cases the installation was
manual/tricky rather than via debian-installer :-( ).

None of the services they provide are sufficiently important to require
something like RAID, which makes things easier.

And yes, I've had problems with the BananaPi's power supply (I had to
try various power blocks *and* cables until finding ones good enough
for reliable operation :-( ).
The ODroid's power supply seems significantly better in this respect.


Stefan



Linux supprt (was: Hardware for a back up server? [WAS Re: How to use dmsetuup?])

2023-11-13 Thread Stefan Monnier
>> Indeed, technically-inclined people are often better served with Free
>> Software, and Free Software can also be a great choice for large
>> corporations who can either have on-site techsupport people or can hire
>> external support, but it is a lot more difficult to find commercial
>> support for merely non-techie user.  This is mostly the domain of
>> proprietary software :-(
>
> The way out of this is having strong local user groups, which is,
> of course, easier in densely populated areas.

I think this still only covers a small fraction of the problem.
It just lowers the bar of the "technically-inclined" limit.
I think many more people just want to have someone they can call on
the phone to help them get through their yearly technical problem.


Stefan



Re: Hardware for a back up server? [WAS Re: How to use dmsetuup?]

2023-11-13 Thread Anssi Saari
Stefan Monnier  writes:

> My home NAS is in a completely different category:
> an ARM SBC with on-board SATA.  Much smaller, extremely quiet (no fan),
> and between 5W and 10W of power consumption depending on whether it's
> mostly idle (the overwhelmingly common case) or not.

So which ARM SBC and does it run stock Debian? And how many SATA ports?



Re: Hardware for a back up server? [WAS Re: How to use dmsetuup?]

2023-11-12 Thread tomas
On Sun, Nov 12, 2023 at 03:17:17PM -0500, Stefan Monnier wrote:
> > FOSS is great for learning by doing, but commercial products can be a better
> > choice when a family member, a friend, a neighbor, and especially clients
> > and employers, want a computer, a server, a network gateway, etc..  It is
> > ironically satisfying when those commercial products have FOSS on the
> > inside.  :-)
> 
> Indeed, technically-inclined people are often better served with Free
> Software, and Free Software can also be a great choice for large
> corporations who can either have on-site techsupport people or can hire
> external support, but it is a lot more difficult to find commercial
> support for merely non-techie user.  This is mostly the domain of
> proprietary software :-(

The way out of this is having strong local user groups, which is,
of course, easier in densely populated areas.

In Berlin, e.g., there were several linux user groups which had
"open days" (some even once a week) where people went with their
hardware and got it fixed. And got to know nice people. Often
at no cost.

In the smaller city I live now there is at least one such place.

Support your local free software support group :-)

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Hardware for a back up server? [WAS Re: How to use dmsetuup?]

2023-11-12 Thread Stefan Monnier
> FOSS is great for learning by doing, but commercial products can be a better
> choice when a family member, a friend, a neighbor, and especially clients
> and employers, want a computer, a server, a network gateway, etc..  It is
> ironically satisfying when those commercial products have FOSS on the
> inside.  :-)

Indeed, technically-inclined people are often better served with Free
Software, and Free Software can also be a great choice for large
corporations who can either have on-site techsupport people or can hire
external support, but it is a lot more difficult to find commercial
support for merely non-techie user.  This is mostly the domain of
proprietary software :-(


Stefan




Re: Hardware for a back up server? [WAS Re: How to use dmsetuup?]

2023-11-12 Thread David Christensen

On 11/12/23 09:15, Andrew M.A. Cater wrote:

On Sat, Nov 11, 2023 at 04:01:47PM -0800, David Christensen wrote:

An obvious difference between internal and external drives is physical
protection.  Internal drives and cables are protected.  Everything gets
power from the same source (PSU, PCU fed by dual PSU, etc.).  External
drives, cables, and power adapters can be moved, yanked, disconnected,
dropped, kicked, subjected to electrostatic discharge, etc..  There are more
parts to fail and more opportunities for failure with external drives than
with internal drives.


This is what I meant: this is why the devices from QNAP / Synology that
are plug and play NAS are also built this way. The Synology devices
can take lots of added modules, seemingly - it all seems expensive
but these are designed for plugging in  and the whole thing "just working".



FOSS is great for learning by doing, but commercial products can be a 
better choice when a family member, a friend, a neighbor, and especially 
clients and employers, want a computer, a server, a network gateway, 
etc..  It is ironically satisfying when those commercial products have 
FOSS on the inside.  :-)



David



Re: Hardware for a back up server? [WAS Re: How to use dmsetuup?]

2023-11-12 Thread David Christensen

On 11/12/23 05:15, Andy Smith wrote:

On Sat, Nov 11, 2023 at 04:01:47PM -0800, David Christensen wrote:

SSD RAID10 is very impressive when everything else matches.  Backups over a
Gigabit LAN onto SATA III SSD RAID10 does not make sense because Gigabit
Ethernet is rated for 1 Gbps read/ write and a SATA III SSD RAID10 is rated
for 24 Gbps read and 12 Gbps write.  I would put HDD's in the backup server
and put the SSD's in the workstation.


I agree with you when it comes to systems that are used purely for
backups in a style that mimics tape backup, i.e. rare need for
random access, which from what I understand does cover Gene's
situation as Gene is used to using Amanda for backups, which is a
(virtual) tape paradigm.

However, especially in a home setting, people often ask more of "the
server", turning it into something that isn't entirely, or even
primarily, a backup server. If those uses involve random access, SSD
of some kind will be very beneficial.

Also there are quite a few backup technologies that do use random
access a lot. A venerable one often mentioned on this list is
rsnapshot or its basic implementation using rsync. This walks the
entire backup tree at every iteration checking metadata and creating
hardlinks. The period of time spent deciding what to back up and how
often massively exceeds the time spent transferring and writing the
data with these systems. They will also massively benefit from low
latency storage on SSD.

So just as a word of caution -- and I know you know this, David -- I
want to say check how much random access is going on, before
deciding rotational media will cut it.



I think we agree that HDD's are slower for many (most?) backup/ restore 
use-cases.  But, I think the slowness is acceptable for the off-hours, 
once a day backup use-case and for the infrequent file restore use-case 
that I anticipate Gene will perform.




PS I stated this before and I have to say it again though: while
building a dedicated backup system seems like a great idea for
Gene's use case, the practical situation for Gene is that he's
been trying for literal years now to make a very simple RAID10
mdadm work on perfectly serviceable hardware. This should be a
simple task, but it's not gone well for him and this list is
unable to get to the bottom of why (I include myself in that, but
I think it reflects more on communications difficulties than a
shortcoming of Linux mdadm). 



There appears to be consensus to set up one storage device with one 
partition and one ext4 file system, and test the various applications 
for file access issues.  It is up to Gene to decide if, what, where, 
when, and how.




I am at a loss as to why, given
those facts, people are still advising Gene to build an entire
new system out of parts. It makes sense for the use case but not
for the user. I don't think it's supportable. For this user I
would have to still stand by my advice of buying an off-the-shelf
NAS.



I think we agree that everyone needs backups.


It is my impression that most of Gene's eggs are in one basket (the 
computer with the Asus Prime Z370 A II motherboard) and that Amanda has 
been broken for a while (?).  I would celebrate Gene implementing 
working backups by any means on any device and any media.  Again, Gene 
decides.



David



Re: Hardware for a back up server? [WAS Re: How to use dmsetuup?]

2023-11-12 Thread Andrew M.A. Cater
On Sat, Nov 11, 2023 at 04:01:47PM -0800, David Christensen wrote:
> On 11/11/23 08:52, Andrew M.A. Cater wrote:
> > On Fri, Nov 10, 2023 at 10:22:07PM -0500, gene heskett wrote:
> > > On 11/10/23 19:46, David Christensen wrote:
> > > > On 11/8/23 02:20, gene heskett wrote:
> > 
> > Are these 2TB SSDs or hard disks? I would counsel very strongly indeed
> > against using any ARM-based single board computer as a RAID device on
> > USB connections - they're just *not* up to it.
> 

This at least partly because the USB devices on, say, a Raspberry Pi
tend to share I/O and resources. On a Pi, USB3 takes away from the 
Ethernet, for example.

> 
> On 11/11/23 09:05, Stefan Monnier wrote:
> > I don't think the issue is whether they're ARM based.
> >
> > The issue is simply how you connect the disks: in my experience, disks
> > connected via USB are simply not quite up to a 24/7 situation,
> > especially if the disk is USB-powered.
> 

Right.
> 
> >
> > I have 4 SSD drives connected to a single RPI4 currently, using a
> > powered USB hub.
> >

SSD significantly different to HDD. 
> 
> 
> On 11/11/23 10:47, Stefan Monnier wrote:
> > Hmm...  so maybe the USB connection is not directly relevant either
> > and the real issue is the power?
> 
> 
> An obvious difference between internal and external drives is physical
> protection.  Internal drives and cables are protected.  Everything gets
> power from the same source (PSU, PCU fed by dual PSU, etc.).  External
> drives, cables, and power adapters can be moved, yanked, disconnected,
> dropped, kicked, subjected to electrostatic discharge, etc..  There are more
> parts to fail and more opportunities for failure with external drives than
> with internal drives.
> 

This is what I meant: this is why the devices from QNAP / Synology that
are plug and play NAS are also built this way. The Synology devices
can take lots of added modules, seemingly - it all seems expensive
but these are designed for plugging in  and the whole thing "just working".

> 
> It is not uncommon for communications establishment to fail with external
> drives.  Similarly, communications re-establishment when the computer and/or
> drive resume from a power saving mode.  Writing and testing this kind of
> software is difficult and you need people with both both CS and EE skills.
> There is an astronomical number of combinations to design and test for.  The
> code runs rarely.  For reliable 24x365 operations, the challenge is
> eliminating everything that can cause communications establishment/
> re-establishment -- operator steps, computer configuration, drive
> configuration, power failures, cooling failures, etc..  If you can find and
> eliminate all of them, a USB external drive can stay connected a very long
> time.
> 

*If* is very much the word, I think.
> 
> 
> I have always liked ATX tower cases with lots of drive bays, both internal
> and external.  Over time, more products have become available with good
> cooling and low noise.  I have not found a major computer manufacturer who
> makes servers with all of those features, so I build my own:
> 
> * Fractal Design Define R5 case
> * 3 @ Fractal Design low-speed 140 mm fans
> * Fractal Design Ion+ 2 Platinum 660 W power supply
> * Intel S1200V3RP motherboard
> * Intel Xeon E3-1200 v3 series processors
> * Dual channel ECC memory
> * LSI 9207-8i HBA with "IT mode" non-RAID firmware
> * Seagate Barracuda and Constellation ES.2 HDD's
> * Intel 520 Series SSD's
> * StarTech 2.5" and 3.5" mobile racks
> * Cable Matters black SATA 6 Gbps cables with locking connectors
> 
> 
> They are not cheap, small, or light, but they perform well, are easy to work
> on, are reasonably quiet, and everything stays cool.  They have plenty of
> capacity for future upgrades.
> 

Nice parts list and good suggestions.
> 
> 
> SSD RAID10 is very impressive when everything else matches.  Backups over a
> Gigabit LAN onto SATA III SSD RAID10 does not make sense because Gigabit
> Ethernet is rated for 1 Gbps read/ write and a SATA III SSD RAID10 is rated
> for 24 Gbps read and 12 Gbps write.  I would put HDD's in the backup server
> and put the SSD's in the workstation.
> 
> 
> David
>

there's no doubt that you can do the same with some ARM boards - maybe
the RockPro which has PCIe?? but not with the majority.

Anyway, let's leave folks to build what works for them: the one thing
I've learned from much of this list is that we're all unique in our
requirements, even if we have much in common.

All the very best, as ever,

Andy 



Re: Hardware for a back up server? [WAS Re: How to use dmsetuup?]

2023-11-12 Thread Andy Smith
Hello,

On Sat, Nov 11, 2023 at 04:01:47PM -0800, David Christensen wrote:
> SSD RAID10 is very impressive when everything else matches.  Backups over a
> Gigabit LAN onto SATA III SSD RAID10 does not make sense because Gigabit
> Ethernet is rated for 1 Gbps read/ write and a SATA III SSD RAID10 is rated
> for 24 Gbps read and 12 Gbps write.  I would put HDD's in the backup server
> and put the SSD's in the workstation.

I agree with you when it comes to systems that are used purely for
backups in a style that mimics tape backup, i.e. rare need for
random access, which from what I understand does cover Gene's
situation as Gene is used to using Amanda for backups, which is a
(virtual) tape paradigm.

However, especially in a home setting, people often ask more of "the
server", turning it into something that isn't entirely, or even
primarily, a backup server. If those uses involve random access, SSD
of some kind will be very beneficial.

Also there are quite a few backup technologies that do use random
access a lot. A venerable one often mentioned on this list is
rsnapshot or its basic implementation using rsync. This walks the
entire backup tree at every iteration checking metadata and creating
hardlinks. The period of time spent deciding what to back up and how
often massively exceeds the time spent transferring and writing the
data with these systems. They will also massively benefit from low
latency storage on SSD.

So just as a word of caution -- and I know you know this, David -- I
want to say check how much random access is going on, before
deciding rotational media will cut it.

Thanks,
Andy

PS I stated this before and I have to say it again though: while
   building a dedicated backup system seems like a great idea for
   Gene's use case, the practical situation for Gene is that he's
   been trying for literal years now to make a very simple RAID10
   mdadm work on perfectly serviceable hardware. This should be a
   simple task, but it's not gone well for him and this list is
   unable to get to the bottom of why (I include myself in that, but
   I think it reflects more on communications difficulties than a
   shortcoming of Linux mdadm). I am at a loss as to why, given
   those facts, people are still advising Gene to build an entire
   new system out of parts. It makes sense for the use case but not
   for the user. I don't think it's supportable. For this user I
   would have to still stand by my advice of buying an off-the-shelf
   NAS.

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



Re: Hardware for a back up server? [WAS Re: How to use dmsetuup?]

2023-11-11 Thread Stefan Monnier
> I have always liked ATX tower cases with lots of drive bays, both internal
> and external.  Over time, more products have become available with good
> cooling and low noise.  I have not found a major computer manufacturer who
> makes servers with all of those features, so I build my own:
>
> * Fractal Design Define R5 case
> * 3 @ Fractal Design low-speed 140 mm fans
> * Fractal Design Ion+ 2 Platinum 660 W power supply
> * Intel S1200V3RP motherboard
> * Intel Xeon E3-1200 v3 series processors
> * Dual channel ECC memory
> * LSI 9207-8i HBA with "IT mode" non-RAID firmware
> * Seagate Barracuda and Constellation ES.2 HDD's
> * Intel 520 Series SSD's
> * StarTech 2.5" and 3.5" mobile racks
> * Cable Matters black SATA 6 Gbps cables with locking connectors

My home NAS is in a completely different category:
an ARM SBC with on-board SATA.  Much smaller, extremely quiet (no fan),
and between 5W and 10W of power consumption depending on whether it's
mostly idle (the overwhelmingly common case) or not.


Stefan



Re: Hardware for a back up server? [WAS Re: How to use dmsetuup?]

2023-11-11 Thread David Christensen

On 11/11/23 08:52, Andrew M.A. Cater wrote:

On Fri, Nov 10, 2023 at 10:22:07PM -0500, gene heskett wrote:

On 11/10/23 19:46, David Christensen wrote:

On 11/8/23 02:20, gene heskett wrote:

And I just looked at tht pair, and acc gparted they have both been
pvcreated, so I'll leave then alone and steal the dvd cable, puttin
a new 2T drive if I can rig power to it.


As I previously suggested, and as you previously seemed agreeable to, I
think you should stop working on the Asus and build a backup server.


I'm thinking of making a slow one out of a headless bananapi-5 with a 2T on
every usb3 port as a raid, type to be determined, I rather like the idea of
parity being striped across all 4 disks. I have the drives but not sure of
the usb-sata adapters, need to goto the garage and retrieve that box. That,
and there's only one of me ;o)>  And me is 89 yo with a worn out body. A
pacemaker and some new parts in my heart too.


Are these 2TB SSDs or hard disks? I would counsel very strongly indeed
against using any ARM-based single board computer as a RAID device on
USB connections - they're just *not* up to it.



On 11/11/23 09:05, Stefan Monnier wrote:
> I don't think the issue is whether they're ARM based.
>
> The issue is simply how you connect the disks: in my experience, disks
> connected via USB are simply not quite up to a 24/7 situation,
> especially if the disk is USB-powered.


On 11/11/23 09:37, Pocket wrote:
> I have used ssd drives connected to a RPI4 ever since the 4 came out,
> zero issues.
>
> The RPI4's boot from the ssd drives.
>
> I have 4 SSD drives connected to a single RPI4 currently, using a
> powered USB hub.
>
> One of those drives contains the boot and root filesystems.
>
> BTW that particular RPI4 runs 24/7 as it is my name server, email
> server, web server and backup server for my network.
>
> It has an uptime of 18 months.


On 11/11/23 10:47, Stefan Monnier wrote:
> Hmm...  so maybe the USB connection is not directly relevant either
> and the real issue is the power?


An obvious difference between internal and external drives is physical 
protection.  Internal drives and cables are protected.  Everything gets 
power from the same source (PSU, PCU fed by dual PSU, etc.).  External 
drives, cables, and power adapters can be moved, yanked, disconnected, 
dropped, kicked, subjected to electrostatic discharge, etc..  There are 
more parts to fail and more opportunities for failure with external 
drives than with internal drives.



It is not uncommon for communications establishment to fail with 
external drives.  Similarly, communications re-establishment when the 
computer and/or drive resume from a power saving mode.  Writing and 
testing this kind of software is difficult and you need people with both 
both CS and EE skills.  There is an astronomical number of combinations 
to design and test for.  The code runs rarely.  For reliable 24x365 
operations, the challenge is eliminating everything that can cause 
communications establishment/ re-establishment -- operator steps, 
computer configuration, drive configuration, power failures, cooling 
failures, etc..  If you can find and eliminate all of them, a USB 
external drive can stay connected a very long time.




Get a cheap barebones system that you add memory to in a small-ish size
case with SATA cables to motherboard ports that's Intel/AMD based that
you can then put disks into to format. If you can't get a barebones,
at least get a second hand machine in a tower case.



I have always liked ATX tower cases with lots of drive bays, both 
internal and external.  Over time, more products have become available 
with good cooling and low noise.  I have not found a major computer 
manufacturer who makes servers with all of those features, so I build my 
own:


* Fractal Design Define R5 case
* 3 @ Fractal Design low-speed 140 mm fans
* Fractal Design Ion+ 2 Platinum 660 W power supply
* Intel S1200V3RP motherboard
* Intel Xeon E3-1200 v3 series processors
* Dual channel ECC memory
* LSI 9207-8i HBA with "IT mode" non-RAID firmware
* Seagate Barracuda and Constellation ES.2 HDD's
* Intel 520 Series SSD's
* StarTech 2.5" and 3.5" mobile racks
* Cable Matters black SATA 6 Gbps cables with locking connectors


They are not cheap, small, or light, but they perform well, are easy to 
work on, are reasonably quiet, and everything stays cool.  They have 
plenty of capacity for future upgrades.




Build a simple Debian system on one disk there to format other disks :)



I put my Debian and FreeBSD instances on a single 2.5" SATA SSD.  I keep 
them small -- 1 GB boot, 1 GB swap, and 12 GB root.  I keep my system 
configuration files and working files in a version control system (CVS).




Once you've built a simple Debian system there, you can add mdadm RAID
and use it as a backup storage device to copy off your /home and so on.



For my file server and backup server, primary storage is a ZFS stripe of 
HDD mirrors (e.g. RAID10) with 

Re: Hardware for a back up server? [WAS Re: How to use dmsetuup?]

2023-11-11 Thread Dan Ritter
Jeffrey Walton wrote: 
> >From what I've read when comparing OpenMediaVault vs TrueNAS, it
> usually comes down to the power consumption of the mini computer/mini
> pc. 5W can save you $100 USD per year. Probably more now due to
> inflation.


5W * 24h/D * 30 D/M * 12M/Y = 43200 Wh, or 43.2KWh per year

If a KWh costs you: then 43.2KWh is:
Massachusetts:  32c $13.82
California: 30c $12.96
Florida:15c $ 6.48
Germany:42c $18.14
Denmark:37c $15.98
United Kingdom: 33c $14.26

So you need between 25 and 75W of 24/7 power usage to get to
$100 US of savings in a year.

A spinning disk draws about 7W. An SSD draws about 0.05W when
asleep, 1.5W in "active idle", and up to 8W during writes.

-dsr-



Re: Hardware for a back up server? [WAS Re: How to use dmsetuup?]

2023-11-11 Thread Jeffrey Walton
On Sat, Nov 11, 2023 at 6:20 PM Dan Ritter  wrote:
>
> Jeffrey Walton wrote:
> > >From what I've read when comparing OpenMediaVault vs TrueNAS, it
> > usually comes down to the power consumption of the mini computer/mini
> > pc. 5W can save you $100 USD per year. Probably more now due to
> > inflation.
>
>
> 5W * 24h/D * 30 D/M * 12M/Y = 43200 Wh, or 43.2KWh per year
>
> If a KWh costs you: then 43.2KWh is:
> Massachusetts:  32c $13.82
> California: 30c $12.96
> Florida:15c $ 6.48
> Germany:42c $18.14
> Denmark:37c $15.98
> United Kingdom: 33c $14.26
>
> So you need between 25 and 75W of 24/7 power usage to get to
> $100 US of savings in a year.

Right. Some can get into the 60W range, so you have to be careful
about what is being selected.

> A spinning disk draws about 7W. An SSD draws about 0.05W when
> asleep, 1.5W in "active idle", and up to 8W during writes.

Jeff



Re: Hardware for a back up server? [WAS Re: How to use dmsetuup?]

2023-11-11 Thread gene heskett

On 11/11/23 15:41, Pocket wrote:


On 11/11/23 13:47, Stefan Monnier wrote:

I have used ssd drives connected to a RPI4 ever since the 4 came out,
zero issues.
The RPI4's boot from the ssd drives.
I have 4 SSD drives connected to a single RPI4 currently, using a 
powered

USB hub.

Hmm...  so maybe the USB connection is not directly relevant either and
the real issue is the power?


I'm forced to agree.  The wall wart supplied with the pi kits is rather 
under powered. I don't run them on less than a 5 volt 5 amp supply, and 
like pocket, they only get rebooted when needsreboot says so after an 
update. In 7 or so years of running a Sheldon lathe built in the 1940's, 
first with an rpi3b which was pushed a bit and an rpi4b that doesn't 
even breath hard, for at last 4, maybe 5 years, I've had one unscheduled 
reboot. That I think is about 100x better uptime than I'm averaging 
running the same linuxcnc software on wintel stuff.  That 5 volt, 5 amp 
supply is powering 5 other interfacing boards to get the job done. One 
of its jobs is running a clone of the linuxcnc.org buildbot.

It Just Works...


 Stefan


That would be my best guess also



Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis



Re: Hardware for a back up server? [WAS Re: How to use dmsetuup?]

2023-11-11 Thread Jeffrey Walton
On Sat, Nov 11, 2023 at 1:48 PM Stefan Monnier  wrote:
>
> > I have used ssd drives connected to a RPI4 ever since the 4 came out,
> > zero issues.
> > The RPI4's boot from the ssd drives.
> > I have 4 SSD drives connected to a single RPI4 currently, using a powered
> > USB hub.
>
> Hmm...  so maybe the USB connection is not directly relevant either and
> the real issue is the power?

>From what I've read when comparing OpenMediaVault vs TrueNAS, it
usually comes down to the power consumption of the mini computer/mini
pc. 5W can save you $100 USD per year. Probably more now due to
inflation. But the use cases they discuss often includes transcoding
of video streams, which I don't think is needed in the case of
backups. See, for example,
.

Related, I am getting ready to standup a NAS for my home network.
(Currently I'm doing some half-ass file sharing). The enclosure
hardware on the short list are 
and . The mini computer the
enclosure will be attached to will be USB 3.1 or 3.2 capable for 10
GB/s or 20 GB/s throughput.

Eventually my network will need to be upgraded to at least 2.5 GB/s to
take advantage of the throughput. I'm waiting for prices to drop a
bit. 2.5 GB/s and 5.0 GB/s network cards, switches and Cat 8 cables
are still a bit expensive.

Jeff



Re: Hardware for a back up server? [WAS Re: How to use dmsetuup?]

2023-11-11 Thread Pocket



On 11/11/23 13:47, Stefan Monnier wrote:

I have used ssd drives connected to a RPI4 ever since the 4 came out,
zero issues.
The RPI4's boot from the ssd drives.
I have 4 SSD drives connected to a single RPI4 currently, using a powered
USB hub.

Hmm...  so maybe the USB connection is not directly relevant either and
the real issue is the power?


 Stefan


That would be my best guess also

--
It's not easy to be me



Re: Hardware for a back up server? [WAS Re: How to use dmsetuup?]

2023-11-11 Thread Stefan Monnier
> I have used ssd drives connected to a RPI4 ever since the 4 came out,
> zero issues.
> The RPI4's boot from the ssd drives.
> I have 4 SSD drives connected to a single RPI4 currently, using a powered
> USB hub.

Hmm...  so maybe the USB connection is not directly relevant either and
the real issue is the power?


Stefan



Re: Hardware for a back up server? [WAS Re: How to use dmsetuup?]

2023-11-11 Thread Pocket



On 11/11/23 12:05, Stefan Monnier wrote:

Are these 2TB SSDs or hard disks? I would counsel very strongly indeed
against using any ARM-based single board computer as a RAID device on
USB connections - they're just *not* up to it.

I don't think the issue is whether they're ARM based.

The issue is simply how you connect the disks: in my experience, disks
connected via USB are simply not quite up to a 24/7 situation,
especially if the disk is USB-powered.


 Stefan



I have used ssd drives connected to a RPI4 ever since the 4 came out, 
zero issues.


The RPI4's boot from the ssd drives.

I have 4 SSD drives connected to a single RPI4 currently, using a 
powered USB hub.


One of those drives contains the boot and root filesystems.

BTW that particular RPI4 runs 24/7 as it is my name server, email 
server, web server and backup server for my network.


It has an uptime of 18 months.


--
It's not easy to be me



Re: Hardware for a back up server? [WAS Re: How to use dmsetuup?]

2023-11-11 Thread fxkl47BF
just my two sense
not advice or promotion
i've used this device for about 2.5 years with 6tb harddrives in raid 1
i have partitions on the raid for the os, debian, and the rest for backups
no problems so far


https://ameridroid.com/products/odroid-hc4




Re: Hardware for a back up server? [WAS Re: How to use dmsetuup?]

2023-11-11 Thread Stefan Monnier
> Are these 2TB SSDs or hard disks? I would counsel very strongly indeed 
> against using any ARM-based single board computer as a RAID device on
> USB connections - they're just *not* up to it.

I don't think the issue is whether they're ARM based.

The issue is simply how you connect the disks: in my experience, disks
connected via USB are simply not quite up to a 24/7 situation,
especially if the disk is USB-powered.


Stefan



Hardware for a back up server? [WAS Re: How to use dmsetuup?]

2023-11-11 Thread Andrew M.A. Cater
On Fri, Nov 10, 2023 at 10:22:07PM -0500, gene heskett wrote:
> On 11/10/23 19:46, David Christensen wrote:
> > On 11/8/23 02:20, gene heskett wrote:
> > > And I just looked at tht pair, and acc gparted they have both been
> > > pvcreated, so I'll leave then alone and steal the dvd cable, puttin
> > > a new 2T drive if I can rig power to it.
> > 
> > 
> > As I previously suggested, and as you previously seemed agreeable to, I
> > think you should stop working on the Asus and build a backup server.
> > 
> I'm thinking of making a slow one out of a headless bananapi-5 with a 2T on
> every usb3 port as a raid, type to be determined, I rather like the idea of
> parity being striped across all 4 disks. I have the drives but not sure of
> the usb-sata adapters, need to goto the garage and retrieve that box. That,
> and there's only one of me ;o)>  And me is 89 yo with a worn out body. A
> pacemaker and some new parts in my heart too.
> 

Gene,

Are these 2TB SSDs or hard disks? I would counsel very strongly indeed 
against using any ARM-based single board computer as a RAID device on
USB connections - they're just *not* up to it.

Get a cheap barebones system that you add memory to in a small-ish size 
case with SATA cables to motherboard ports that's Intel/AMD based that
you can then put disks into to format. If you can't get a barebones,
at least get a second hand machine in a tower case.

Build a simple Debian system on one disk there to format other disks :)
Once you've built a simple Debian system there, you can add mdadm RAID
and use it as a backup storage device to copy off your /home and so on. 

> Startech adapters are working very well to a pair of smaller SSD's on the
> rpi4b that runs my old (80+) Sheldon 11"x54" lathe, teaching it new tricks
> it never dreamed of doing 80+ years ago. Metric or imperial, it doesn't
> care.  Even cuts threads I've invented.  I have a complete linuxcnc buildbot
> on that pi. The latest bpi runs at 2 gigahertz which is about twice as fast
> as the pi's.

USB adapters will work well until you are _absolutely_ reliant on them,
then there will be a problem in my experience :(
> 
> > > This mobo also claims to be able to do the intel version of a raid
> > > on its own sata ports.  Does anyone here have experience doing that?
> > 
> > 
> > Yes, but I prefer software RAID -- because I can move the disks to
> > another computer with different hardware and the arrays will still work.
> >  Hardware RAID typically requires compatible hardware.
> > 

Yes, absolutely agreed with David on this.

> > 
> > David
> > 
> > .
> Understood before hand.  Thanks David, take care & stay well.
> 

All the very best, as ever,

Andy
[amaca...@debian.org]
> Cheers, Gene Heskett.
> -- 
> "There are four boxes to be used in defense of liberty:
>  soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author, 1940)
> If we desire respect for the law, we must first make the law respectable.
>  - Louis D. Brandeis
> 



Re: How to use dmsetuup?

2023-11-10 Thread gene heskett

On 11/10/23 19:46, David Christensen wrote:

On 11/8/23 02:20, gene heskett wrote:
But before I do yet another reinstall, 24th or so. two of the sata 
2t's are installed, and I'm tempted to rsych the raid to one of them 
to see if reassigning /home to a copy of /home does away with this 
horrible lag I'm wanting to blame on the raid10.



Testing your applications for file system issues using a single non-RAID 
device with one partition and an ext4 file system is a good 
trouble-shooting technique.  But, see my next comment.



They are empty except for the ext4 install and if pvcreate just slams 
the new format regardless, I'll rsync the 2T /home back to the raid10, 
and unplug that controller before I put the install dvd in. I also 
have another sata controller, this one with all 16 ports installed.


And I just looked at tht pair, and acc gparted they have both been 
pvcreated, so I'll leave then alone and steal the dvd cable, puttin a 
new 2T drive if I can rig power to it.



As I previously suggested, and as you previously seemed agreeable to, I 
think you should stop working on the Asus and build a backup server.


I'm thinking of making a slow one out of a headless bananapi-5 with a 2T 
on every usb3 port as a raid, type to be determined, I rather like the 
idea of parity being striped across all 4 disks. I have the drives but 
not sure of the usb-sata adapters, need to goto the garage and retrieve 
that box. That, and there's only one of me ;o)>  And me is 89 yo with a 
worn out body. A pacemaker and some new parts in my heart too.


Startech adapters are working very well to a pair of smaller SSD's on 
the rpi4b that runs my old (80+) Sheldon 11"x54" lathe, teaching it new 
tricks it never dreamed of doing 80+ years ago. Metric or imperial, it 
doesn't care.  Even cuts threads I've invented.  I have a complete 
linuxcnc buildbot on that pi. The latest bpi runs at 2 gigahertz which 
is about twice as fast as the pi's.


Thanks for the advice, ATM I'm trying to bring a big new 80 lb 3d 
printer to life. If it works well I might throw some more sheckles into 
a farm of them.


Good disaster preparedness expedites system operations, maintenance, and 
change -- because you can take risky steps and recover if those steps fail.



This mobo also claims to be able to do the intel version of a raid on 
its own sata ports.  Does anyone here have experience doing that?



Yes, but I prefer software RAID -- because I can move the disks to 
another computer with different hardware and the arrays will still work. 
  Hardware RAID typically requires compatible hardware.



David

.

Understood before hand.  Thanks David, take care & stay well.

Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis



Re: How to use dmsetuup?

2023-11-10 Thread David Christensen

On 11/8/23 02:20, gene heskett wrote:
But before I do yet another reinstall, 24th or so. two of the sata 2t's 
are installed, and I'm tempted to rsych the raid to one of them to see 
if reassigning /home to a copy of /home does away with this horrible lag 
I'm wanting to blame on the raid10.



Testing your applications for file system issues using a single non-RAID 
device with one partition and an ext4 file system is a good 
trouble-shooting technique.  But, see my next comment.



They are empty except for the ext4 install and if pvcreate just slams 
the new format regardless, I'll rsync the 2T /home back to the raid10, 
and unplug that controller before I put the install dvd in. I also have 
another sata controller, this one with all 16 ports installed.


And I just looked at tht pair, and acc gparted they have both been 
pvcreated, so I'll leave then alone and steal the dvd cable, puttin a 
new 2T drive if I can rig power to it.



As I previously suggested, and as you previously seemed agreeable to, I 
think you should stop working on the Asus and build a backup server.



Good disaster preparedness expedites system operations, maintenance, and 
change -- because you can take risky steps and recover if those steps fail.



This mobo also claims to be able to do the intel version of a raid on 
its own sata ports.  Does anyone here have experience doing that?



Yes, but I prefer software RAID -- because I can move the disks to 
another computer with different hardware and the arrays will still work. 
 Hardware RAID typically requires compatible hardware.



David



Re: How to use dmsetuup?

2023-11-09 Thread debian-user
Andy Smith  wrote:
> Hello,
> 
> On Wed, Nov 08, 2023 at 05:19:01PM -0700, Tom Dial wrote:
> > On 11/7/23 17:19, gene heskett wrote:  
> > > What do I do if a gpt partition table has already been made and
> > > an ext4 system is already installed? IOW just how "bare" a disk
> > > is needed? Is writing a null gpt sufficient?  
> 
> > You can ignore them, or not, as you like. If you want, you could
> > overwrite them with zeros or a pattern of your choice; I would not
> > bother.  
> 
> You do need to be very careful if you have put a GPT label on a
> device and then incompletely wiped the device in order to use it for
> something else that doesn't involve a GPT label.
> 
> The reason for that is, there are several motherboards (EFI
> firmwares?) out there that consider a missing GPT label with a
> backup GPT present to be an indication that the device is corrupt.
> They then helpfully copy the backup GPT back to the start of the
> disk, corrupting any data that was there already.

Yes, that kind of thing is why I always put a couple of small, unused
partitions at the start and end of a disk that's to be used for LVM.

Partition the disk as normal using GPT and then put LVM on the middle
partition.

> Example:
> 
> https://news.ycombinator.com/item?id=18541493
> 
> "wipefs -a /dev/sda" shold clear the GPT without having to write to
> the entire device.
> 
> Thanks,
> Andy
> 



Re: How to use dmsetuup?

2023-11-09 Thread Andy Smith
Hello,

On Wed, Nov 08, 2023 at 05:19:01PM -0700, Tom Dial wrote:
> On 11/7/23 17:19, gene heskett wrote:
> > What do I do if a gpt partition table has already been made and
> > an ext4 system is already installed? IOW just how "bare" a disk
> > is needed? Is writing a null gpt sufficient?

> You can ignore them, or not, as you like. If you want, you could
> overwrite them with zeros or a pattern of your choice; I would not
> bother.

You do need to be very careful if you have put a GPT label on a
device and then incompletely wiped the device in order to use it for
something else that doesn't involve a GPT label.

The reason for that is, there are several motherboards (EFI
firmwares?) out there that consider a missing GPT label with a
backup GPT present to be an indication that the device is corrupt.
They then helpfully copy the backup GPT back to the start of the
disk, corrupting any data that was there already.

Example:

https://news.ycombinator.com/item?id=18541493

"wipefs -a /dev/sda" shold clear the GPT without having to write to
the entire device.

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



Re: How to use dmsetuup?

2023-11-08 Thread Tom Dial




On 11/8/23 03:20, gene heskett wrote:

On 11/8/23 00:34, to...@tuxteam.de wrote:

On Tue, Nov 07, 2023 at 07:19:40PM -0500, gene heskett wrote:

[...]


What do I do if a gpt partition table has already been made and an ext4
system is already installed? IOW just how "bare" a disk is needed? Is
writing a null gpt sufficient?


Hm. I may have missed something, but I've got the impression we are a
second round through this: you just slap the LVM infrastructure over
current data, it will overwrite what it needs to and mark the rest as
free space. It just replaces what was before on disk.


Sounds good.
However I may go a different route. I have a not installed 2T WD-Black SN770 NVMe 
SSD, format 2280. This Asus prime z370-A II modo has two M2 sockets which the docs 
say both can use a 2280, but they operate differently w/o really explaining the 
difference. The one in the middle of the board, the A socket 2_2 looks like I have 
to pull the CPU and its radiator to be able to really get to it, and actually only 
shows how to install in the lower 2_1 socket which also has a heat sinking cover 
that must be removed & reinstalled. Is this then the preferred location, or is 
there an advantage to the other socket nearer the CPU?.


This is a different question entirely.




It /might/ warn you that you're about overwriting potentially valuable
data, I don't remember.


By my recollection, LVM operations DO NOT WARN. I might be wrong, but don't 
recommend the alternative. Use with care.



But before I do yet another reinstall, 24th or so. two of the sata 2t's are 
installed, and I'm tempted to rsych the raid to one of them to see if 
reassigning /home to a copy of /home does away with this horrible lag I'm 
wanting to blame on the raid10.


Unless, of course, the data is sensitive: in that case you want to zero
(or better: random) it.

Cheers


Thank you.

They are empty except for the ext4 install and if pvcreate just slams the new format regardless, I'll rsync the 2T /home back to the raid10, and unplug that controller before I put the install dvd in. I also have another sata controller, this one with all 16 ports installed.> 
And I just looked at tht pair, and acc gparted they have both been pvcreated, so I'll leave then alone and steal the dvd cable, puttin a new 2T drive if I can rig power to it.

This mobo also claims to be able to do the intel version of a raid on its own 
sata ports.  Does anyone here have experience doing that?


Mixing hardware RAID with either LVM (or ZFS) has no benefit that I know of. 
ZFS guidance recommends against it. I suggest picking any one method to create 
your /home, carrying it through, and if you don't like the result, redo it with 
another. I've used LVM for more than 25 years on HP-UX and Linux with good 
results. I switched a few years back to ZFS for new installs, also with good 
results. Both are reliable, expandable, and easy to manage, albeit with 
learning curves. I haven't used hardware raid because the software ones are 
quite good enough, and they also have their learning curve.

Regards,
Tom






Thanks Tomas
Cheers, Gene Heskett.




Re: How to use dmsetuup?

2023-11-08 Thread Tom Dial




On 11/7/23 17:19, gene heskett wrote:

On 11/7/23 18:42, Tom Dial wrote:



On 11/6/23 08:47, Franco Martelli wrote:

On 03/11/23 at 17:27, gene heskett wrote:

Greetings all;
As usual, the man page may as well be written in swahili. The NDE syndrome, 
meaning No D-d Examples.

I have those 2 2T SSD's with a gpt partition table on both, allocated as sdc1 
and sdk1, formatted to ext4, named and labeled as lvm1 and lvm2.
Temp mounted as sdc1 and sdk1 to /mnt/lvm1 and /mnt/lvm2

How do I create a single managed volume of labels lvm1 and lvm2 of these to 
make a single volume that I can then rsynch /home to it, then switch fstab to 
mount it as /home on a reboot?


You do not put a file system on the partitions you are using as LVM physical 
volumes. And you do not mount them.


What do I do if a gpt partition table has already been made and an ext4 system is already 
installed? IOW just how "bare" a disk is needed? Is writing a null gpt 
sufficient?

Hi Gene,

You can ignore them, or not, as you like. If you want, you could overwrite them 
with zeros or a pattern of your choice; I would not bother.

Logical volume creation and mkfs operations on the logical volume(s) will 
replace them.

Tom



Thank you Tom.


The rough procedure is

Create LVM physical volumes on raw disk partitions using pvcreate  (or lvm 
pvcreate) e. g.,

pvcreate /dev/sdc1
pvcreate /dev/sdk1

This gives you two physical volumes to use to create one or two volume groups
Create an LVM volume group using vgcreate (or lvm vgcreate), e. g.,

vgcreate home-vg sdc1 sdk1

This gives you a volume group named "home-vg" with 4.4 TB raw storage in which 
you can create one or more logical volumes.
Create the logical volumes you want. It appears you want only one, to mounted 
at /home. For instance,

lvcreate --size 1024G -n home-volume home-vg

will create a 1 TB logical volume, represented under dev by 
/dev/home-vg/home-volume

Put a file system on the logical volume in the normal way, such  as:

mkfs -t ext4 /dev/home-vg/home-volume

mount the new volume (and put it in /etc/fstab for mounting at boot:

mount /dev/home-vg/home-volume /home

Doing this probably will not give you what you want. (For instance, if I 
remember right, the entire logical volume would, in this case, wind up on the 
first-named physical volume vgcreate command.) The man pages for lvm and its 
subcommands offer a lot of options for things like storage allocation 
between/among multiple physical volumes that make up a volume group, the size 
of allocation units, such things as RAID level, and a large number of other 
properties. You probably know what you want, and from what I've seen on this 
list seem quite able to fish it up out of the man pages, some of which have 
usefully suggestive examples.

OTOH, I would recommend ZFS for this based on experience with LVM and ZFS in 
both commercial (e. g., HP-UX and SolaRIS) and Linux environments. Both have 
learning curves that I would judge comparable, both are flexible and fairly 
easy to manage, and both are or can be highly resilient. On the whole, though, 
I prefer ZFS.

Regards,
Tom Dial





How about to use debian-installer: burn the dvd image of Bookworm 12.2, put into the DVD 
drive then reboot the system. You have to choose "Expert Install" and it's all 
menu driven from RAID device creation to LVM logical device and logical volume names.
I don't know if you can do that from debian-installer rescue disk mode.

HTH
kinds regards



.


Cheers, Gene Heskett.




Re: How to use dmsetuup?

2023-11-08 Thread jeremy ardley



On 9/11/23 02:02, Andrew M.A. Cater wrote:

Double check - sometimes one socket may be intended primarily for "other"
M2 devices. There shouldn't be any particular difference
between the two - one is obviously easier to reach than the other.
Occasionally, having two may mean that they run slightly slower.



I don't know about that model, but my ASUS Prime B550M-A has 2x M.2 PCIE 
sockets. One runs PCIE 4.0 the other PCIE 3.0 So a significant speed 
difference.


Other boards, mainly SBC, have additional M.2 sockets for short devices 
such as WiFi




Re: How to use dmsetuup?

2023-11-08 Thread Andrew M.A. Cater
On Wed, Nov 08, 2023 at 05:20:47AM -0500, gene heskett wrote:
> On 11/8/23 00:34, to...@tuxteam.de wrote:
> > On Tue, Nov 07, 2023 at 07:19:40PM -0500, gene heskett wrote:


> > 
> Sounds good.
> However I may go a different route. I have a not installed 2T WD-Black SN770
> NVMe SSD, format 2280. This Asus prime z370-A II modo has two M2 sockets
> which the docs say both can use a 2280, but they operate differently w/o
> really explaining the difference. The one in the middle of the board, the A
> socket 2_2 looks like I have to pull the CPU and its radiator to be able to
> really get to it, and actually only shows how to install in the lower 2_1
> socket which also has a heat sinking cover that must be removed &
> reinstalled. Is this then the preferred location, or is there an advantage
> to the other socket nearer the CPU?.
> 

Double check - sometimes one socket may be intended primarily for "other"
M2 devices. There shouldn't be any particular difference
between the two - one is obviously easier to reach than the other.
Occasionally, having two may mean that they run slightly slower.

> They are empty except for the ext4 install and if pvcreate just slams the
> new format regardless, I'll rsync the 2T /home back to the raid10, and
> unplug that controller before I put the install dvd in. I also have another
> sata controller, this one with all 16 ports installed.
> 

It might be sensible to think about rebuilding the machine to use _one_
controller. If the 16 port controller has a JBOD mode, use that and
use mdadm. Splitting between some MB SATA ports, some on a card may not
be efficient. [JBOD == "just a bunch of disks" == no RAID intelligence
applied by the card itself]

> And I just looked at tht pair, and acc gparted they have both been
> pvcreated, so I'll leave then alone and steal the dvd cable, puttin a new 2T
> drive if I can rig power to it.
> This mobo also claims to be able to do the intel version of a raid on its
> own sata ports.  Does anyone here have experience doing that?

"Motherboard RAID" is not portable - mdadm is at least as efficient.
On the one machine I have that has "motherboard RAID", it's effectively
something like mdadm but writes some signature to the disk that means
it can only be read by that software. A "proper" RAID controller has
large amounts of RAM, battery backup - they generally cost $$$
> 
> Thanks Tomas
> Cheers, Gene Heskett.
> -- 

All the very best, as ever,

Andy

[amaca...@debian.org]

> "There are four boxes to be used in defense of liberty:
>  soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author, 1940)
> If we desire respect for the law, we must first make the law respectable.
>  - Louis D. Brandeis
> 



Re: How to use dmsetuup?

2023-11-08 Thread gene heskett

On 11/8/23 00:34, to...@tuxteam.de wrote:

On Tue, Nov 07, 2023 at 07:19:40PM -0500, gene heskett wrote:

[...]


What do I do if a gpt partition table has already been made and an ext4
system is already installed? IOW just how "bare" a disk is needed? Is
writing a null gpt sufficient?


Hm. I may have missed something, but I've got the impression we are a
second round through this: you just slap the LVM infrastructure over
current data, it will overwrite what it needs to and mark the rest as
free space. It just replaces what was before on disk.


Sounds good.
However I may go a different route. I have a not installed 2T WD-Black 
SN770 NVMe SSD, format 2280. This Asus prime z370-A II modo has two M2 
sockets which the docs say both can use a 2280, but they operate 
differently w/o really explaining the difference. The one in the middle 
of the board, the A socket 2_2 looks like I have to pull the CPU and its 
radiator to be able to really get to it, and actually only shows how to 
install in the lower 2_1 socket which also has a heat sinking cover that 
must be removed & reinstalled. Is this then the preferred location, or 
is there an advantage to the other socket nearer the CPU?.



It /might/ warn you that you're about overwriting potentially valuable
data, I don't remember.


But before I do yet another reinstall, 24th or so. two of the sata 2t's 
are installed, and I'm tempted to rsych the raid to one of them to see 
if reassigning /home to a copy of /home does away with this horrible lag 
I'm wanting to blame on the raid10.


Unless, of course, the data is sensitive: in that case you want to zero
(or better: random) it.

Cheers


Thank you.

They are empty except for the ext4 install and if pvcreate just slams 
the new format regardless, I'll rsync the 2T /home back to the raid10, 
and unplug that controller before I put the install dvd in. I also have 
another sata controller, this one with all 16 ports installed.


And I just looked at tht pair, and acc gparted they have both been 
pvcreated, so I'll leave then alone and steal the dvd cable, puttin a 
new 2T drive if I can rig power to it.
This mobo also claims to be able to do the intel version of a raid on 
its own sata ports.  Does anyone here have experience doing that?


Thanks Tomas
Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis



Re: How to use dmsetuup?

2023-11-07 Thread tomas
On Tue, Nov 07, 2023 at 07:19:40PM -0500, gene heskett wrote:

[...]

> What do I do if a gpt partition table has already been made and an ext4
> system is already installed? IOW just how "bare" a disk is needed? Is
> writing a null gpt sufficient?

Hm. I may have missed something, but I've got the impression we are a
second round through this: you just slap the LVM infrastructure over
current data, it will overwrite what it needs to and mark the rest as
free space. It just replaces what was before on disk.

It /might/ warn you that you're about overwriting potentially valuable
data, I don't remember.

Unless, of course, the data is sensitive: in that case you want to zero
(or better: random) it.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: How to use dmsetuup?

2023-11-07 Thread David Christensen

On 11/7/23 16:19, gene heskett wrote:

On 11/7/23 18:42, Tom Dial wrote:

On 03/11/23 at 17:27, gene heskett wrote:
I have those 2 2T SSD's with a gpt partition table on both, 
allocated as sdc1 and sdk1, formatted to ext4, named and labeled as 
lvm1 and lvm2.

Temp mounted as sdc1 and sdk1 to /mnt/lvm1 and /mnt/lvm2

How do I create a single managed volume of labels lvm1 and lvm2 of 
these to make a single volume that I can then rsynch /home to it, 
then switch fstab to mount it as /home on a reboot?


You do not put a file system on the partitions you are using as LVM 
physical volumes. And you do not mount them.


What do I do if a gpt partition table has already been made and an ext4 
system is already installed? IOW just how "bare" a disk is needed? Is 
writing a null gpt sufficient?



For software disk management (md, LVM, ZFS, etc.), whether to use entire 
disks or to use partitions is a matter of preference.  Some people like 
to use entire disks to skip layers of drivers (e.g. minimum latency, 
minimum memory), to obtain 100% of the available blocks, etc..  Other 
people like to use partitions to apply meaningful labels to the 
partitions, to choose a somewhat smaller size to accommodate disks with 
different numbers of blocks (important when replacing a failing drive), 
etc..



For a mirror of two identical disk drives, I chose md RAID1 and entire 
disks in 2017.  KISS.  I think that would work for you now.



You will not need the ext4 file systems.


Whether you choose partitions or entire disks, it is good to zero-fill 
them prior to giving them to your disk management software.  But, 
zero-filling disks and partitions is dangerous due to the risk of 
operator error.  I use a spare computer with no drives other than the 
drive in question.  I boot d-i, Debian live, a personal live USB stick, 
etc., and do the work.  If I make a mistake, I will not trash a 
production computer.



David



Re: How to use dmsetuup?

2023-11-07 Thread gene heskett

On 11/7/23 18:42, Tom Dial wrote:



On 11/6/23 08:47, Franco Martelli wrote:

On 03/11/23 at 17:27, gene heskett wrote:

Greetings all;
As usual, the man page may as well be written in swahili. The NDE 
syndrome, meaning No D-d Examples.


I have those 2 2T SSD's with a gpt partition table on both, allocated 
as sdc1 and sdk1, formatted to ext4, named and labeled as lvm1 and lvm2.

Temp mounted as sdc1 and sdk1 to /mnt/lvm1 and /mnt/lvm2

How do I create a single managed volume of labels lvm1 and lvm2 of 
these to make a single volume that I can then rsynch /home to it, 
then switch fstab to mount it as /home on a reboot?


You do not put a file system on the partitions you are using as LVM 
physical volumes. And you do not mount them.


What do I do if a gpt partition table has already been made and an ext4 
system is already installed? IOW just how "bare" a disk is needed? Is 
writing a null gpt sufficient?


Thank you Tom.


The rough procedure is

Create LVM physical volumes on raw disk partitions using pvcreate  (or 
lvm pvcreate) e. g.,


pvcreate /dev/sdc1
pvcreate /dev/sdk1

This gives you two physical volumes to use to create one or two volume 
groups

Create an LVM volume group using vgcreate (or lvm vgcreate), e. g.,

vgcreate home-vg sdc1 sdk1

This gives you a volume group named "home-vg" with 4.4 TB raw storage in 
which you can create one or more logical volumes.
Create the logical volumes you want. It appears you want only one, to 
mounted at /home. For instance,


lvcreate --size 1024G -n home-volume home-vg

will create a 1 TB logical volume, represented under dev by 
/dev/home-vg/home-volume


Put a file system on the logical volume in the normal way, such  as:

mkfs -t ext4 /dev/home-vg/home-volume

mount the new volume (and put it in /etc/fstab for mounting at boot:

mount /dev/home-vg/home-volume /home

Doing this probably will not give you what you want. (For instance, if I 
remember right, the entire logical volume would, in this case, wind up 
on the first-named physical volume vgcreate command.) The man pages for 
lvm and its subcommands offer a lot of options for things like storage 
allocation between/among multiple physical volumes that make up a volume 
group, the size of allocation units, such things as RAID level, and a 
large number of other properties. You probably know what you want, and 
from what I've seen on this list seem quite able to fish it up out of 
the man pages, some of which have usefully suggestive examples.


OTOH, I would recommend ZFS for this based on experience with LVM and 
ZFS in both commercial (e. g., HP-UX and SolaRIS) and Linux 
environments. Both have learning curves that I would judge comparable, 
both are flexible and fairly easy to manage, and both are or can be 
highly resilient. On the whole, though, I prefer ZFS.


Regards,
Tom Dial





How about to use debian-installer: burn the dvd image of Bookworm 
12.2, put into the DVD drive then reboot the system. You have to 
choose "Expert Install" and it's all menu driven from RAID device 
creation to LVM logical device and logical volume names.

I don't know if you can do that from debian-installer rescue disk mode.

HTH
kinds regards



.


Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis



Re: How to use dmsetuup?

2023-11-07 Thread Tom Dial




On 11/6/23 08:47, Franco Martelli wrote:

On 03/11/23 at 17:27, gene heskett wrote:

Greetings all;
As usual, the man page may as well be written in swahili. The NDE syndrome, 
meaning No D-d Examples.

I have those 2 2T SSD's with a gpt partition table on both, allocated as sdc1 
and sdk1, formatted to ext4, named and labeled as lvm1 and lvm2.
Temp mounted as sdc1 and sdk1 to /mnt/lvm1 and /mnt/lvm2

How do I create a single managed volume of labels lvm1 and lvm2 of these to 
make a single volume that I can then rsynch /home to it, then switch fstab to 
mount it as /home on a reboot?


You do not put a file system on the partitions you are using as LVM physical 
volumes. And you do not mount them.

The rough procedure is

Create LVM physical volumes on raw disk partitions using pvcreate  (or lvm 
pvcreate) e. g.,

pvcreate /dev/sdc1
pvcreate /dev/sdk1

This gives you two physical volumes to use to create one or two volume groups
Create an LVM volume group using vgcreate (or lvm vgcreate), e. g.,

vgcreate home-vg sdc1 sdk1

This gives you a volume group named "home-vg" with 4.4 TB raw storage in which 
you can create one or more logical volumes.
Create the logical volumes you want. It appears you want only one, to mounted 
at /home. For instance,

lvcreate --size 1024G -n home-volume home-vg

will create a 1 TB logical volume, represented under dev by 
/dev/home-vg/home-volume

Put a file system on the logical volume in the normal way, such  as:

mkfs -t ext4 /dev/home-vg/home-volume

mount the new volume (and put it in /etc/fstab for mounting at boot:

mount /dev/home-vg/home-volume /home

Doing this probably will not give you what you want. (For instance, if I 
remember right, the entire logical volume would, in this case, wind up on the 
first-named physical volume vgcreate command.) The man pages for lvm and its 
subcommands offer a lot of options for things like storage allocation 
between/among multiple physical volumes that make up a volume group, the size 
of allocation units, such things as RAID level, and a large number of other 
properties. You probably know what you want, and from what I've seen on this 
list seem quite able to fish it up out of the man pages, some of which have 
usefully suggestive examples.

OTOH, I would recommend ZFS for this based on experience with LVM and ZFS in 
both commercial (e. g., HP-UX and SolaRIS) and Linux environments. Both have 
learning curves that I would judge comparable, both are flexible and fairly 
easy to manage, and both are or can be highly resilient. On the whole, though, 
I prefer ZFS.

Regards,
Tom Dial





How about to use debian-installer: burn the dvd image of Bookworm 12.2, put into the DVD 
drive then reboot the system. You have to choose "Expert Install" and it's all 
menu driven from RAID device creation to LVM logical device and logical volume names.
I don't know if you can do that from debian-installer rescue disk mode.

HTH
kinds regards





Re: How to use dmsetuup?

2023-11-06 Thread gene heskett

On 11/6/23 10:48, Franco Martelli wrote:

On 03/11/23 at 17:27, gene heskett wrote:

Greetings all;
As usual, the man page may as well be written in swahili. The NDE 
syndrome, meaning No D-d Examples.


I have those 2 2T SSD's with a gpt partition table on both, allocated 
as sdc1 and sdk1, formatted to ext4, named and labeled as lvm1 and lvm2.

Temp mounted as sdc1 and sdk1 to /mnt/lvm1 and /mnt/lvm2

How do I create a single managed volume of labels lvm1 and lvm2 of 
these to make a single volume that I can then rsynch /home to it, then 
switch fstab to mount it as /home on a reboot?




How about to use debian-installer: burn the dvd image of Bookworm 12.2, 
put into the DVD drive then reboot the system. You have to choose 
"Expert Install" and it's all menu driven from RAID device creation to 
LVM logical device and logical volume names.

I don't know if you can do that from debian-installer rescue disk mode.

HTH
kinds regards

All entirely possible, unless you forget to unplug everything usb that 
isn't keyboard or mouse. BTDT, 22+ times.


Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis



Re: How to use dmsetuup?

2023-11-06 Thread Franco Martelli

On 03/11/23 at 17:27, gene heskett wrote:

Greetings all;
As usual, the man page may as well be written in swahili. The NDE 
syndrome, meaning No D-d Examples.


I have those 2 2T SSD's with a gpt partition table on both, allocated as 
sdc1 and sdk1, formatted to ext4, named and labeled as lvm1 and lvm2.

Temp mounted as sdc1 and sdk1 to /mnt/lvm1 and /mnt/lvm2

How do I create a single managed volume of labels lvm1 and lvm2 of these 
to make a single volume that I can then rsynch /home to it, then switch 
fstab to mount it as /home on a reboot?




How about to use debian-installer: burn the dvd image of Bookworm 12.2, 
put into the DVD drive then reboot the system. You have to choose 
"Expert Install" and it's all menu driven from RAID device creation to 
LVM logical device and logical volume names.

I don't know if you can do that from debian-installer rescue disk mode.

HTH
kinds regards

--
Franco Martelli



Re: How to use dmsetuup?

2023-11-05 Thread Thomas Schmitt
Hi,

David Christensen wrote:
> Are there tools other than xorriso(1) that can create a compatible checksum?
> Read the checksum?

Not yet. The data format is documented in
  
https://dev.lovelyhq.com/libburnia/libisofs/raw/branch/master/doc/checksums.txt
For the general concept of AAIP attributes see
  
https://dev.lovelyhq.com/libburnia/libisofs/raw/branch/master/doc/susp_aaip_2_0.txt
For the exact format of attributes "isofs.ca" and "isofs.cx" see
  
https://dev.lovelyhq.com/libburnia/libisofs/raw/branch/master/doc/susp_aaip_isofs_names.txt

The implementation of this format in another program would be some work.
It would be much easier to link with libisoburn and to use its xorriso
API. Each xorriso command can be performed by a C function call. See
in /usr/include/libisoburn/xorriso.h the functions Xorriso_option_*().
Further there is Xorriso_interpreter() which performs commands and their
parameters given as text arguments. Xorriso_execute_option() splits a text
line into commands and parameters and performs them.

The way to get the MD5s of data files is an -exec action of command -find.
The MD5s must have been loaded at -indev time. So before -indev one has to
perform -for_backup or -md5 "on":

  xorriso -for_backup -indev /dev/sr0 -find / -exec get_md5 --

yields on stdout md5sum compatible lines of all MD5 equipped data files:

  bd8d516f33262f7d8ef3bf952729e671  /my/first_file
  90ae421ded24f03d6b7ae4d5bfdd41e9  /my/second_file
  ...

For the MD5 of just one particular file let -find start at that file

  md5_line=$( xorriso -for_backup -indev /dev/sr0 \
  -find /my/second_file -exec get_md5 -- 2>/dev/null )


> My approach is *.md5 and *.sha256 sister files for each archive encrypted
> tarball file.

As we can see with xorriso's MD5s and the parity checksums of the medium,
it is always good to have own checksums (although i deem SHA256 overdone
unless protection against malicious manipulations is needed).


> implementing algorithms
> from standards is non-trivial; bugs are not uncommon.

Especially when the specs are sparse with describing the exact algorithm
and use nomenclature from the checksum community.
ECMA-337 (DVD+RW) lists four algorithms, which use three different
polynomials and a notation "RS(X,Y,Z)" which i don't know.

I once had to explore the checksum algorithms of ECMA-130 (CD-ROM)
annex A and B. Other than with DVD and BD, the CD commands of MMC let the
user supply own error correction data when a raw write mode is selected.
See the comments at the beginning of
  
https://dev.lovelyhq.com/libburnia/libburn/raw/branch/master/libburn/ecma130ab.c
(which i don't really understand 14 years after i wrote them down).


Have a nice day :)

Thomas



xorriso and SIGTERM/SIGINT handler (was: Re: How to use dmsetuup?)

2023-11-05 Thread Max Nikulin

On 05/11/2023 15:04, Thomas Schmitt wrote:

If you want to abort earlier, do not press Ctrl+C but rather do
   touch /var/opt/xorriso/do_abort_check_media


I do not have an optical drive around for last years, so feel free to 
ignore my question. Are there obstacles making implementation of proper 
SIGINT and SIGTERM signals handler prohibitively difficult? Ctrl+C is a 
common part of UI familiar to the most of users. There are should be 
serious reasons if it is necessary to teach them to touch an application 
specific file.




Re: How to use dmsetuup?

2023-11-05 Thread David Christensen

On 11/5/23 14:16, Thomas Schmitt wrote:

David Christensen wrote:

Adding checksum file(s) to the contents burned to disc is an important step
that should not be omitted


I let xorriso compute and store the checksums in a non-file block range
at the end of the ISO filesystem. Each file gets an AAIP attribute which
points to an MD5 in this checksum array.
The user only has to issue the xorriso command -for_backup or -md5 "on".



Are there tools other than xorriso(1) that can create a compatible 
checksum?  Read the checksum?



My approach is *.md5 and *.sha256 sister files for each archive 
encrypted tarball file.




Thomas Schmitt wrote:

i only once in my life watched a DVD giving bad data without an SCSI
error.


Interesting.  My WAG is that there was a marginal/ ambiguous dot on disc (?).


The astonishing fact is not the damaged data chunk but the drive's failure
to recognize the damage. There are substantial parity data wrapped around
each DVD "ECC Block" which the drive may use for error detection and
possibly for correction. If i count correctly in MMC-5 Figure 26, then
32 KiB payload data get added 192 * 10 + 15 * 182 = 4650 bytes of parity
data. ECMA-337 (about DVD+RW) mentions in 13.1 two more checksums with
6 bytes per 2048 bytes of payload data.

With such much of redundancy it is highly unlikely that an alteration
stays undetected or that an error correction yields a wrong result.
Nevertheless in this special combination of medium and drive the error was
not reported or corrected by the drive but rather a wrong data chunk was
handed out.

At that occasion an MD5 recorded by xorriso indicated the error.
Comparing the read results on several drives showed that it was about a
single ECC block of 32 KiB payload.



I was thinking opto-electronics -- phototransistor and analog-to-digital 
conversion -- but you are right: the error detection and error 
correction math should be the same on all the drives and they all should 
have caught a bad bit (or combination of bad bits).  Then again, 
implementing algorithms from standards is non-trivial; bugs are not 
uncommon.  Perhaps the cause was a combination of both.  But, your 
xorriso(1) MD5 checksum added one more layer of defense and that saved 
the day.




I seem to recall a post by you that indicated *BSD lacked the features
needed for good optical drive/ media/ format support.


I have difficulties to remember ...


Can I get xorriso(1) on FreeBSD?


I don't have a FreeBSD test machine any more. So we have to rely on the
web ... xorriso seems to be available in the versions as in Sid (1.5.6)
and Buster (1.5.0):
   https://www.freshports.org/sysutils/xorriso/
GNU xorriso should compile on FreeBSD out of the box:
   https://www.gnu.org/software/xorriso/#download
Older versions available on
   https://ftp.gnu.org/gnu/xorriso
User experience reports are welcome.



Bingo!

2023-11-05 14:39:58 dpchrist@f3 ~
$ freebsd-version -kru ; uname -a
12.4-RELEASE-p6
12.4-RELEASE-p6
12.4-RELEASE-p6
FreeBSD f3.tracy.holgerdanske.com 12.4-RELEASE-p6 FreeBSD 
12.4-RELEASE-p6 GENERIC  amd64


2023-11-05 14:40:05 dpchrist@f3 ~
$ pkg search xorriso
xorriso-1.5.6  ISO image manipulation tool based on 
Libburnia



David



Re: How to use dmsetuup?

2023-11-05 Thread David Christensen

On 11/5/23 12:46, debian-u...@howorth.org.uk wrote:

David Christensen  wrote:

On 11/5/23 01:04, Thomas Schmitt wrote:



Lesson learnt: Never overwrite the two youngest backups.


I try to use the term "backup" to mean a data copying process whereby
older data is overwritten by newer data.

I try to use the term "archive' to mean a data copying process
whereby the copy is never modified or erased.


You're entitled to do that I suppose, but I don't suppose most other
people do. They separate the words by their meanings and purpose.
Backups are intended for use recovering information that has become
lost. Archives are places to keep information for long term storage.

So your definition of archive is correct. But your definition of backup
isn't. It's perfectly reasonable to have more than one version or age
of backup, but it's also perfectly reasonable to erase them at some
chosen age or version.

It is perfectly reasonable to discuss 'the two youngest backups', IMHO.



English is ambiguous.  "Backup" and "archive" can both be used as nouns 
and/or verbs, depending upon context.  This makes communication hard, 
especially for non-native speakers.



I agree that the primary purpose of backup (verb when performed, noun 
for the media containing one copy of the data) is for recovery (verb 
when performed, noun for the result).



I agree that a backup (singular noun for the media) can be archived 
(verb), thereby becoming an archive (singular noun for the media) in an 
archive (collective noun for all the media and singular noun for a place).



The differentiating factor is whether or not the media containing the 
copy is intended for ongoing re-use.  I re-use my backup RAID's and 
HDD's.  I cannot re-use my archive DVD-R's.



David



Re: How to use dmsetuup?

2023-11-05 Thread Thomas Schmitt
Hi,

David Christensen wrote:
> Adding checksum file(s) to the contents burned to disc is an important step
> that should not be omitted

I let xorriso compute and store the checksums in a non-file block range
at the end of the ISO filesystem. Each file gets an AAIP attribute which
points to an MD5 in this checksum array.
The user only has to issue the xorriso command -for_backup or -md5 "on".


I wrote:
> > i only once in my life watched a DVD giving bad data without an SCSI
> > error.

David Christensen wrote:
> Interesting.  My WAG is that there was a marginal/ ambiguous dot on disc (?).

The astonishing fact is not the damaged data chunk but the drive's failure
to recognize the damage. There are substantial parity data wrapped around
each DVD "ECC Block" which the drive may use for error detection and
possibly for correction. If i count correctly in MMC-5 Figure 26, then
32 KiB payload data get added 192 * 10 + 15 * 182 = 4650 bytes of parity
data. ECMA-337 (about DVD+RW) mentions in 13.1 two more checksums with
6 bytes per 2048 bytes of payload data.

With such much of redundancy it is highly unlikely that an alteration
stays undetected or that an error correction yields a wrong result.
Nevertheless in this special combination of medium and drive the error was
not reported or corrected by the drive but rather a wrong data chunk was
handed out.

At that occasion an MD5 recorded by xorriso indicated the error.
Comparing the read results on several drives showed that it was about a
single ECC block of 32 KiB payload.


> I seem to recall a post by you that indicated *BSD lacked the features
> needed for good optical drive/ media/ format support.

I have difficulties to remember ...

> Can I get xorriso(1) on FreeBSD?

I don't have a FreeBSD test machine any more. So we have to rely on the
web ... xorriso seems to be available in the versions as in Sid (1.5.6)
and Buster (1.5.0):
  https://www.freshports.org/sysutils/xorriso/
GNU xorriso should compile on FreeBSD out of the box:
  https://www.gnu.org/software/xorriso/#download
Older versions available on
  https://ftp.gnu.org/gnu/xorriso
User experience reports are welcome.


Have a nice day :)

Thomas



Re: How to use dmsetuup?

2023-11-05 Thread debian-user
David Christensen  wrote:
> On 11/5/23 01:04, Thomas Schmitt wrote:

> > Lesson learnt: Never overwrite the two youngest backups.  
> 
> I try to use the term "backup" to mean a data copying process whereby 
> older data is overwritten by newer data.
> 
> I try to use the term "archive' to mean a data copying process
> whereby the copy is never modified or erased.

You're entitled to do that I suppose, but I don't suppose most other
people do. They separate the words by their meanings and purpose.
Backups are intended for use recovering information that has become
lost. Archives are places to keep information for long term storage.

So your definition of archive is correct. But your definition of backup
isn't. It's perfectly reasonable to have more than one version or age
of backup, but it's also perfectly reasonable to erase them at some
chosen age or version.

It is perfectly reasonable to discuss 'the two youngest backups', IMHO.



Re: How to use dmsetuup?

2023-11-05 Thread David Christensen

On 11/5/23 01:04, Thomas Schmitt wrote:

David Christensen wrote:

I have been burning archive DVD-R discs for ~14 years and storing them in a
drawer (e.g. darkness).  I checked the oldest just now and it reads okay.


That's my experience too. 



Okay.



I check by MD5 which are stored on the medium
together with the data. If a medium turns out unreadable then in nearly
all cases directly after burning.



Adding checksum file(s) to the contents burned to disc is an important 
step that should not be omitted -- checksum files are a simple and 
direct way to validate the integrity of disc contents.  Without checksum 
files, a computer with working applications is required to read and 
validate the specific file format(s).  I suspect tar(1), gzip(1) and 
ccrypt(1) do this (?), but you are lost with plain text files.




Lesson learnt: Never overwrite the two youngest backups.



I try to use the term "backup" to mean a data copying process whereby 
older data is overwritten by newer data.



I try to use the term "archive' to mean a data copying process whereby 
the copy is never modified or erased.




I have heard of CD discs disintegrating if the lacquer is scratched:
https://en.wikipedia.org/wiki/Disc_rot


This never hit me. But i keep my media away from high moisture, corroding
chemicals, and abrasive substances.



I expect CD disc rot occurs when discs are accidentally scratched or 
when discs are treated badly (e.g. stored loose; not in a case).




I have heard that RW media has a shorter lifespan than R media.


Not to my experience. I have 4x CD-RW from 2002 (*), DVD+RW from 2004, and
BD-RE from 2008 which still work for backups.



Okay.



From time to time a medium
dies during writing. This seems not to be closely related to age, though.

(*) I have older 2x CD-RW, but no burner any more which would accept them.
 They can be still read.



The DVD+-RW in my primary workstation started producing intermittent 
write failures a few months ago.  This quickly progressed to consistent 
write failures and consistent read failures.  I cleaned the lens today, 
and now it reads okay.  I will find out if it writes okay the next time 
I burn a disc.




Does anyone have experience with M-Disc media?


Only by reports of libburn users which say that M-Disc works like the
other media. Their durability can hardly be evaluated, given that normal
media seem to last for more than 2 decades without much problem.



Okay.



I think the better alternative for archived data would be to make several
identical copies and to checkread them in intervals of a few years. As
soon as one of the copies shows problems, make new copies of the healthy
ones. Payload checksums on the medium give extra trust, 



The optical media could be a single point of failure.  If I remove two 
DVD-R discs from the same case this month, burn them with identical 
contents, verify the checksums, store one disc locally, store the other 
disc off-site, and verify checksums once per year in the future, I could 
find that both discs fail in the same year.



So, I both burn my monthly archive encrypted tarballs to DVD-R and I 
keep the original on RAID, which is included in my backup process.




although i only
once in my life watched a DVD giving bad data without an SCSI error.
That was reproducible with only a single drive. All others either read
the affected 32 KiB chunk correctly or threw error. Having more than one
drive helps a lot when the read quality is on the edge.



Interesting.  My WAG is that there was a marginal/ ambiguous dot on disc 
(?).




A sincere rescue effort would look like:

   xorriso -outdev /dev/sr0 \
   -check_media use=outdev \
what=disc \
time_limit=7200 \
data_to="$HOME"/sr0.image \
sector_map="$HOME"/sr0.sector_map \
--

After 7200 seconds the attempt will end even if not finished.
If you want to abort earlier, do not press Ctrl+C but rather do
   touch /var/opt/xorriso/do_abort_check_media

The disc image will emerge as file "$HOME"/sr0.image .
The file "$HOME"/sr0.sector_map will record which blocks could be read
without SCSI error. If the run is repeated, then only the missing blocks
will be attempted to be read.
One may repeat with the same drive or better with different ones.
The file "$HOME"/sr0.image and "$HOME"/sr0.sector_map may be carried to
other computers to continue the rescue attempt with their drives.
If there are other partly damaged identical copies of the archive medium,
then one may use them too with the same sr0.image and sr0.sector_map
files.

If the image is an ISO 9660 filesystem made by xorriso with option
-for_backup and thus contains MD5s, then one may check the resulting
image by:

   xorriso -for_backup -indev "$HOME"/sr0.image -check_media --

Any protest would indicate that the rescue attempt was not successful.
If the direcory tree is undamaged, 

Re: How to use dmsetuup?

2023-11-05 Thread gene heskett

On 11/5/23 05:28, David Christensen wrote:

On 11/5/23 01:47, gene heskett wrote:

On 11/5/23 01:46, David Christensen wrote:
I am worried that you are going to make a mistake and suffer a data 
disaster (partial or total).  That is why I suggested that you give 
the Asus a rest and build a backup server now.


I'm also into 3d printers, and that has made me fam with the arm64 sbc 
cards such as the bananapi-m5 which has 4 ub3 ports on a 2GHz 4 core 
cpu. Startech makes a usb3 to sata adapter that can do 500M/sec to an 
SSD. I am doing it on an rpi4b.  So I am tempted to build my own NAS 
by using all 4 of those ports to hook 4 of these 2T gigastones up as a 
4G raid10. Run it headless by an ssh login, setup amanda server on it, 
setup amanda-client on the rest, setup amanda to do any compression on 
the clients which are fast enough to do it and let the pi handle the 
actual storage, including its database which makes a recovery a matter 
to telling it which file and how old. I normally setup for 60 to 90 
days of retention. It won't be fast but it will be isolated from 
anything that fails on the rest of my net,



Wow!  I got Gene to consider my suggestion!  :-)


David


After I wrote that in the not so wee hour of the morning, I went to one 
of my bpi's and verified that amanda is in the ubuntu jammy arm64 
repo's.  I'll have to get a few more of those drives and build a box. Or 
perhaps hide the bpi in a used drive cage. But it looks doable to me.


Why? Just because I can.  I'm the same guy whose running a 1500 lb, 80+ 
yo Sheldon lathe, using LinuxCNC with an rpi3b, now an rpi4b, for 7 or 
so years. I wanted to see if it could be done and it works so well I've 
had no urge to redo it with more conventional wintel hardware like my 
other 3 machines. LinuxCNC has taught that lathe many new dance steps it 
could not do when it left Chicago in the late 1940's and corrected for 
13 thou of bed wear in front of the chuck.  Cuts threads, imperial or 
metric, even tapered threads I have invented, Anything that 2 small 
motors moving the tool in micron or better synchronized in both 
directions can do, it Just Does.


All I have to do is muster up the giddyup to do it. a 89 yo, that is 
most assuredly getting harder.


Take care & stay well everybody.

Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis



Re: How to use dmsetuup?

2023-11-05 Thread David Christensen

On 11/5/23 01:47, gene heskett wrote:

On 11/5/23 01:46, David Christensen wrote:
I am 
worried that you are going to make a mistake and suffer a data 
disaster (partial or total).  That is why I suggested that you give 
the Asus a rest and build a backup server now.


I'm also into 3d 
printers, and that has made me fam with the arm64 sbc cards such as the 
bananapi-m5 which has 4 ub3 ports on a 2GHz 4 core cpu. Startech makes a 
usb3 to sata adapter that can do 500M/sec to an SSD. I am doing it on an 
rpi4b.  So I am tempted to build my own NAS by using all 4 of those 
ports to hook 4 of these 2T gigastones up as a 4G raid10. Run it 
headless by an ssh login, setup amanda server on it, setup amanda-client 
on the rest, setup amanda to do any compression on the clients which are 
fast enough to do it and let the pi handle the actual storage, including 
its database which makes a recovery a matter to telling it which file 
and how old. I normally setup for 60 to 90 days of retention. It won't 
be fast but it will be isolated from anything that fails on the rest of 
my net,



Wow!  I got Gene to consider my suggestion!  :-)


David




Re: How to use dmsetuup?

2023-11-05 Thread gene heskett

On 11/5/23 01:46, David Christensen wrote:

On 11/4/23 21:05, gene heskett wrote:

On 11/4/23 23:15, David Christensen wrote:

On 11/4/23 17:55, gene heskett wrote:
FWIW the rw's I have and that continue to work, are Sony DVD+RW, 
well over 5 years old now. I understand there is a DVD-RW but I've 
no experience with them.  Today my objection is the size. In 
comparison to a system driving 3d printers with gcode from Cura-5.4 
that is not rolled up into subroutine loops, I have some of the more 
complex and large parts part files that will not fit on a dvd. So it 
simply impractical for me to back up to a measly 4.7Gig dvd.


That's why they invented Blu-ray:

 https://en.wikipedia.org/wiki/Blu-ray

 25 GB (single-layer)
 50, 66 GB (dual-layer)
 100, 128 GB (BDXL)

Shudder. Anything mechanical can be destroyed by a smoke particle 100x 
to small to be seen with a good eye. I am a CET & Electronics in 
general I understand the physics of, and in electronics the only thing 
moving is a few electrons here or there. As long as the voltage does 
not force an electron thru the oxide layer that is the capacitors 
insulation, forming a leakage path that avalanches thru the oxide film 
and essentially destroys the device, there is no physical reason that 
it will not continue to do its jobs for hundreds or thousands of 
years. It will be external environmental effects that will eventually 
reach the chip and byproducts of the humidity let in by the breach of 
the package sealing that finally destroys it.


The size of a bit that is detectable on a disk is determined by the 
wavelegth of the light reading that bit, cd's were designed with the 
IR lasers of the day, which emmit light in the 1100 nanometer range. 
Far infrared IOW. DVD's were made possible with a shorter visible 
light laser, then blue rays got that down to abut 400 nanometers. The 
next gen of those will have a uv laser  but we'll have to invent it 
first. But part of that problem is that decent optical glass for the 
lenses does not pass UV to a usable amount. Plastic lets it blast on 
thru but can we make plastic lenses that precisely for the price 
bleeding edge users will pay? IDK.



Interesting tangent.


The point I was trying to make is that  proper disaster preparedness 
involves defenses in depth.  AFAIK your data and your backups are on the 
same computer and you have no other recent backups or archives.  If 
true, then, as you already know, the computer is a single point of 
failure that could destroy both data and backups.



And, now you are touching HBA's, touching drives, and issuing root 
commands that are in direct proximity to your data and backups.  As you 
already know, human error is the most common failure mode.  I am worried 
that you are going to make a mistake and suffer a data disaster (partial 
or total).  That is why I suggested that you give the Asus a rest and 
build a backup server now.  If you then trash the Asus, recovery will be 
possible.  A duplicate set of backups is wise in case something happens 
to the primary backups (notably, human error during recovery).



David

.
Amanda is now been able the use big disk storage for a couple decades, 
separate from the computers main drive. These disks then contain 
tarball, compressed if possible, that can be read on a rebuilt machine 
with a bare metal install for recovery.  One must be fam with how it 
works, and w/o its database but it can be done. I'm also into 3d 
printers, and that has made me fam with the arm64 sbc cards such as the 
bananapi-m5 which has 4 ub3 ports on a 2GHz 4 core cpu. Startech makes a 
usb3 to sata adapter that can do 500M/sec to an SSD. I am doing it on an 
rpi4b.  So I am tempted to build my own NAS by using all 4 of those 
ports to hook 4 of these 2T gigastones up as a 4G raid10. Run it 
headless by an ssh login, setup amanda server on it, setup amanda-client 
on the rest, setup amanda to do any compression on the clients which are 
fast enough to do it and let the pi handle the actual storage, including 
its database which makes a recovery a matter to telling it which file 
and how old. I normally setup for 60 to 90 days of retention. It won't 
be fast but it will be isolated from anything that fails on the rest of 
my net,


Fast is relative, running on an older mobo in this machines original 
incarnation, it backed up itself and 4 other machines on my local net in 
30 to 45 minute sessions everynight. Using a separate drive, but that 
drive, one of two 2T seagates went off line forever at about 6 weeks 
runtime, followed 3 days later by its twin which was the boot drive in 
this machine, leading to a 22 install disaster because the installer at 
the time was or still is busted.


Buster and bullseye both worked great, bookworm has been a disaster from 
the gitgo for me. I absolutely own every byte of /home/gene, but 
something is getting in the way that didn't for buster or bullseye, and 
I have a hard time believing I am 

Re: How to use dmsetuup?

2023-11-05 Thread Thomas Schmitt
Hi,

Gene Heskett wrote:
> > I have 3 100 disk spindles of dvd's bought years ago, that are
> > no longer recognized in any of the 4 or 5 dvd writers I have, but one box
> > of rewritables about the same age, stored n a light tight cardboard box,
> > will likely outlast me.

Unwritten write-once media can indeed get unusable when exposed to light
over a long time. But i have not heard of written DVD getting bad from
indirect light. (Direct sun light is deadly for many things.)


> > Lesson learnt, do not use optical media for long term storage unless
> > stored in tin boxes like AOL gave away billions of 20 years or more ago.

I have a little locker for my media stock. But a substantial number of
my written media are not completely protected from stray light.


David Christensen wrote:
> I have been burning archive DVD-R discs for ~14 years and storing them in a
> drawer (e.g. darkness).  I checked the oldest just now and it reads okay.

That's my experience too. I check by MD5 which are stored on the medium
together with the data. If a medium turns out unreadable then in nearly
all cases directly after burning.
Lesson learnt: Never overwrite the two youngest backups.


> I have heard of CD discs disintegrating if the lacquer is scratched:
> https://en.wikipedia.org/wiki/Disc_rot

This never hit me. But i keep my media away from high moisture, corroding
chemicals, and abrasive substances.


> I have heard that RW media has a shorter lifespan than R media.

Not to my experience. I have 4x CD-RW from 2002 (*), DVD+RW from 2004, and
BD-RE from 2008 which still work for backups. From time to time a medium
dies during writing. This seems not to be closely related to age, though.

(*) I have older 2x CD-RW, but no burner any more which would accept them.
They can be still read.


> Does anyone have experience with M-Disc media?

Only by reports of libburn users which say that M-Disc works like the
other media. Their durability can hardly be evaluated, given that normal
media seem to last for more than 2 decades without much problem.


I think the better alternative for archived data would be to make several
identical copies and to checkread them in intervals of a few years. As
soon as one of the copies shows problems, make new copies of the healthy
ones. Payload checksums on the medium give extra trust, although i only
once in my life watched a DVD giving bad data without an SCSI error.
That was reproducible with only a single drive. All others either read
the affected 32 KiB chunk correctly or threw error. Having more than one
drive helps a lot when the read quality is on the edge.

A sincere rescue effort would look like:

  xorriso -outdev /dev/sr0 \
  -check_media use=outdev \
   what=disc \
   time_limit=7200 \
   data_to="$HOME"/sr0.image \
   sector_map="$HOME"/sr0.sector_map \
   --

After 7200 seconds the attempt will end even if not finished.
If you want to abort earlier, do not press Ctrl+C but rather do
  touch /var/opt/xorriso/do_abort_check_media

The disc image will emerge as file "$HOME"/sr0.image .
The file "$HOME"/sr0.sector_map will record which blocks could be read
without SCSI error. If the run is repeated, then only the missing blocks
will be attempted to be read.
One may repeat with the same drive or better with different ones.
The file "$HOME"/sr0.image and "$HOME"/sr0.sector_map may be carried to
other computers to continue the rescue attempt with their drives.
If there are other partly damaged identical copies of the archive medium,
then one may use them too with the same sr0.image and sr0.sector_map
files.

If the image is an ISO 9660 filesystem made by xorriso with option
-for_backup and thus contains MD5s, then one may check the resulting
image by:

  xorriso -for_backup -indev "$HOME"/sr0.image -check_media --

Any protest would indicate that the rescue attempt was not successful.
If the direcory tree is undamaged, one may check the data files by

  xorriso -for_backup -indev "$HOME"/sr0.image -check_md5_r sorry / --

to get the paths of files with damaged content.

Other than with most rescue tools, the read operations of xorriso on an
optical drive will be done by direct SCSI commands, not by the Linux block
layer. This has the advantage that error messages are more specific than
just "i/o error" and that no inappropriate reading ahead will happen. Such
reading ahead causes the old TAO CD bug of Linux which gave birth to
interesting urban legends about a "fuzzy end" of data CDs.


Have a nice day :)

Thomas



Re: How to use dmsetuup?

2023-11-05 Thread David Christensen

On 11/4/23 21:05, gene heskett wrote:

On 11/4/23 23:15, David Christensen wrote:

On 11/4/23 17:55, gene heskett wrote:
FWIW the rw's I have and that continue to work, are Sony DVD+RW, well 
over 5 years old now. I understand there is a DVD-RW but I've no 
experience with them.  Today my objection is the size. In comparison 
to a system driving 3d printers with gcode from Cura-5.4 that is not 
rolled up into subroutine loops, I have some of the more complex and 
large parts part files that will not fit on a dvd. So it simply 
impractical for me to back up to a measly 4.7Gig dvd.


That's why they invented Blu-ray:

 https://en.wikipedia.org/wiki/Blu-ray

 25 GB (single-layer)
 50, 66 GB (dual-layer)
 100, 128 GB (BDXL)

Shudder. Anything mechanical can be destroyed by a smoke particle 100x 
to small to be seen with a good eye. I am a CET & Electronics in general 
I understand the physics of, and in electronics the only thing moving is 
a few electrons here or there. As long as the voltage does not force an 
electron thru the oxide layer that is the capacitors insulation, forming 
a leakage path that avalanches thru the oxide film and essentially 
destroys the device, there is no physical reason that it will not 
continue to do its jobs for hundreds or thousands of years. It will be 
external environmental effects that will eventually reach the chip and 
byproducts of the humidity let in by the breach of the package sealing 
that finally destroys it.


The size of a bit that is detectable on a disk is determined by the 
wavelegth of the light reading that bit, cd's were designed with the IR 
lasers of the day, which emmit light in the 1100 nanometer range. Far 
infrared IOW. DVD's were made possible with a shorter visible light 
laser, then blue rays got that down to abut 400 nanometers. The next gen 
of those will have a uv laser  but we'll have to invent it first. But 
part of that problem is that decent optical glass for the lenses does 
not pass UV to a usable amount. Plastic lets it blast on thru but can we 
make plastic lenses that precisely for the price bleeding edge users 
will pay? IDK.



Interesting tangent.


The point I was trying to make is that  proper disaster preparedness 
involves defenses in depth.  AFAIK your data and your backups are on the 
same computer and you have no other recent backups or archives.  If 
true, then, as you already know, the computer is a single point of 
failure that could destroy both data and backups.



And, now you are touching HBA's, touching drives, and issuing root 
commands that are in direct proximity to your data and backups.  As you 
already know, human error is the most common failure mode.  I am worried 
that you are going to make a mistake and suffer a data disaster (partial 
or total).  That is why I suggested that you give the Asus a rest and 
build a backup server now.  If you then trash the Asus, recovery will be 
possible.  A duplicate set of backups is wise in case something happens 
to the primary backups (notably, human error during recovery).



David



Re: How to use dmsetuup?

2023-11-04 Thread gene heskett

On 11/4/23 23:15, David Christensen wrote:

On 11/4/23 17:55, gene heskett wrote:

FWIW the rw's I have and that continue to work, are Sony DVD+RW, well 
over 5 years old now. I understand there is a DVD-RW but I've no 
experience with them.  Today my objection is the size. In comparison 
to a system driving 3d printers with gcode from Cura-5.4 that is not 
rolled up into subroutine loops, I have some of the more complex and 
large parts part files that will not fit on a dvd. So it simply 
impractical for me to back up to a measly 4.7Gig dvd.



That's why they invented Blu-ray:

     https://en.wikipedia.org/wiki/Blu-ray

     25 GB (single-layer)
     50, 66 GB (dual-layer)
     100, 128 GB (BDXL)
     (Up to four layers are possible in a standard form BD)


David

Shudder. Anything mechanical can be destroyed by a smoke particle 100x 
to small to be seen with a good eye. I am a CET & Electronics in general 
I understand the physics of, and in electronics the only thing moving is 
a few electrons here or there. As long as the voltage does not force an 
electron thru the oxide layer that is the capacitors insulation, forming 
a leakage path that avalanches thru the oxide film and essentially 
destroys the device, there is no physical reason that it will not 
continue to do its jobs for hundreds or thousands of years. It will be 
external environmental effects that will eventually reach the chip and 
byproducts of the humidity let in by the breach of the package sealing 
that finally destroys it.


The size of a bit that is detectable on a disk is determined by the 
wavelegth of the light reading that bit, cd's were designed with the IR 
lasers of the day, which emmit light in the 1100 nanometer range. Far 
infrared IOW. DVD's were made possible with a shorter visible light 
laser, then blue rays got that down to abut 400 nanometers. The next gen 
of those will have a uv laser  but we'll have to invent it first. But 
part of that problem is that decent optical glass for the lenses does 
not pass UV to a usable amount. Plastic lets it blast on thru but can we 
make plastic lenses that precisely for the price bleeding edge users 
will pay? IDK.

.


Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis



Re: How to use dmsetuup?

2023-11-04 Thread David Christensen

On 11/4/23 17:55, gene heskett wrote:

FWIW the rw's I have and that continue to work, are Sony DVD+RW, well 
over 5 years old now. I understand there is a DVD-RW but I've no 
experience with them.  Today my objection is the size. In comparison to 
a system driving 3d printers with gcode from Cura-5.4 that is not rolled 
up into subroutine loops, I have some of the more complex and large 
parts part files that will not fit on a dvd. So it simply impractical 
for me to back up to a measly 4.7Gig dvd.



That's why they invented Blu-ray:

https://en.wikipedia.org/wiki/Blu-ray

25 GB (single-layer)
50, 66 GB (dual-layer)
100, 128 GB (BDXL)
(Up to four layers are possible in a standard form BD)


David



Re: How to use dmsetuup?

2023-11-04 Thread gene heskett

On 11/4/23 19:39, David Christensen wrote:

On 11/4/23 15:26, gene heskett wrote:

On 11/4/23 17:38, David Christensen wrote:



In any case, burn your most valuable data to optical discs regularly.


Not great advice unless you lock the resultant dvd away from all room 
lighting. I have 3 100 disk spindles of dvd's bought years ago, that 
are no longer recognized in any of the 4 or 5 dvd writers I have, but 
one box of rewritables about the same age, stored n a light tight 
cardboard box, will likely outlast me.  Some of them have been wiped 
and reused several times. Those on a spindle, with a clear dust cover 
letting the light into the edges of the stack of disks??  Flaky in 5 
years, gone w/o a trace in 10, the drives don't see them at all. They 
do spin up for a minute trying, reseeking and re-reading but there is 
nothing readable to tell the drive what this disk needs in order to be 
written to, left in the disk starter track at the center of the disk.


Lesson learnt, do not use optical media for long term storage unless 
stored in tin boxes like AOL gave away billions of 20 years or more ago.



I have been burning archive DVD-R discs for ~14 years and storing them 
in a drawer (e.g. darkness).  I checked the oldest just now and it reads 
okay.



I have heard of CD discs disintegrating if the lacquer is scratched:

https://en.wikipedia.org/wiki/Disc_rot


I have heard that RW media has a shorter lifespan than R media.

FWIW the rw's I have and that continue to work, are Sony DVD+RW, well 
over 5 years old now. I understand there is a DVD-RW but I've no 
experience with them.  Today my objection is the size. In comparison to 
a system driving 3d printers with gcode from Cura-5.4 that is not rolled 
up into subroutine loops, I have some of the more complex and large 
parts part files that will not fit on a dvd. So it simply impractical 
for me to back up to a measly 4.7Gig dvd.


Does anyone have experience with M-Disc media?

https://en.wikipedia.org/wiki/M-DISC


David

.


Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis



Re: How to use dmsetuup?

2023-11-04 Thread yxcv

On Sat, 4 Nov 2023 16:39:03 -0700
 David Christensen  wrote:



Does anyone have experience with M-Disc media?

No. I trust a little bit more in RAID




Re: How to use dmsetuup?

2023-11-04 Thread David Christensen

On 11/4/23 15:26, gene heskett wrote:

On 11/4/23 17:38, David Christensen wrote:



In any case, burn your most valuable data to optical discs regularly.


Not great advice unless you lock the resultant dvd away from all room 
lighting. I have 3 100 disk spindles of dvd's bought years ago, that are 
no longer recognized in any of the 4 or 5 dvd writers I have, but one 
box of rewritables about the same age, stored n a light tight cardboard 
box, will likely outlast me.  Some of them have been wiped and reused 
several times. Those on a spindle, with a clear dust cover letting the 
light into the edges of the stack of disks??  Flaky in 5 years, gone w/o 
a trace in 10, the drives don't see them at all. They do spin up for a 
minute trying, reseeking and re-reading but there is nothing readable to 
tell the drive what this disk needs in order to be written to, left in 
the disk starter track at the center of the disk.


Lesson learnt, do not use optical media for long term storage unless 
stored in tin boxes like AOL gave away billions of 20 years or more ago.



I have been burning archive DVD-R discs for ~14 years and storing them 
in a drawer (e.g. darkness).  I checked the oldest just now and it reads 
okay.



I have heard of CD discs disintegrating if the lacquer is scratched:

https://en.wikipedia.org/wiki/Disc_rot


I have heard that RW media has a shorter lifespan than R media.


Does anyone have experience with M-Disc media?

https://en.wikipedia.org/wiki/M-DISC


David



Re: How to use dmsetuup?

2023-11-04 Thread gene heskett

On 11/4/23 17:38, David Christensen wrote:

On 11/4/23 04:46, gene heskett wrote:


... my only previous experience with logical volumes 20 years ago
cost me dearly in terms of lost, irreplaceable data, like the only
pictures of my first wife ...



On 11/4/23 05:22, gene heskett wrote:


On 11/4/23 05:39, Andy Smith wrote:
Maybe it is time to just buy a "black box" NAS device and make all 
this someone else's problem in return for money. It's not the way I

go, but you have had a lot of trouble getting your own mdraid to work.


Good advice maybe, Andy Smith, thank you, but that puts it all at the
mercy of a $5 cable.  Not exactly my cup of tea.  Since I'm into 
designing stuff in OpenSCAD, 3d printing the output, made into gcode
 with Cura, and none of the common tools for making gcode to drive the 
printers, or the printers own firmware, has learned how to roll up the 
code into repetitive loops, instead generating step by step printer 
instructions, so even the simplest part is half a gig of g-code. So 
the data is growing like a cancer. Really complex parts might be 50 
gigs of g-code and takes the printer a week or more to make.


G-code, properly written is like a .pdf, its the best compression we
 have. I write it by hand for linuxcnc and have one 90 LOC file that
 takes the machine 3 days to run. Remove the comments and it fits on 
one side of one sheet of paper.



On 11/4/23 10:20, gene heskett wrote:

I've found I could temporarily unload the 6 port on the mobo 
controller down to 1, the boot disk containing everything but home, 
which would give me enough ports to build another raid10 if I can 
conjure up enough sata power plugs, which I have some spares of
molex to sata splitters. Or does pvcreate automatically null the 
formatting. I have enough of the 2T gigastones to do that, but will 
that then fix my lack of instant raid access? That would leave me with 
a blank home I could then copy to the new raid10 which would give me a 
raid10 twice as big as now.


To complicate that, I also have a wd 2T NVMe that has never been 
plugged in but I'm understanding that is not a mod, but a whole new 
install, and another 22 installs disaster before it works this well, 
unless the installer now has some manners or I unplug all usb stuff 
except the keyboard/mouse buttons. that possibly reduces the sata 
count because it would become the boot drive. I can do the usb cleanup 
long enough to do the install now that I know about it. Probably 
should download and burn the latest netinstall image first though.

Perhaps my constant mewling about the broken installer has done some

good? Like asking me yes/no do I want brltty and cura or whatever
the hell it is that yells out every keypress from any speakers it
can find and locking up the machine for the duration of the yell
just because it surveyed the usb stuff and found a usb-serial
adapter connected to a cm11a X10 controller so it ASSUMES I'm blind
and installs that stuff w/o asking me. IDK. I don't want to get into
that situation ever again because if you nuke brltty and cura so you
can work in peace, the sob won't reboot, grub gets stuck looking for
them and won't proceed with the boot, forcing yet another
re-install. Finally, may even have been you, someone told me to
unplug the usb stuff FIRST, rebooting problem solved.  Sorry, but
this gets me started on a rant about a broken installer.

I have 5 of those 2T drives. And another narrow PCIe sata card with 
all 16 ports populated. That may serve as the foundation storage so

I can restart amanda and have some backups. A 2T raid10 for /home
out of 4 of them would satisfy the storage needs for a while, maybe
even for the rest of my time here. And an expandable linear lvm for
amanda would be a treat. If its dependable. A maintenance PITA if
not.

WDYT?



Trying to do too much with too little equipment is a recipe for 
disaster.  Been there, done that, lost data.



My computing life became more reliable and less stressful when I bought 
additional computers, additional drives, and mobile racks:


https://www.startech.com/en-us/hdd/drw150satbk

https://www.startech.com/en-us/hdd/hsb220sat25b

https://www.startech.com/en-us/hdd/s25slotr


I suggest that you give the Asus a rest, buy or build another computer, 
install one small SSD (and mobile rack), install Debian, install one 
very large HDD (with mobile rack), install Amanda, and back up 
everything over the network.  Once that is working, buy another HDD 
(with mobile rack), either swap HDD's or duplicate the first HDD to the 
second HDD, store one HDD off-site, and repeat monthly.



In any case, burn your most valuable data to optical discs regularly.


Not great advice unless you lock the resultant dvd away from all room 
lighting. I have 3 100 disk spindles of dvd's bought years ago, that are 
no longer recognized in any of the 4 or 5 dvd writers I have, but one 
box of rewritables about the same age, stored n a light tight cardboard 
box, will 

Re: How to use dmsetuup?

2023-11-04 Thread gene heskett

On 11/4/23 09:45, to...@tuxteam.de wrote:

On Sat, Nov 04, 2023 at 07:46:09AM -0400, gene heskett wrote:

[...]


I'v got to the above point but the first example that looked good created a
100% allocated, no free space "homevol"
So I used gparted to delete the partitions & reformat them to ext4 again,
pvcreated them again an vgcreateded it again, getting:


Sorry, Gene -- I fear you have it backwards. The LVM stuff happens *below*
the file system: you first add physical volumes (PV) to a volume group
(think a "pool"). From that you "cut out" logical volumes (LV), which
are just bunches of blocks which show themselves to the OS as "block
devices" (/dev/mapper/foo, typically).

On top of that you can put a file system (as you can on any "bunch of blocks",
i.e. a block device or file).

Perhaps having a mental model the docs make more sense.

Cheers


Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis



Re: How to use dmsetuup?

2023-11-04 Thread David Christensen

On 11/4/23 04:46, gene heskett wrote:


... my only previous experience with logical volumes 20 years ago
cost me dearly in terms of lost, irreplaceable data, like the only
pictures of my first wife ...



On 11/4/23 05:22, gene heskett wrote:


On 11/4/23 05:39, Andy Smith wrote:
Maybe it is time to just buy a "black box" NAS device and make all 
this someone else's problem in return for money. It's not the way I
go, but you have had a lot of trouble getting your own mdraid to 
work.


Good advice maybe, Andy Smith, thank you, but that puts it all at the
mercy of a $5 cable.  Not exactly my cup of tea.  Since I'm into 
designing stuff in OpenSCAD, 3d printing the output, made into gcode
 with Cura, and none of the common tools for making gcode to drive 
the printers, or the printers own firmware, has learned how to roll 
up the code into repetitive loops, instead generating step by step 
printer instructions, so even the simplest part is half a gig of 
g-code. So the data is growing like a cancer. Really complex parts 
might be 50 gigs of g-code and takes the printer a week or more to 
make.


G-code, properly written is like a .pdf, its the best compression we
 have. I write it by hand for linuxcnc and have one 90 LOC file that
 takes the machine 3 days to run. Remove the comments and it fits on 
one side of one sheet of paper.



On 11/4/23 10:20, gene heskett wrote:

I've found I could temporarily unload the 6 port on the mobo 
controller down to 1, the boot disk containing everything but home, 
which would give me enough ports to build another raid10 if I can 
conjure up enough sata power plugs, which I have some spares of
molex to sata splitters. Or does pvcreate automatically null the 
formatting. I have enough of the 2T gigastones to do that, but will 
that then fix my lack of instant raid access? That would leave me 
with a blank home I could then copy to the new raid10 which would 
give me a raid10 twice as big as now.


To complicate that, I also have a wd 2T NVMe that has never been 
plugged in but I'm understanding that is not a mod, but a whole new 
install, and another 22 installs disaster before it works this well, 
unless the installer now has some manners or I unplug all usb stuff 
except the keyboard/mouse buttons. that possibly reduces the sata 
count because it would become the boot drive. I can do the usb 
cleanup long enough to do the install now that I know about it. 
Probably should download and burn the latest netinstall image first 
though.
Perhaps my constant mewling about the broken installer has done 
some

good? Like asking me yes/no do I want brltty and cura or whatever
the hell it is that yells out every keypress from any speakers it
can find and locking up the machine for the duration of the yell
just because it surveyed the usb stuff and found a usb-serial
adapter connected to a cm11a X10 controller so it ASSUMES I'm blind
and installs that stuff w/o asking me. IDK. I don't want to get into
that situation ever again because if you nuke brltty and cura so you
can work in peace, the sob won't reboot, grub gets stuck looking for
them and won't proceed with the boot, forcing yet another
re-install. Finally, may even have been you, someone told me to
unplug the usb stuff FIRST, rebooting problem solved.  Sorry, but
this gets me started on a rant about a broken installer.

I have 5 of those 2T drives. And another narrow PCIe sata card with 
all 16 ports populated. That may serve as the foundation storage so

I can restart amanda and have some backups. A 2T raid10 for /home
out of 4 of them would satisfy the storage needs for a while, maybe
even for the rest of my time here. And an expandable linear lvm for
amanda would be a treat. If its dependable. A maintenance PITA if
not.

WDYT?



Trying to do too much with too little equipment is a recipe for 
disaster.  Been there, done that, lost data.



My computing life became more reliable and less stressful when I bought 
additional computers, additional drives, and mobile racks:


https://www.startech.com/en-us/hdd/drw150satbk

https://www.startech.com/en-us/hdd/hsb220sat25b

https://www.startech.com/en-us/hdd/s25slotr


I suggest that you give the Asus a rest, buy or build another computer, 
install one small SSD (and mobile rack), install Debian, install one 
very large HDD (with mobile rack), install Amanda, and back up 
everything over the network.  Once that is working, buy another HDD 
(with mobile rack), either swap HDD's or duplicate the first HDD to the 
second HDD, store one HDD off-site, and repeat monthly.



In any case, burn your most valuable data to optical discs regularly.


David



Re: How to use dmsetuup?

2023-11-04 Thread debian-user
to...@tuxteam.de wrote:
> On Sat, Nov 04, 2023 at 01:20:08PM -0400, gene heskett wrote:
> 
> [...]
> 
> > Indeed it does clarify the mechanics. thank you. Now do I have to
> > zero them first before I can then create (pvcreate) them,  
> 
> Not necessarily. Unless, of course, there are sensitive data on them.
> 
> The process would go roughly:

I agree with what Tomas has said, but I would add a step before
creating the PVs.

# partition your devices
I usually put a small partition at the start of the disk and
another small one at the end (these are protection against some
kind of errors that can occur - you just leave them blank) and then
create a single large partition using the rest of the space on the
device for use by LVM.

There doesn't seem much point in having more than one LVM partition
on a device to me (as suggested below)?

>   # put the necessary PV metadata on your raw devices
>   pvcreate /dev/foo1 /dev/foo2 ...
> 
>   # make them to a volume group named my-volgroup
>   vgcreate my-volgroup /dev/foo1 /dev/foo2 ...
> 
>   # cut out a logical volume from that, named my-logvol
>   lvcreate --name my-logvol my-volgroup
> 
>   # put a file system on that logical volume
>   mkfs.ext4 /dev/mapper/my-logvol
> 
>   # mount it
>   mount /dev/mapper/my-logvol /home
> 
> Now convince your boot setup to add the logical vols
> and mount them (this somehow involves fstab).
> 
> Perhaps this [1] page is enlightening (just disregard the
> talk about vagrant(. I'm not yet quite sure you really
> want this, but hey. Learning new tricks is what keeps one
> happy.
> 
> In my case I actually have a volume group (spanning a single
> physical device), but the use case is different: the physical
> device is encrypted (laptops get lost) and I wanted to have
> several partitions on it (and still move space from the one
> to the other in a pinch).
> 
> Cheers & enjoy
> 
> [1] https://linuxhandbook.com/lvm-guide/



Re: How to use dmsetuup?

2023-11-04 Thread tomas
On Sat, Nov 04, 2023 at 01:20:08PM -0400, gene heskett wrote:

[...]

> Indeed it does clarify the mechanics. thank you. Now do I have to zero them
> first before I can then create (pvcreate) them,

Not necessarily. Unless, of course, there are sensitive data on them.

The process would go roughly:

  # put the necessary PV metadata on your raw devices
  pvcreate /dev/foo1 /dev/foo2 ...

  # make them to a volume group named my-volgroup
  vgcreate my-volgroup /dev/foo1 /dev/foo2 ...

  # cut out a logical volume from that, named my-logvol
  lvcreate --name my-logvol my-volgroup

  # put a file system on that logical volume
  mkfs.ext4 /dev/mapper/my-logvol

  # mount it
  mount /dev/mapper/my-logvol /home

Now convince your boot setup to add the logical vols
and mount them (this somehow involves fstab).

Perhaps this [1] page is enlightening (just disregard the
talk about vagrant(. I'm not yet quite sure you really
want this, but hey. Learning new tricks is what keeps one
happy.

In my case I actually have a volume group (spanning a single
physical device), but the use case is different: the physical
device is encrypted (laptops get lost) and I wanted to have
several partitions on it (and still move space from the one
to the other in a pinch).

Cheers & enjoy

[1] https://linuxhandbook.com/lvm-guide/
-- 
tomás


signature.asc
Description: PGP signature


Re: How to use dmsetuup?

2023-11-04 Thread gene heskett

On 11/4/23 09:45, to...@tuxteam.de wrote:

On Sat, Nov 04, 2023 at 07:46:09AM -0400, gene heskett wrote:

[...]


I'v got to the above point but the first example that looked good created a
100% allocated, no free space "homevol"
So I used gparted to delete the partitions & reformat them to ext4 again,
pvcreated them again an vgcreateded it again, getting:


Sorry, Gene -- I fear you have it backwards. The LVM stuff happens *below*
the file system: you first add physical volumes (PV) to a volume group
(think a "pool"). From that you "cut out" logical volumes (LV), which
are just bunches of blocks which show themselves to the OS as "block
devices" (/dev/mapper/foo, typically).

On top of that you can put a file system (as you can on any "bunch of blocks",
i.e. a block device or file).

Perhaps having a mental model the docs make more sense.

Indeed it does clarify the mechanics. thank you. Now do I have to zero 
them first before I can then create (pvcreate) them, vgcreate 
HomeVolGroup (case is important) list of /dev/ices, or can I skip the 
zeroing? I've found I could temporarily unload the 6 port on the mobo 
controller down to 1, the boot disk containing everything but home, 
which would give me enough ports to build another raid10 if I can 
conjure up enough sata power plugs, which I have some spares of molex to 
sata splitters. Or does pvcreate automatically null the formatting. I 
have enough of the 2T gigastones to do that, but will that then fix my 
lack of instant raid access? That would leave me with a blank home I 
could then copy to the new raid10 which would give me a raid10 twice as 
big as now.


To complicate that, I also have a wd 2T NVMe that has never been plugged 
in but I'm understanding that is not a mod, but a whole new install, and 
another 22 installs disaster before it works this well, unless the 
installer now has some manners or I unplug all usb stuff except the 
keyboard/mouse buttons. that possibly reduces the sata count because it 
would become the boot drive. I can do the usb cleanup long enough to do 
the install now that I know about it. Probably should download and burn 
the latest netinstall image first though.


Perhaps my constant mewling about the broken installer has done some 
good? Like asking me yes/no do I want brltty and cura or whatever the 
hell it is that yells out every keypress from any speakers it can find 
and locking up the machine for the duration of the yell just because it 
surveyed the usb stuff and found a usb-serial adapter connected to a 
cm11a X10 controller so it ASSUMES I'm blind and installs that stuff w/o 
asking me. IDK. I don't want to get into that situation ever again 
because if you nuke brltty and cura so you can work in peace, the sob 
won't reboot, grub gets stuck looking for them and won't proceed with 
the boot, forcing yet another re-install. Finally, may even have been 
you, someone told me to unplug the usb stuff FIRST, rebooting problem 
solved.  Sorry, but this gets me started on a rant about a broken installer.


I have 5 of those 2T drives. And another narrow PCIe sata card with all 
16 ports populated. That may serve as the foundation storage so I can 
restart amanda and have some backups. A 2T raid10 for /home out of 4 of 
them would satisfy the storage needs for a while, maybe even for the 
rest of my time here. And an expandable linear lvm for amanda would be a 
treat. If its dependable. A maintenance PITA if not.


WDYT?


Cheers


Thank you Tomas, take care & stay well.

Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis



Re: How to use dmsetuup?

2023-11-04 Thread tomas
On Sat, Nov 04, 2023 at 07:46:09AM -0400, gene heskett wrote:

[...]

> I'v got to the above point but the first example that looked good created a
> 100% allocated, no free space "homevol"
> So I used gparted to delete the partitions & reformat them to ext4 again,
> pvcreated them again an vgcreateded it again, getting:

Sorry, Gene -- I fear you have it backwards. The LVM stuff happens *below*
the file system: you first add physical volumes (PV) to a volume group
(think a "pool"). From that you "cut out" logical volumes (LV), which
are just bunches of blocks which show themselves to the OS as "block
devices" (/dev/mapper/foo, typically).

On top of that you can put a file system (as you can on any "bunch of blocks",
i.e. a block device or file).

Perhaps having a mental model the docs make more sense.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: How to use dmsetuup?

2023-11-04 Thread gene heskett

On 11/4/23 05:39, Andy Smith wrote:

Hi Gene,

On Fri, Nov 03, 2023 at 12:27:19PM -0400, gene heskett wrote:

Thanks for help with dmsetup.


dmsetup is very much the wrong approach for you - it's too
low-level.

LVM alone is probably not the best idea either. For your use case as
I understand it, mdraid in RAID1 or RAID10 is probably the best
solution.

I regret I am not able to assist you with the problems you have with
your existing RAID10. Changing it for just LVM, or trying to do it
"by hand" with dmsetup are likely to be mistakes however.

I'm afraid I have to agree. I've easily gotten to the last example Andy 
Cater gave me, but these red hat sourced man pages are full of very 
copious examples while being totally opaque as to what the examples do. 
And that led to my creating a 3.7T lvm that had no free space. Wash 
rinse, repeat. Frustration is too mild a word.



Maybe it is time to just buy a "black box" NAS device and make all
this someone else's problem in return for money. It's not the way I
go, but you have had a lot of trouble getting your own mdraid to
work.


Good advice maybe, Andy Smith, thank you, but that puts it all at the 
mercy of a $5 cable.  Not exactly my cup of tea.  Since I'm into 
designing stuff in OpenSCAD, 3d printing the output, made into gcode 
with Cura, and none of the common tools for making gcode to drive the 
printers, or the printers own firmware, has learned how to roll up the 
code into repetitive loops, instead generating step by step printer 
instructions, so even the simplest part is half a gig of g-code. So the 
data is growing like a cancer. Really complex parts might be 50 gigs of 
g-code and takes the printer a week or more to make.


G-code, properly written is like a .pdf, its the best compression we 
have. I write it by hand for linuxcnc and have one 90 LOC file that 
takes the machine 3 days to run. Remove the comments and it fits on one 
side of one sheet of paper.


Take care & stay well, Andy.

Thanks,
Andy



Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis



Re: How to use dmsetuup?

2023-11-04 Thread gene heskett

On 11/3/23 18:14, Andrew M.A. Cater wrote:

On Fri, Nov 03, 2023 at 12:27:19PM -0400, gene heskett wrote:

Greetings all;
As usual, the man page may as well be written in swahili. The NDE syndrome,
meaning No D-d Examples.

I have those 2 2T SSD's with a gpt partition table on both, allocated as
sdc1 and sdk1, formatted to ext4, named and labeled as lvm1 and lvm2.
Temp mounted as sdc1 and sdk1 to /mnt/lvm1 and /mnt/lvm2



How big is your /home - is it bigger than 2T?

Do you need both drives to provide redundant storage - or is it just
a temporary storage place for /home while you get the rest of the RAID
devices sorted out?

If I were you, I wouldn't start from here :)

Don't mount them as individual drives.

pvcreate to initialise each physical drive as a drive reserved for lvm

pvcreate /dev/sdc1
pvcreate /dev/sdk1

vgcreate to create a logical volume

vgcreate HomeVolgroup /dev/sdc1 /dev/sdk1

Then use lvcreate to create the logical volume itself.
I'v got to the above point but the first example that looked good 
created a 100% allocated, no free space "homevol"

So I used gparted to delete the partitions & reformat them to ext4 again,
pvcreated them again an vgcreateded it again, getting:
gene@coyote:~$ sudo vgs -v
  VG   Attr   Ext   #PV #LV #SN VSize  VFree  VG UUID 
 VProfile
  HomeVolGroup wz--n- 4.00m   2   0   0 <3.73t <3.73t 
tdHtLW-95wJ-rLk5-fTiS-ILfV-kRD7-xqkClP

But now 2 puzzles:

1, there is zero explanation in the vgs man page telling me what this 
is. What does the < tell  me?, and I don't see a break between VG and 
UUID, word wrapped here by tbird, is that whole string of gibberish the 
VG's UUID?


2, the lvcreate man page doesn't appear to have a way to specify using 
the whole max capacity of the empty but formatted to ext4 pair of 
drives, the extremely copious example list doesn't seem to address that 
condition.


3a, what would the cmd to mount it to /mnt/lvm2 so rsync can copy /home 
to it look like?


3b, what would the line in fstab that mounts it look like?


See also https://wiki.archlinux.org/title/LVM
Which also assumes an innate familiarity with all this that I don't have 
any experience with since this screwed me up and drove me out of the 
redhat camp 2 decades ago, I was tired of being the always sick and 
dying lab rat for redhat.



Use lvm to do this: that's *exactly* what it's designed for - to allow you
to add volumes and extend disk sizes.

This is exactly how partman does it when you install. (In fact, you could do
this quite well by rebooting to recovery and using that method to reformat
the drives).


How do I create a single managed volume of labels lvm1 and lvm2 of these to
make a single volume that I can then rsynch /home to it, then switch fstab


See above:

All the very best, as ever,

Andy
[amaca...@debian.org]


Sorry to need so much hand holding Andy, but my only previous experience 
with logical volumes 20 years ago cost me dearly in terms of lost, 
irreplaceable data, like the only pictures of my first wife who had a 
stroke and died in '68 after 10 glorious years and 3 children.  Who have 
also now passed. A man doesn't normally outlast his git.


Thank you Andy

Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis



Re: How to use dmsetuup?

2023-11-04 Thread Andy Smith
Hi Gene,

On Fri, Nov 03, 2023 at 12:27:19PM -0400, gene heskett wrote:
> Thanks for help with dmsetup.

dmsetup is very much the wrong approach for you - it's too
low-level.

LVM alone is probably not the best idea either. For your use case as
I understand it, mdraid in RAID1 or RAID10 is probably the best
solution.

I regret I am not able to assist you with the problems you have with
your existing RAID10. Changing it for just LVM, or trying to do it
"by hand" with dmsetup are likely to be mistakes however.

Maybe it is time to just buy a "black box" NAS device and make all
this someone else's problem in return for money. It's not the way I
go, but you have had a lot of trouble getting your own mdraid to
work.

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



Re: How to use dmsetuup?

2023-11-03 Thread David Christensen

On 11/3/23 16:55, gene heskett wrote:

On 11/3/23 17:41, David Christensen wrote:

On 11/3/23 09:27, gene heskett wrote:

Greetings all;
As usual, the man page may as well be written in swahili. The NDE 
syndrome, meaning No D-d Examples.


I have those 2 2T SSD's with a gpt partition table on both, allocated 
as sdc1 and sdk1, formatted to ext4, named and labeled as lvm1 and lvm2.

Temp mounted as sdc1 and sdk1 to /mnt/lvm1 and /mnt/lvm2

How do I create a single managed volume of labels lvm1 and lvm2 of 
these to make a single volume that I can then rsynch /home to it, 
then switch fstab to mount it as /home on a reboot?


If it works, I'll kill the raid10, reformat it and make it another 
lvm for amanda to use.


I am determined to remove the raid10 /home from the list of suspects 
causing my system lockups anytime a program such as OpenSCAD or 
digiKam, even firefox wants to write a new file to my /home 
partition.  This delay does not lockup the whole shebang, already 
open files in other workspaces seem to run at normal speeds, but 
opening a simple gui file requester to get where to put the file, and 
possibly rename it, takes anywhere from 30 seconds minimum to around 
5 minutes just to draw the requester on screen. And while you are 
waiting, wondering if you even pressed the mouse button, there is 
ZERO acknowledgement the button has been pushed.  The mouse can be 
moved normally, but until the requester is fully drawn on screen, no 
other button clicks are registered.


This software raid10 worked perfectly for buster and bullseye, but 
its been nothing but a headache on bookworm.  And only one has tried 
to help, suggesting strace, but its output is so copious it overflows 
the 32G of main memory in this machine so I can't go back to the 
actual programs start with the trace. I have used it in the past, 
decade or more back up the log, and while it was noisy then, this is 
unusable.




Not LVM, but FWIW I previously had my data on 2 @ 1.5 TB HDD md RAID1 
LUKS ext4 on Debian 9:




Thank you David, printed for study, but looks like it still uses mdadm 
which I wanted to avoid in order to make the test isolation complete.



Okay.  But, I very much doubt that Linux md is the problem.


Given the various posts, my best guess is that there is a software 
problem with Bookworm, the version of openscad on Bookworm, etc., and/or 
some misconfiguration of your system.  It might be worthwhile to put an 
ext4 file system onto one of the new 2 TB SSD's, mount it for testing, 
copy a file onto the 2 TB file system, configure your app(s) to put 
temporary files there, and test.  That would let you know if your /home 
RAID10 is a problem.



David



Re: How to use dmsetuup?

2023-11-03 Thread gene heskett

On 11/3/23 18:14, Andrew M.A. Cater wrote:

On Fri, Nov 03, 2023 at 12:27:19PM -0400, gene heskett wrote:

Greetings all;
As usual, the man page may as well be written in swahili. The NDE syndrome,
meaning No D-d Examples.

I have those 2 2T SSD's with a gpt partition table on both, allocated as
sdc1 and sdk1, formatted to ext4, named and labeled as lvm1 and lvm2.
Temp mounted as sdc1 and sdk1 to /mnt/lvm1 and /mnt/lvm2



How big is your /home - is it bigger than 2T?

ATM its 20% of 1.8T


Do you need both drives to provide redundant storage - or is it just
a temporary storage place for /home while you get the rest of the RAID
devices sorted out?

If I were you, I wouldn't start from here :)

Don't mount them as individual drives.

Don't intend to in the final config.


pvcreate to initialise each physical drive as a drive reserved for lvm

pvcreate /dev/sdc1
pvcreate /dev/sdk1

vgcreate to create a logical volume

vgcreate HomeVolgroup /dev/sdc1 /dev/sdk1

Then use lvcreate to create the logical volume itself.

This looks a lot closer to what I had in mind, Andy, I'll unmount them 
when I have both eyes open at the same time tomorrow and give it a shot.



See also https://wiki.archlinux.org/title/LVM

Use lvm to do this: that's *exactly* what it's designed for - to allow you
to add volumes and extend disk sizes.

This is exactly how partman does it when you install. (In fact, you could do
this quite well by rebooting to recovery and using that method to reformat
the drives).


How do I create a single managed volume of labels lvm1 and lvm2 of these to
make a single volume that I can then rsynch /home to it, then switch fstab


See above:

All the very best, as ever,

Andy
[amaca...@debian.org]


Thank you Andy.


to mount it as /home on a reboot?

If it works, I'll kill the raid10, reformat it and make it another lvm for
amanda to use.

I am determined to remove the raid10 /home from the list of suspects causing
my system lockups anytime a program such as OpenSCAD or digiKam, even
firefox wants to write a new file to my /home partition.  This delay does
not lockup the whole shebang, already open files in other workspaces seem to
run at normal speeds, but opening a simple gui file requester to get where
to put the file, and possibly rename it, takes anywhere from 30 seconds
minimum to around 5 minutes just to draw the requester on screen. And while
you are waiting, wondering if you even pressed the mouse button, there is
ZERO acknowledgement the button has been pushed.  The mouse can be moved
normally, but until the requester is fully drawn on screen, no other button
clicks are registered.

This software raid10 worked perfectly for buster and bullseye, but its been
nothing but a headache on bookworm.  And only one has tried to help,
suggesting strace, but its output is so copious it overflows the 32G of main
memory in this machine so I can't go back to the actual programs start with
the trace. I have used it in the past, decade or more back up the log, and
while it was noisy then, this is unusable.

Thanks for help with dmsetup.

Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
  soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
  - Louis D. Brandeis



.


Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis



Re: How to use dmsetuup?

2023-11-03 Thread gene heskett

On 11/3/23 17:41, David Christensen wrote:

On 11/3/23 09:27, gene heskett wrote:

Greetings all;
As usual, the man page may as well be written in swahili. The NDE 
syndrome, meaning No D-d Examples.


I have those 2 2T SSD's with a gpt partition table on both, allocated 
as sdc1 and sdk1, formatted to ext4, named and labeled as lvm1 and lvm2.

Temp mounted as sdc1 and sdk1 to /mnt/lvm1 and /mnt/lvm2

How do I create a single managed volume of labels lvm1 and lvm2 of 
these to make a single volume that I can then rsynch /home to it, then 
switch fstab to mount it as /home on a reboot?


If it works, I'll kill the raid10, reformat it and make it another lvm 
for amanda to use.


I am determined to remove the raid10 /home from the list of suspects 
causing my system lockups anytime a program such as OpenSCAD or 
digiKam, even firefox wants to write a new file to my /home 
partition.  This delay does not lockup the whole shebang, already open 
files in other workspaces seem to run at normal speeds, but opening a 
simple gui file requester to get where to put the file, and possibly 
rename it, takes anywhere from 30 seconds minimum to around 5 minutes 
just to draw the requester on screen. And while you are waiting, 
wondering if you even pressed the mouse button, there is ZERO 
acknowledgement the button has been pushed.  The mouse can be moved 
normally, but until the requester is fully drawn on screen, no other 
button clicks are registered.


This software raid10 worked perfectly for buster and bullseye, but its 
been nothing but a headache on bookworm.  And only one has tried to 
help, suggesting strace, but its output is so copious it overflows the 
32G of main memory in this machine so I can't go back to the actual 
programs start with the trace. I have used it in the past, decade or 
more back up the log, and while it was noisy then, this is unusable.


Thanks for help with dmsetup.

Cheers, Gene Heskett.



Not LVM, but FWIW I previously had my data on 2 @ 1.5 TB HDD md RAID1 
LUKS ext4 on Debian 9:


October 22, 2017

1.  Install StarTech HBA and Seagate 1.5 TB drives:

2.  Set up mdadm RAID1:

 https://raid.wiki.kernel.org/index.php/RAID_setup

 2017-10-22 22:40:19 root@po ~
 # dd if=/dev/zero of=/dev/sdb count=2048
 2048+0 records in
 2048+0 records out
 1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0689901 s, 15.2 MB/s

 2017-10-22 22:46:16 root@po ~
 # dd if=/dev/zero of=/dev/sdc count=2048
 2048+0 records in
 2048+0 records out
 1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0501681 s, 20.9 MB/s

 2017-10-22 22:55:48 root@po ~
 # mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=2 
/dev/disk/by-id/ata-ST31500341AS_redacted1 
/dev/disk/by-id/ata-ST31500341AS_redacted2

 mdadm: Note: this array has metadata at the start and
     may not be suitable as a boot device.  If you plan to
     store '/boot' on this device please ensure that
     your boot-loader understands md/v1.x metadata, or use
     --metadata=0.90
 mdadm: size set to 1465007488K
 mdadm: automatically enabling write-intent bitmap on large array
 Continue creating array? yes
 mdadm: Defaulting to version 1.2 metadata
 mdadm: array /dev/md0 started.

 2017-10-22 22:57:29 root@po ~
 # mdadm --detail --scan
 ARRAY /dev/md0 metadata=1.2 name=po:0 
UUID=2fb7086d:ccedcd0c:b5c286e2:3eb96d45


 2017-10-22 23:00:37 root@po ~
 # mdadm --detail --scan >> /etc/mdadm/mdadm.conf

 2017-10-22 23:06:45 root@po ~
 # ll /dev/md0
 brw-rw 1 root disk 9, 0 2017/10/22 22:56:59 /dev/md0

 2017-10-22 23:06:48 root@po ~
 # cryptsetup luksFormat /dev/md0

 WARNING!
 
 This will overwrite data on /dev/md0 irrevocably.

 Are you sure? (Type uppercase yes): YES
 Enter passphrase:
 Verify passphrase:

 2017-10-22 23:08:09 root@po ~
 # vi /etc/crypttab

     md0_crypt    /dev/md0    none    luks

 2017-10-22 23:09:19 root@po ~
 # cryptdisks_start md0_crypt
 [] Starting crypto disk...[info] md0_crypt (starting)...
 Please unlock disk /dev/md0 (md0_crypt):  
 [ ok rypt (started)...done.


 2017-10-22 23:14:45 root@po ~
 # mkfs.ext4 -L mirror -v /dev/mapper/md0_crypt
 mke2fs 1.43.4 (31-Jan-2017)
 fs_types for mke2fs.conf resolution: 'ext4'
 Filesystem label=mirror
 OS type: Linux
 Block size=4096 (log=2)
 Fragment size=4096 (log=2)
 Stride=0 blocks, Stripe width=0 blocks
 91570176 inodes, 366251360 blocks
 18312568 blocks (5.00%) reserved for the super user
 First data block=0
 Maximum filesystem blocks=2514485248
 11178 block groups
 32768 blocks per group, 32768 fragments per group
 8192 inodes per group
 Filesystem UUID: d9054ef2-a68d-40fd-a63c-0dbef2d27455
 Superblock backups stored on blocks:
     32768, 98304, 163840, 229376, 294912, 819200, 884736, 

Re: How to use dmsetuup?

2023-11-03 Thread Andrew M.A. Cater
On Fri, Nov 03, 2023 at 12:27:19PM -0400, gene heskett wrote:
> Greetings all;
> As usual, the man page may as well be written in swahili. The NDE syndrome,
> meaning No D-d Examples.
> 
> I have those 2 2T SSD's with a gpt partition table on both, allocated as
> sdc1 and sdk1, formatted to ext4, named and labeled as lvm1 and lvm2.
> Temp mounted as sdc1 and sdk1 to /mnt/lvm1 and /mnt/lvm2
> 

How big is your /home - is it bigger than 2T? 

Do you need both drives to provide redundant storage - or is it just 
a temporary storage place for /home while you get the rest of the RAID
devices sorted out?

If I were you, I wouldn't start from here :)

Don't mount them as individual drives.

pvcreate to initialise each physical drive as a drive reserved for lvm

pvcreate /dev/sdc1
pvcreate /dev/sdk1

vgcreate to create a logical volume

vgcreate HomeVolgroup /dev/sdc1 /dev/sdk1

Then use lvcreate to create the logical volume itself.

See also https://wiki.archlinux.org/title/LVM

Use lvm to do this: that's *exactly* what it's designed for - to allow you
to add volumes and extend disk sizes.

This is exactly how partman does it when you install. (In fact, you could do 
this quite well by rebooting to recovery and using that method to reformat 
the drives).

> How do I create a single managed volume of labels lvm1 and lvm2 of these to
> make a single volume that I can then rsynch /home to it, then switch fstab

See above: 

All the very best, as ever,

Andy
[amaca...@debian.org]

> to mount it as /home on a reboot?
> 
> If it works, I'll kill the raid10, reformat it and make it another lvm for
> amanda to use.
> 
> I am determined to remove the raid10 /home from the list of suspects causing
> my system lockups anytime a program such as OpenSCAD or digiKam, even
> firefox wants to write a new file to my /home partition.  This delay does
> not lockup the whole shebang, already open files in other workspaces seem to
> run at normal speeds, but opening a simple gui file requester to get where
> to put the file, and possibly rename it, takes anywhere from 30 seconds
> minimum to around 5 minutes just to draw the requester on screen. And while
> you are waiting, wondering if you even pressed the mouse button, there is
> ZERO acknowledgement the button has been pushed.  The mouse can be moved
> normally, but until the requester is fully drawn on screen, no other button
> clicks are registered.
> 
> This software raid10 worked perfectly for buster and bullseye, but its been
> nothing but a headache on bookworm.  And only one has tried to help,
> suggesting strace, but its output is so copious it overflows the 32G of main
> memory in this machine so I can't go back to the actual programs start with
> the trace. I have used it in the past, decade or more back up the log, and
> while it was noisy then, this is unusable.
> 
> Thanks for help with dmsetup.
> 
> Cheers, Gene Heskett.
> -- 
> "There are four boxes to be used in defense of liberty:
>  soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author, 1940)
> If we desire respect for the law, we must first make the law respectable.
>  - Louis D. Brandeis
> 



Re: How to use dmsetuup?

2023-11-03 Thread David Christensen

On 11/3/23 09:27, gene heskett wrote:

Greetings all;
As usual, the man page may as well be written in swahili. The NDE 
syndrome, meaning No D-d Examples.


I have those 2 2T SSD's with a gpt partition table on both, allocated as 
sdc1 and sdk1, formatted to ext4, named and labeled as lvm1 and lvm2.

Temp mounted as sdc1 and sdk1 to /mnt/lvm1 and /mnt/lvm2

How do I create a single managed volume of labels lvm1 and lvm2 of these 
to make a single volume that I can then rsynch /home to it, then switch 
fstab to mount it as /home on a reboot?


If it works, I'll kill the raid10, reformat it and make it another lvm 
for amanda to use.


I am determined to remove the raid10 /home from the list of suspects 
causing my system lockups anytime a program such as OpenSCAD or digiKam, 
even firefox wants to write a new file to my /home partition.  This 
delay does not lockup the whole shebang, already open files in other 
workspaces seem to run at normal speeds, but opening a simple gui file 
requester to get where to put the file, and possibly rename it, takes 
anywhere from 30 seconds minimum to around 5 minutes just to draw the 
requester on screen. And while you are waiting, wondering if you even 
pressed the mouse button, there is ZERO acknowledgement the button has 
been pushed.  The mouse can be moved normally, but until the requester 
is fully drawn on screen, no other button clicks are registered.


This software raid10 worked perfectly for buster and bullseye, but its 
been nothing but a headache on bookworm.  And only one has tried to 
help, suggesting strace, but its output is so copious it overflows the 
32G of main memory in this machine so I can't go back to the actual 
programs start with the trace. I have used it in the past, decade or 
more back up the log, and while it was noisy then, this is unusable.


Thanks for help with dmsetup.

Cheers, Gene Heskett.



Not LVM, but FWIW I previously had my data on 2 @ 1.5 TB HDD md RAID1 
LUKS ext4 on Debian 9:


October 22, 2017

1.  Install StarTech HBA and Seagate 1.5 TB drives:

2.  Set up mdadm RAID1:

https://raid.wiki.kernel.org/index.php/RAID_setup

2017-10-22 22:40:19 root@po ~
# dd if=/dev/zero of=/dev/sdb count=2048
2048+0 records in
2048+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0689901 s, 15.2 MB/s

2017-10-22 22:46:16 root@po ~
# dd if=/dev/zero of=/dev/sdc count=2048
2048+0 records in
2048+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0501681 s, 20.9 MB/s

2017-10-22 22:55:48 root@po ~
	# mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=2 
/dev/disk/by-id/ata-ST31500341AS_redacted1 
/dev/disk/by-id/ata-ST31500341AS_redacted2

mdadm: Note: this array has metadata at the start and
may not be suitable as a boot device.  If you plan to
store '/boot' on this device please ensure that
your boot-loader understands md/v1.x metadata, or use
--metadata=0.90
mdadm: size set to 1465007488K
mdadm: automatically enabling write-intent bitmap on large array
Continue creating array? yes
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md0 started.

2017-10-22 22:57:29 root@po ~
# mdadm --detail --scan
	ARRAY /dev/md0 metadata=1.2 name=po:0 
UUID=2fb7086d:ccedcd0c:b5c286e2:3eb96d45


2017-10-22 23:00:37 root@po ~
# mdadm --detail --scan >> /etc/mdadm/mdadm.conf

2017-10-22 23:06:45 root@po ~
# ll /dev/md0
brw-rw 1 root disk 9, 0 2017/10/22 22:56:59 /dev/md0

2017-10-22 23:06:48 root@po ~
# cryptsetup luksFormat /dev/md0

WARNING!

This will overwrite data on /dev/md0 irrevocably.

Are you sure? (Type uppercase yes): YES
Enter passphrase:
Verify passphrase:

2017-10-22 23:08:09 root@po ~
# vi /etc/crypttab

md0_crypt   /dev/md0none
luks

2017-10-22 23:09:19 root@po ~
# cryptdisks_start md0_crypt
[] Starting crypto disk...[info] md0_crypt (starting)...
Please unlock disk /dev/md0 (md0_crypt):  
[ ok rypt (started)...done.


2017-10-22 23:14:45 root@po ~
# mkfs.ext4 -L mirror -v /dev/mapper/md0_crypt
mke2fs 1.43.4 (31-Jan-2017)
fs_types for mke2fs.conf resolution: 'ext4'
Filesystem label=mirror
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
91570176 inodes, 366251360 blocks
18312568 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2514485248
11178 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group

Re: How to use dmsetuup?

2023-11-03 Thread Stefan Monnier
gene heskett [2023-11-03 12:27:19] wrote:
> Greetings all;
> As usual, the man page may as well be written in swahili. The NDE syndrome,
> meaning No D-d Examples.

I don't think `dmsetup` is what you need anyway.

> I have those 2 2T SSD's with a gpt partition table on both, allocated as
> sdc1 and sdk1, formatted to ext4, named and labeled as lvm1 and lvm2.
> Temp mounted as sdc1 and sdk1 to /mnt/lvm1 and /mnt/lvm2
>
> How do I create a single managed volume of labels lvm1 and lvm2 of these to
> make a single volume that I can then rsynch /home to it, then switch fstab
> to mount it as /home on a reboot?

I found the following doc to be accessible:

 
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/logical_volume_manager_administration/raid_volumes

of course, your mileage may vary: I was already familiar with LVM.

> I am determined to remove the raid10 /home from the list of suspects
> causing my system lockups anytime a program such as OpenSCAD or
> digiKam, even firefox wants to write a new file to my /home partition.

Hmm... not sure adding LVM into the mix will help :-)
Maybe try and replace /home with a non RAID copy of it.

> nothing but a headache on bookworm.  And only one has tried to help,
> suggesting strace, but its output is so copious it overflows the 32G
> of main memory in this machine so I can't go back to the actual
> programs start with

You don't want `strace` to trace each and every syscall, instead you
want to filter out the irrelevant ones.  I'd start with `strace -e
trace=file', but the manpage includes many more knobs to play with.


Stefan



Re: How to use dmsetuup?

2023-11-03 Thread gene heskett

On 11/3/23 12:27, gene heskett wrote:

Greetings all;
As usual, the man page may as well be written in swahili. The NDE 
syndrome, meaning No D-d Examples.


I have those 2 2T SSD's with a gpt partition table on both, allocated as 
sdc1 and sdk1, formatted to ext4, named and labeled as lvm1 and lvm2.

Temp mounted as sdc1 and sdk1 to /mnt/lvm1 and /mnt/lvm2

How do I create a single managed volume of labels lvm1 and lvm2 of these 
to make a single volume that I can then rsynch /home to it, then switch 
fstab to mount it as /home on a reboot?


If it works, I'll kill the raid10, reformat it and make it another lvm 
for amanda to use.


I am determined to remove the raid10 /home from the list of suspects 
causing my system lockups anytime a program such as OpenSCAD or digiKam, 
even firefox wants to write a new file to my /home partition.  This 
delay does not lockup the whole shebang, already open files in other 
workspaces seem to run at normal speeds, but opening a simple gui file 
requester to get where to put the file, and possibly rename it, takes 
anywhere from 30 seconds minimum to around 5 minutes just to draw the 
requester on screen. And while you are waiting, wondering if you even 
pressed the mouse button, there is ZERO acknowledgement the button has 
been pushed.  The mouse can be moved normally, but until the requester 
is fully drawn on screen, no other button clicks are registered.


Miss-statement correction, s/b no other mouse clicks are registered to 
the app, workspaces can be switched and the requester is drawn on 
whatever workspace is then active when it is finally drawn.


This software raid10 worked perfectly for buster and bullseye, but its 
been nothing but a headache on bookworm.  And only one has tried to 
help, suggesting strace, but its output is so copious it overflows the 
32G of main memory in this machine so I can't go back to the actual 
programs start with the trace. I have used it in the past, decade or 
more back up the log, and while it was noisy then, this is unusable.


Thanks for help with dmsetup.

Cheers, Gene Heskett.


Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis



How to use dmsetuup?

2023-11-03 Thread gene heskett

Greetings all;
As usual, the man page may as well be written in swahili. The NDE 
syndrome, meaning No D-d Examples.


I have those 2 2T SSD's with a gpt partition table on both, allocated as 
sdc1 and sdk1, formatted to ext4, named and labeled as lvm1 and lvm2.

Temp mounted as sdc1 and sdk1 to /mnt/lvm1 and /mnt/lvm2

How do I create a single managed volume of labels lvm1 and lvm2 of these 
to make a single volume that I can then rsynch /home to it, then switch 
fstab to mount it as /home on a reboot?


If it works, I'll kill the raid10, reformat it and make it another lvm 
for amanda to use.


I am determined to remove the raid10 /home from the list of suspects 
causing my system lockups anytime a program such as OpenSCAD or digiKam, 
even firefox wants to write a new file to my /home partition.  This 
delay does not lockup the whole shebang, already open files in other 
workspaces seem to run at normal speeds, but opening a simple gui file 
requester to get where to put the file, and possibly rename it, takes 
anywhere from 30 seconds minimum to around 5 minutes just to draw the 
requester on screen. And while you are waiting, wondering if you even 
pressed the mouse button, there is ZERO acknowledgement the button has 
been pushed.  The mouse can be moved normally, but until the requester 
is fully drawn on screen, no other button clicks are registered.


This software raid10 worked perfectly for buster and bullseye, but its 
been nothing but a headache on bookworm.  And only one has tried to 
help, suggesting strace, but its output is so copious it overflows the 
32G of main memory in this machine so I can't go back to the actual 
programs start with the trace. I have used it in the past, decade or 
more back up the log, and while it was noisy then, this is unusable.


Thanks for help with dmsetup.

Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis