Re: To partition or not to partition MD arrays (Was Re: smartctl cannotaccess my storage, need syntax help)

2024-01-19 Thread Franco Martelli

On 19/01/24 at 20:14, Nicolas George wrote:

Franco Martelli (12024-01-19):

One case against using partitions on mdraid: if your array gets messed
up, you get to recreate those partition tables yourself and that's just
hilarious if you don't have a backup. Happened to a friend of mine,
reason was a UPS brownout.

How can I get a backup of mdadm RAID partition?


You do not need a backup of the RAID partitions, that would be terribly
inefficient. You need a backup of the partition table.


Yes, I agree of course. I was asking this to Anssi because it looks like 
strange to me to have the backup of the partitions, as he pointed (for 
my understanding)




Which, if you are organized, you already have in
$notes_dir/$hostname/install.md as something that looks like this:

```
sudo sfdisk /dev/sdX <

The partitions table of my HDD is part of my backup.

Cheers,

--
Franco Martelli



Re: To partition or not to partition MD arrays (Was Re: smartctl cannotaccess my storage, need syntax help)

2024-01-19 Thread Nicolas George
Franco Martelli (12024-01-19):
> > One case against using partitions on mdraid: if your array gets messed
> > up, you get to recreate those partition tables yourself and that's just
> > hilarious if you don't have a backup. Happened to a friend of mine,
> > reason was a UPS brownout.
> How can I get a backup of mdadm RAID partition?

You do not need a backup of the RAID partitions, that would be terribly
inefficient. You need a backup of the partition table.

Which, if you are organized, you already have in
$notes_dir/$hostname/install.md as something that looks like this:

```
sudo sfdisk /dev/sdX <

signature.asc
Description: PGP signature


Re: To partition or not to partition MD arrays (Was Re: smartctl cannotaccess my storage, need syntax help)

2024-01-19 Thread Franco Martelli

On 19/01/24 at 09:03, Anssi Saari wrote:

One case against using partitions on mdraid: if your array gets messed
up, you get to recreate those partition tables yourself and that's just
hilarious if you don't have a backup. Happened to a friend of mine,
reason was a UPS brownout.


How can I get a backup of mdadm RAID partition? And which tool to backup 
the whole disks of an array? The only tool that it comes in mind it is 
"dd" that it isn't a viable solution for me.
I think is useless to backup the raw data stored in a partition or the 
whole disk. I backup files and directories stored in the filesystem not 
raw data. If an error occurs in the RAID, mdadm takes care to warn me 
via email... I hope!



I think he scanned his disks for copies of
the superblock but didn't find any and then somehow with a lot of hassle
eventually figured out what the partition tables were.

So in a catastrophe, partition tables are one more obstacle to cross
before you can start actually recovering your data.


Me too ran into a catastrophe scenario, I had lost /dev/md0, the reason 
was using hibernate (suspend to disk) in a logical volume placed inside 
the RAID. I think it was damaged the RAID metadata.
I got rid of this using Debian-installer, I thought that I had loosed 
everything and I prepared for reinstall, when Debian-installer asked me 
to create the new RAID I specify all the four partitions, I saved, and 
magically the logical device and all my logical volumes, embedded in the 
old RAID, reappeared. To partition was not a trouble in those circumstances.




My only mdraid was on raw partitions but that never had any issues. I
think zfs effectively does the same, no partitions.


Which raw partitions? Maybe did you mean without partitions? I never 
used zfs it's full featured, I prefer to keep the things simple: RAID -> 
LVM -> ext4


Cheers,
--
Franco Martelli



Re: To partition or not to partition MD arrays (Was Re: smartctl cannotaccess my storage, need syntax help)

2024-01-18 Thread Andy Smith
Hi,

On Thu, Jan 18, 2024 at 10:28:30AM -0600, Nicholas Geovanis wrote:
> Sounds like this group has finally achieved a long overdue consensus. How
> many times since LVM was ready for root/boot volumes have I been told that
> using partitions was necessary good practice. Even had that in job
> interviews, where half the team would grin at me saying it and the other
> half scowling at my "poor practice".
> 
> Now we know it was just personal preference all along. Like somebody said
> :-)

Look, if you're going to resolve this thread so quickly all it means
is that someone is going to have to mention home.arpa or their time
zone setting again. We have strict quotas here for the amount of
circular repeating "you don't do things like me therefore you are
wrong and here are a selection of Internet standards to back me up"
threads that must be taking place at once.

😀

Thanks,
Andy

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



Re: To partition or not to partition MD arrays (Was Re: smartctl cannotaccess my storage, need syntax help)

2024-01-18 Thread Nicholas Geovanis
On Wed, Jan 17, 2024, 9:35 PM gene heskett  wrote:

> On 1/17/24 19:54, Steve McIntyre wrote:
> > Andy Smith wrote:
> ...
> >> Then there will just be people going by taste.
> >>
> >> Personally I still put them directly on drives. If I ever get taken
> >> out by one of those crappy motherboards, I reserve the right to get
> >> a different religion. 😀
> >
> > I'm clearly a member of a third group of people,,, :-)
> >
> > Putting partitions on the RAID drives helps *me* identify them.
> >
> you aren't alone Steve.
> Cheers, Gene Heskett.
>

Sounds like this group has finally achieved a long overdue consensus. How
many times since LVM was ready for root/boot volumes have I been told that
using partitions was necessary good practice. Even had that in job
interviews, where half the team would grin at me saying it and the other
half scowling at my "poor practice".

Now we know it was just personal preference all along. Like somebody said
:-)

>


Re: To partition or not to partition MD arrays (Was Re: smartctl cannotaccess my storage, need syntax help)

2024-01-17 Thread gene heskett

On 1/17/24 19:54, Steve McIntyre wrote:

Andy Smith wrote:


The newer set of people recommending partitions are mostly doing so
because there's been a few incidents of "helpful" PC motherboards
detecting on boot what they think is a corrupt GPT, and replacing it
with a blank one, damaging the RAID. This is a real thing that has
happened to more than one person; it even got linked on Hacker News
I believe.

Then there will just be people going by taste.

Personally I still put them directly on drives. If I ever get taken
out by one of those crappy motherboards, I reserve the right to get
a different religion. 😀


I'm clearly a member of a third group of people,,, :-)

Putting partitions on the RAID drives helps *me* identify them.


you aren't alone Steve.
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