Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #242052 > unrolled thread
| Started by | Gene Heskett <gheskett@shentel.net> |
|---|---|
| First post | 2021-11-12 14:10 +0100 |
| Last post | 2021-11-12 16:10 +0100 |
| Articles | 20 on this page of 65 — 10 participants |
Back to article view | Back to linux.debian.user
Where do I find the definitive man page for mdadm? Gene Heskett <gheskett@shentel.net> - 2021-11-12 14:10 +0100
Re: Where do I find the definitive man page for mdadm? Dan Ritter <dsr@randomstring.org> - 2021-11-12 15:10 +0100
Re: Where do I find the definitive man page for mdadm? Gene Heskett <gheskett@shentel.net> - 2021-11-12 15:30 +0100
Re: Where do I find the definitive man page for mdadm? Gene Heskett <gheskett@shentel.net> - 2021-11-12 15:50 +0100
Re: Where do I find the definitive man page for mdadm? Dan Ritter <dsr@randomstring.org> - 2021-11-12 16:40 +0100
Re: Where do I find the definitive man page for mdadm? Gene Heskett <gheskett@shentel.net> - 2021-11-12 17:50 +0100
Re: Where do I find the definitive man page for mdadm? The Wanderer <wanderer@fastmail.fm> - 2021-11-12 17:50 +0100
Re: Where do I find the definitive man page for mdadm? Gene Heskett <gheskett@shentel.net> - 2021-11-12 18:20 +0100
Re: Where do I find the definitive man page for mdadm? Andy Smith <andy@strugglers.net> - 2021-11-13 13:40 +0100
Re: Where do I find the definitive man page for mdadm? Gene Heskett <gheskett@shentel.net> - 2021-11-13 14:10 +0100
Re: Where do I find the definitive man page for mdadm? Gene Heskett <gheskett@shentel.net> - 2021-11-13 14:40 +0100
Re: Where do I find the definitive man page for mdadm? Andy Smith <andy@strugglers.net> - 2021-11-13 15:00 +0100
Re: Where do I find the definitive man page for mdadm? Gene Heskett <gheskett@shentel.net> - 2021-11-13 15:30 +0100
Re: Where do I find the definitive man page for mdadm? Andy Smith <andy@strugglers.net> - 2021-11-13 16:00 +0100
Re: Where do I find the definitive man page for mdadm? David Wright <deblis@lionunicorn.co.uk> - 2021-11-13 17:40 +0100
Re: Where do I find the definitive man page for mdadm? Gene Heskett <gheskett@shentel.net> - 2021-11-13 19:20 +0100
Re: Where do I find the definitive man page for mdadm? Andy Smith <andy@strugglers.net> - 2021-11-13 21:50 +0100
Re: Where do I find the definitive man page for mdadm? Gene Heskett <gheskett@shentel.net> - 2021-11-13 23:00 +0100
Re: Where do I find the definitive man page for mdadm? Charles Curley <charlescurley@charlescurley.com> - 2021-11-14 00:10 +0100
Re: Where do I find the definitive man page for mdadm? Greg Wooledge <greg@wooledge.org> - 2021-11-14 00:40 +0100
Re: Where do I find the definitive man page for mdadm? Gene Heskett <gheskett@shentel.net> - 2021-11-14 01:30 +0100
Re: Where do I find the definitive man page for mdadm? Andy Smith <andy@strugglers.net> - 2021-11-14 09:10 +0100
Re: Where do I find the definitive man page for mdadm? David Wright <deblis@lionunicorn.co.uk> - 2021-11-14 18:00 +0100
Re: Where do I find the definitive man page for mdadm? "Thomas Schmitt" <scdbackup@gmx.net> - 2021-11-14 19:40 +0100
Re: Where do I find the definitive man page for mdadm? David Wright <deblis@lionunicorn.co.uk> - 2021-11-15 02:40 +0100
Re: Where do I find the definitive man page for mdadm? "Thomas Schmitt" <scdbackup@gmx.net> - 2021-11-15 09:10 +0100
Re: Where do I find the definitive man page for mdadm? David Wright <deblis@lionunicorn.co.uk> - 2021-11-16 05:30 +0100
Re: Where do I find the definitive man page for mdadm? Tom Dial <tddial@comcast.net> - 2021-11-14 05:00 +0100
Re: Where do I find the definitive man page for mdadm? Greg Wooledge <greg@wooledge.org> - 2021-11-14 05:10 +0100
Re: Where do I find the definitive man page for mdadm? Gene Heskett <gheskett@shentel.net> - 2021-11-14 05:40 +0100
Re: Where do I find the definitive man page for mdadm? Charles Curley <charlescurley@charlescurley.com> - 2021-11-12 18:10 +0100
Re: Where do I find the definitive man page for mdadm? Charles Curley <charlescurley@charlescurley.com> - 2021-11-12 19:00 +0100
Re: Where do I find the definitive man page for mdadm? "Andrew M.A. Cater" <amacater@einval.com> - 2021-11-12 18:10 +0100
Re: Where do I find the definitive man page for mdadm? Gene Heskett <gheskett@shentel.net> - 2021-11-12 20:10 +0100
Re: Where do I find the definitive man page for mdadm? Dan Ritter <dsr@randomstring.org> - 2021-11-12 21:40 +0100
Re: Where do I find the definitive man page for mdadm? Gene Heskett <gheskett@shentel.net> - 2021-11-12 23:00 +0100
Re: Where do I find the definitive man page for mdadm? The Wanderer <wanderer@fastmail.fm> - 2021-11-12 23:10 +0100
Re: Where do I find the definitive man page for mdadm? Gene Heskett <gheskett@shentel.net> - 2021-11-13 01:00 +0100
Re: Where do I find the definitive man page for mdadm? Gene Heskett <gheskett@shentel.net> - 2021-11-12 22:30 +0100
Re: Where do I find the definitive man page for mdadm? Dan Ritter <dsr@randomstring.org> - 2021-11-13 12:30 +0100
Re: Where do I find the definitive man page for mdadm? Gene Heskett <gheskett@shentel.net> - 2021-11-13 13:30 +0100
Re: Where do I find the definitive man page for mdadm? The Wanderer <wanderer@fastmail.fm> - 2021-11-13 13:50 +0100
Re: Where do I find the definitive man page for mdadm? Gene Heskett <gheskett@shentel.net> - 2021-11-13 15:00 +0100
Re: Where do I find the definitive man page for mdadm? David Wright <deblis@lionunicorn.co.uk> - 2021-11-13 17:50 +0100
Re: Where do I find the definitive man page for mdadm? Gene Heskett <gheskett@shentel.net> - 2021-11-13 19:40 +0100
Re: Where do I find the definitive man page for mdadm? Charles Curley <charlescurley@charlescurley.com> - 2021-11-12 15:10 +0100
Re: Where do I find the definitive man page for mdadm? Gene Heskett <gheskett@shentel.net> - 2021-11-12 15:30 +0100
Re: Where do I find the definitive man page for mdadm? Andy Smith <andy@strugglers.net> - 2021-11-12 16:40 +0100
Re: Where do I find the definitive man page for mdadm? Gene Heskett <gheskett@shentel.net> - 2021-11-12 18:10 +0100
Re: Where do I find the definitive man page for mdadm? Charles Curley <charlescurley@charlescurley.com> - 2021-11-12 19:20 +0100
Re: Where do I find the definitive man page for mdadm? Gene Heskett <gheskett@shentel.net> - 2021-11-12 20:20 +0100
Re: Where do I find the definitive man page for mdadm? Charles Curley <charlescurley@charlescurley.com> - 2021-11-13 00:10 +0100
Re: Where do I find the definitive man page for mdadm? Andy Smith <andy@strugglers.net> - 2021-11-13 12:40 +0100
Re: Where do I find the definitive man page for mdadm? Dan Ritter <dsr@randomstring.org> - 2021-11-12 18:20 +0100
Re: Where do I find the definitive man page for mdadm? Gene Heskett <gheskett@shentel.net> - 2021-11-12 19:50 +0100
Re: Where do I find the definitive man page for mdadm? Charles Curley <charlescurley@charlescurley.com> - 2021-11-12 23:50 +0100
Re: Where do I find the definitive man page for mdadm? Gene Heskett <gheskett@shentel.net> - 2021-11-13 01:10 +0100
Re: Where do I find the definitive man page for mdadm? Andy Smith <andy@strugglers.net> - 2021-11-13 12:50 +0100
Re: Where do I find the definitive man page for mdadm? Charles Curley <charlescurley@charlescurley.com> - 2021-11-12 17:50 +0100
Re: Where do I find the definitive man page for mdadm? Gene Heskett <gheskett@shentel.net> - 2021-11-12 18:10 +0100
Re: Where do I find the definitive man page for mdadm? Charles Curley <charlescurley@charlescurley.com> - 2021-11-12 19:00 +0100
Re: Where do I find the definitive man page for mdadm? Gene Heskett <gheskett@shentel.net> - 2021-11-12 20:30 +0100
Re: Where do I find the definitive man page for mdadm? Charles Curley <charlescurley@charlescurley.com> - 2021-11-13 00:20 +0100
Re: Where do I find the definitive man page for mdadm? David Wright <deblis@lionunicorn.co.uk> - 2021-11-12 15:30 +0100
Re: Where do I find the definitive man page for mdadm? Gene Heskett <gheskett@shentel.net> - 2021-11-12 16:10 +0100
Page 3 of 4 — ← Prev page 1 2 [3] 4 Next page →
| From | Gene Heskett <gheskett@shentel.net> |
|---|---|
| Date | 2021-11-13 13:30 +0100 |
| Message-ID | <Dj0kq-22l-3@gated-at.bofh.it> |
| In reply to | #242117 |
On Saturday 13 November 2021 06:02:35 Dan Ritter wrote: > Gene Heskett wrote: > > On Friday 12 November 2021 08:49:21 Dan Ritter wrote: > > > > Ok, zeroed them, nuked mdadm.conf & rebooted. > > gparted each one, setting 2 partitions in GPT format on each of > > 900000 MIB (sde1) with label MDV1 and 5000 MIB (sde2) labeled MDV2 > > and applied that to each of the 4 drives. Double check as /dev/sdf > > somehow swapped positions on the drive, fixed that: Wash rinse and > > repeat for sdf, sdg, and sdh with labels of MDX1, MDX2, MDY1, MDY2 > > and MDZ1 and MDZ2. And of course gparted makes a file system when > > Apply is clicked. > > > > but: > > root@coyote:~$ > > mdadm -C /dev/md0 --level=10 --raid-devices=4 /dev/sde1 /dev/sdf1 > > /dev/sdg1 /dev/sdh1 mdadm: /dev/sde1 appears to contain an ext2fs > > file system > > size=921600000K mtime=Wed Dec 31 19:00:00 1969 > > mdadm: /dev/sdf1 appears to contain an ext2fs file system > > size=921600000K mtime=Wed Dec 31 19:00:00 1969 > > mdadm: /dev/sdg1 appears to contain an ext2fs file system > > size=921600000K mtime=Wed Dec 31 19:00:00 1969 > > mdadm: /dev/sdh1 appears to contain an ext2fs file system > > size=921600000K mtime=Wed Dec 31 19:00:00 1969 > > Continue creating array? yes > > You should stop there and run wipefs. I note from later mail in > this thread that you didn't; and then you had to reboot. > > With the array not started, or stopped, run wipefs on each of > the partitions. My mdadm manpage does not show the -S command. Scanniing it again to make sure, probably for about the 10th time and I finally found it but many megabytes of relatively unimportant drivel down from the top, IMO the manpage is missleading as such an important option ought to be shown on the first screenfull. So wipefs failed. dd doesn't care so zeroed the first 1000 blocks of each drive, nuke mdadm.conf then rebooted, gparted was then able to reconfigure the drives. But then mdadm wouldn't accept because gparted had formatted them, not to mention miss-labeled them, so yet another reboot, and keep rebooting unil somebody, Wanderer I believe, told me about "mdadm -S /dev/ice" command. Turns out I had to use fdisk to create a GPT partition table, one at +900G and one at +30G on each drive without formatting, then reboot again after nukeing mdadm.conf for the 9th or so time, at which point I was able to create a raid10 using sde1,sdf1,sfg1,and sdh1 as md0, and an md1 as sde2,sdf2,sdg2 and sdh2, and then format them both to ext4. > Then these -C commands should work well without warnings, and > creating a filesystem on the /dev/mdX devices will proceed > without warnings or errors. Yes, finally, but the mdadm man page and its poor formatting were far more hindrance than help. Experienced people here are to be thanked, and I do, but not that disastrous man page. > > There are a few unallocated blocks at the ends of all drives. > > gparted chose alignment and prespace in MiB. Do I need to add a 3rd > > partition to use them up? All drives seem to be identical sizewise > > but the pages recommend identical partition sizes. Theoreticly I > > could expand the smaller partition to use it up. > > I would not bother. > > -dsr- Thanks Dan. And everyone else who came to my rescue in this long thread. Nearly everyone was Cc: ing me, but I'm subscribed, close to a decade, maybe more. So I have duplicates to clean up. NBD. 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 Genes Web page <http://geneslinuxbox.net:6309/gene>
[toc] | [prev] | [next] | [standalone]
| From | The Wanderer <wanderer@fastmail.fm> |
|---|---|
| Date | 2021-11-13 13:50 +0100 |
| Message-ID | <Dj0DL-28Z-1@gated-at.bofh.it> |
| In reply to | #242120 |
[Multipart message — attachments visible in raw view] — view raw
On 2021-11-13 at 07:26, Gene Heskett wrote:
> On Saturday 13 November 2021 06:02:35 Dan Ritter wrote:
>
>> Gene Heskett wrote:
>> You should stop there and run wipefs. I note from later mail in
>> this thread that you didn't; and then you had to reboot.
>>
>> With the array not started, or stopped, run wipefs on each of
>> the partitions.
>
> My mdadm manpage does not show the -S command. Scanniing it again to make
> sure, probably for about the 10th time and I finally found it but many
> megabytes of relatively unimportant drivel down from the top,
You keep citing this ("many megabytes"), but it doesn't sound right to
me.
$ lh /usr/share/man/man8/mdadm.8.gz
-rw-r--r-- 1 root root 33K Sep 26 00:57 /usr/share/man/man8/mdadm.8.gz
On my computer, the mdadm man page (which you say includes things that
aren't in yours, so must be bigger) is only 33K when compressed, and
more like 100K when uncompressed ('zcat /path/to/mdadm.8.gz | wc -c').
What version of mdadm do you have installed? In particular, what does
$ apt-cache policy mdadm
say?
Have you tried a Web search for 'man mdadm'? On my computer (using
Google), the very first hit from that is
https://linux.die.net/man/8/mdadm and looks substantially the same as
what I have on disk; there are also other hits which look to also
present the contents of the man page.
If your local copy is really so lacking, you might find it useful to
search these Web-based versions instead, rather than asking on the
mailing list and having us search our local copies and share excerpts.
> IMO the manpage is missleading as such an important option ought to
> be shown on the first screenfull.
There are *lots* of important options, depending on exactly what you're
doing. They can't all be presented up-front. The man page presents them
organized by type, and has a useful EXAMPLES section; by convention,
that section is near the end.
I'll agree that it isn't always easy to find the right options and the
right syntax to construct a usable command for what one wants to do,
with this structure and layout - but the EXAMPLES section is often
helpful in circumventing that, and I haven't managed to come up with an
alternative structure that would actually be better (and still be
coherent).
With any lengthy man page, there are really only two useful ways to use
it, in my experience: A: read the whole damn thing through
cover-to-cover until you find what you're after, or B: try various
search terms, exhaustively, until you find something relevant. The
latter is what I usually do with mdadm, when necessary.
> So wipefs failed.
>
> dd doesn't care so zeroed the first 1000 blocks of each drive, nuke
> mdadm.conf then rebooted, gparted was then able to reconfigure the
> drives. But then mdadm wouldn't accept because gparted had formatted
> them,
I don't usually use gparted, but by the name I'd expect it to be just a
GUI wrapper around parted, and in my experince with parted it doesn't
format a newly-created partition unless you tell it to.
> not to mention miss-labeled them, so yet another reboot, and keep
> rebooting unil somebody, Wanderer I believe, told me about "mdadm -S
> /dev/ice" command.
Actually, I didn't mention '-S' (except in passing, as part of an
excerpt from the man page), or at least didn't intend to; I mentioned
'--stop', which is synonymous, but is also easier to meaningfully search
for. (And is how I found the excerpt, by searching the man page for
'--stop'.)
I also didn't mention the "specifying a device" syntax, although I think
the man page does imply that. I cited an example which uses '--stop --scan'.
>> Then these -C commands should work well without warnings, and
>> creating a filesystem on the /dev/mdX devices will proceed without
>> warnings or errors.
>
> Yes, finally, but the mdadm man page and its poor formatting were far
> more hindrance than help. Experienced people here are to be thanked,
> and I do, but not that disastrous man page.
Please stop slamming the mdadm man page. It's certainly not perfect, but
it's not nearly as bad as you're making it out to be.
--
The Wanderer
The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man. -- George Bernard Shaw
[toc] | [prev] | [next] | [standalone]
| From | Gene Heskett <gheskett@shentel.net> |
|---|---|
| Date | 2021-11-13 15:00 +0100 |
| Message-ID | <Dj1Jv-2Kw-1@gated-at.bofh.it> |
| In reply to | #242122 |
On Saturday 13 November 2021 07:42:40 The Wanderer wrote:
> apt-cache policy mdadm
mdadm:
Installed: 3.4-4+b1
Candidate: 3.4-4+b1
Version table:
*** 3.4-4+b1 500
500 http://deb.debian.org/debian stretch/main amd64 Packages
100 /var/lib/dpkg/status
I have another 1T SSD coming, and will remove sda and replace it as sda
for a new debian 11.1 install, then put it back on an sdd cable to get
my data back, so now I'm waiting for that drive to arrive. I'm tired of
the new spinning rust and their volatile errors that go with SMR drives.
They'd make good target practice for my new 6.5 creedmoor barrel.
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
Genes Web page <http://geneslinuxbox.net:6309/gene>
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2021-11-13 17:50 +0100 |
| Message-ID | <Dj4o1-4pX-3@gated-at.bofh.it> |
| In reply to | #242120 |
On Sat 13 Nov 2021 at 07:26:04 (-0500), Gene Heskett wrote:
> My mdadm manpage does not show the -S command. Scanniing it again to make
> sure, probably for about the 10th time and I finally found it but many
> megabytes of relatively unimportant drivel down from the top, IMO the
> manpage is missleading as such an important option ought to be shown on
> the first screenfull.
You could sponsor it—just reply to one of those junk emails,
"Get top page ranking!"
Serously, you need only type /\-S into less, if you set it as
your manpage viewer, export MANOPT="-P less"
I would make one small criticism of some manpages; for example:
chmod has its arguments documented in running text, whereas a
table would be much easier to scan:
A combination of the letters ugoa controls which users' access
to the file will be changed:
u the user who owns it,
g other users in the file's group,
o other users not in the file's group,
a all users.
none the effect is as if (a) were given, but bits
that are set in the umask are not affected.
compared with:
A combination of the letters ugoa controls which users'
access to the file will be changed: the user who owns
it (u), other users in the file's group (g), other
users not in the file's group (o), or all users (a).
If none of these are given, the effect is as if (a)
were given, but bits that are set in the umask are not
affected.
Cheers,
David.
[toc] | [prev] | [next] | [standalone]
| From | Gene Heskett <gheskett@shentel.net> |
|---|---|
| Date | 2021-11-13 19:40 +0100 |
| Message-ID | <Dj66u-5uh-13@gated-at.bofh.it> |
| In reply to | #242136 |
On Saturday 13 November 2021 11:41:00 David Wright wrote: > On Sat 13 Nov 2021 at 07:26:04 (-0500), Gene Heskett wrote: > > My mdadm manpage does not show the -S command. Scanniing it again to > > make sure, probably for about the 10th time and I finally found it > > but many megabytes of relatively unimportant drivel down from the > > top, IMO the manpage is missleading as such an important option > > ought to be shown on the first screenfull. > > You could sponsor it—just reply to one of those junk emails, > "Get top page ranking!" Sure, and its a good thing these jerks can't be located, as I know where an old mine cache is, with several 1 cup containers of 75 yo nitro that ought to be really unstable by now in it. Probably someones sick idea for darwin award bait. I would have spoiled their fun by backing off a couple hundred meters and seeing what effect an Ackley-06 rattling around inside it had, but it looked like I might be ducking a 200lb steel door if I did. So I walked off and went back to deer hunting. Safer. > Serously, you need only type /\-S into less, if you set it as > your manpage viewer, export MANOPT="-P less" > > I would make one small criticism of some manpages; for example: > chmod has its arguments documented in running text, whereas a > table would be much easier to scan: > > A combination of the letters ugoa controls which users' access > to the file will be changed: > u the user who owns it, > g other users in the file's group, > o other users not in the file's group, > a all users. > none the effect is as if (a) were given, but bits > that are set in the umask are not affected. > > compared with: > > A combination of the letters ugoa controls which users' > access to the file will be changed: the user who owns > it (u), other users in the file's group (g), other > users not in the file's group (o), or all users (a). > If none of these are given, the effect is as if (a) > were given, but bits that are set in the umask are not > affected. > > Cheers, > David. Plus 100 or more, David. That wall of text has confused me since red hat 5.0 in 1998. Soon to be 25 years. This has been a linux only house for that long. 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 Genes Web page <http://geneslinuxbox.net:6309/gene>
[toc] | [prev] | [next] | [standalone]
| From | Charles Curley <charlescurley@charlescurley.com> |
|---|---|
| Date | 2021-11-12 15:10 +0100 |
| Message-ID | <DiFpD-6l3-7@gated-at.bofh.it> |
| In reply to | #242052 |
On Fri, 12 Nov 2021 08:05:53 -0500
Gene Heskett <gheskett@shentel.net> wrote:
> The man page we have goes on and on for megabytes without ever giving
> an example.
>
> I thought maybe it could scan for devices so that I could build an
> mdadm.conf but it wont do a --scan by itself.
Nope, near as I can figure --scan only works with an existing RAID
setup. You have to create it first. And you have to create it manually.
mdadm is not going to guess.
Not that I am any kind or RAID expert, but I did create a RAID1
installation about a year ago. I recently added a drive and moved from
RAID1 to RAID5.
In the interest of protecting my data should I ever have to install one
of these drives somewhere else, I first created a partition on each
of the two new drives. Then:
mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sdc1 /dev/sdd1
I then set up encryption in the RAID device:
cryptsetup -y -v luksFormat /dev/md0
cryptsetup luksOpen /dev/md0 encryptedRaid
cryptsetup -v status encryptedRaid
cryptsetup luksDump /dev/md0
Preserve the header, just in case....
cryptsetup luksHeaderBackup /dev/md0 --header-backup-file ${HOSTNAME}.$(date +%Y.%m.%d).luks.raid.backup
Then build the LVM on top of /dev/mapper/encryptedRaid:
pvcreate /dev/mapper/encryptedRaid # create the physical volume.
vgcreate hawk-vg-raid /dev/mapper/encryptedRaid # Create the volume group.
lvcreate -n crc$( date +%Y ) -L 2862612M hawk-vg-raid # Create a logical volume
etc. The RAID5 setup is working just fine.
Note: The RAID volume is open for business as soon as you create it.
But it will then take several hours to sync between the two drives.
Same thing when I expanded from RAID1 to RAID5; it took more than a day
of steady thrashing.
Hope that helps.
--
Does anybody read signatures any more?
https://charlescurley.com
https://charlescurley.com/blog/
[toc] | [prev] | [next] | [standalone]
| From | Gene Heskett <gheskett@shentel.net> |
|---|---|
| Date | 2021-11-12 15:30 +0100 |
| Message-ID | <DiFIZ-6rj-7@gated-at.bofh.it> |
| In reply to | #242060 |
On Friday 12 November 2021 08:39:31 Charles Curley wrote:
> On Fri, 12 Nov 2021 08:05:53 -0500
>
> Gene Heskett <gheskett@shentel.net> wrote:
> > The man page we have goes on and on for megabytes without ever
> > giving an example.
> >
> > I thought maybe it could scan for devices so that I could build an
> > mdadm.conf but it wont do a --scan by itself.
>
> Nope, near as I can figure --scan only works with an existing RAID
> setup. You have to create it first. And you have to create it
> manually. mdadm is not going to guess.
>
> Not that I am any kind or RAID expert, but I did create a RAID1
> installation about a year ago. I recently added a drive and moved from
> RAID1 to RAID5.
>
> In the interest of protecting my data should I ever have to install
> one of these drives somewhere else, I first created a partition on
> each of the two new drives. Then:
>
> mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sdc1
> /dev/sdd1
Thats what I've been looking for, a commandline example I can modify for
my use. Since posting, I have found that gparted spits out a list of
disks that have never been labeled, and those then are the disks I'll
want to use.
So
mdadm --create --verbose /dem/md0 --level=10 --raid-devices=4 /dev/sde /dev/sdf /dev/sdg /dev/sdh
should work.
but once assembled, does it need formatted? I don't intend to encrypt.
> I then set up encryption in the RAID device:
>
> cryptsetup -y -v luksFormat /dev/md0
> cryptsetup luksOpen /dev/md0 encryptedRaid
> cryptsetup -v status encryptedRaid
> cryptsetup luksDump /dev/md0
>
> Preserve the header, just in case....
> cryptsetup luksHeaderBackup /dev/md0 --header-backup-file
> ${HOSTNAME}.$(date +%Y.%m.%d).luks.raid.backup
>
> Then build the LVM on top of /dev/mapper/encryptedRaid:
>
> pvcreate /dev/mapper/encryptedRaid # create the physical volume.
> vgcreate hawk-vg-raid /dev/mapper/encryptedRaid # Create the volume
> group. lvcreate -n crc$( date +%Y ) -L 2862612M hawk-vg-raid # Create
> a logical volume
>
> etc. The RAID5 setup is working just fine.
>
> Note: The RAID volume is open for business as soon as you create it.
> But it will then take several hours to sync between the two drives.
> Same thing when I expanded from RAID1 to RAID5; it took more than a
> day of steady thrashing.
>
> Hope that helps.
A bunch, thanks.
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
Genes Web page <http://geneslinuxbox.net:6309/gene>
[toc] | [prev] | [next] | [standalone]
| From | Andy Smith <andy@strugglers.net> |
|---|---|
| Date | 2021-11-12 16:40 +0100 |
| Message-ID | <DiGOJ-73u-7@gated-at.bofh.it> |
| In reply to | #242064 |
Hello, On Fri, Nov 12, 2021 at 09:22:12AM -0500, Gene Heskett wrote: > mdadm --create --verbose /dem/md0 --level=10 --raid-devices=4 /dev/sde /dev/sdf /dev/sdg /dev/sdh > > should work. You may want to create identical partitions on each of the devices first, and use those instead of the raw unpartitioned devices. The reason is that there is hardware (primarily motherboards) out there that get upset when they see a drive without a partition table, and just blindly make one, which corrupts your RAID. There are ASRock motherboards which are known to do this at every boot. Such things are broken of course and ideally would be avoided, but having all your drives corrupted isn't a nice way to discover that you own one. > but once assembled, does it need formatted? It will be an empty block device like any other. You get to choose what filesystem to put on it, or use it however else you might use a block device. Cheers, Andy -- https://bitfolk.com/ -- No-nonsense VPS hosting
[toc] | [prev] | [next] | [standalone]
| From | Gene Heskett <gheskett@shentel.net> |
|---|---|
| Date | 2021-11-12 18:10 +0100 |
| Message-ID | <DiIdR-81H-19@gated-at.bofh.it> |
| In reply to | #242070 |
On Friday 12 November 2021 10:37:22 Andy Smith wrote: > Hello, > > On Fri, Nov 12, 2021 at 09:22:12AM -0500, Gene Heskett wrote: > > mdadm --create --verbose /dem/md0 --level=10 --raid-devices=4 > > /dev/sde /dev/sdf /dev/sdg /dev/sdh > > > > should work. > > You may want to create identical partitions on each of the devices > first, and use those instead of the raw unpartitioned devices. > > The reason is that there is hardware (primarily motherboards) out > there that get upset when they see a drive without a partition > table, and just blindly make one, which corrupts your RAID. There > are ASRock motherboards which are known to do this at every boot. > > Such things are broken of course and ideally would be avoided, but > having all your drives corrupted isn't a nice way to discover that > you own one. yes, makes you want to use the whole maryann for target practice, BTDT, something I am well equipt to do. All for just moving a drives sata cable to a different socket on the previous Asus motherboard, and so is this one, an Asus PRIME Z-370-A-II with a 6 core i5. > > but once assembled, does it need formatted? > > It will be an empty block device like any other. You get to choose > what filesystem to put on it, or use it however else you might use a > block device. Condensing this down bare bones it sounds like I should un-mount it, format each to ext4 and re-create it just in case. And should nuke mdadm.conf before re-creating it. Correct? Thanks Andy. > Cheers, > 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 Genes Web page <http://geneslinuxbox.net:6309/gene>
[toc] | [prev] | [next] | [standalone]
| From | Charles Curley <charlescurley@charlescurley.com> |
|---|---|
| Date | 2021-11-12 19:20 +0100 |
| Message-ID | <DiJjz-d7-3@gated-at.bofh.it> |
| In reply to | #242078 |
On Fri, 12 Nov 2021 11:53:45 -0500 Gene Heskett <gheskett@shentel.net> wrote: > Condensing this down bare bones it sounds like I should un-mount it, > format each to ext4 and re-create it just in case. And should nuke > mdadm.conf before re-creating it. Correct? Umount it, move mdadm.conf aside, create a new partition on each drive. Don't bother to format any of them, mdadm will clobber that formatting anyway. -- Does anybody read signatures any more? https://charlescurley.com https://charlescurley.com/blog/
[toc] | [prev] | [next] | [standalone]
| From | Gene Heskett <gheskett@shentel.net> |
|---|---|
| Date | 2021-11-12 20:20 +0100 |
| Message-ID | <DiKfD-Lr-3@gated-at.bofh.it> |
| In reply to | #242087 |
On Friday 12 November 2021 12:07:54 Charles Curley wrote: > On Fri, 12 Nov 2021 11:53:45 -0500 > > Gene Heskett <gheskett@shentel.net> wrote: > > Condensing this down bare bones it sounds like I should un-mount it, > > format each to ext4 and re-create it just in case. And should nuke > > mdadm.conf before re-creating it. Correct? > > Umount it, move mdadm.conf aside, create a new partition on each > drive. Don't bother to format any of them, mdadm will clobber that > formatting anyway. What do I use to create/write a new GPT partition table? Despite nuking mdadm.conf, and zeroing the drive with dd, its still locked and untouchable by gparted. And I cannot rmmod the raid stuff, its busy. Blanking the third one now with dd a 34 minute job. I'll reboot again when the 4th drive has been zeroed. 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 Genes Web page <http://geneslinuxbox.net:6309/gene>
[toc] | [prev] | [next] | [standalone]
| From | Charles Curley <charlescurley@charlescurley.com> |
|---|---|
| Date | 2021-11-13 00:10 +0100 |
| Message-ID | <DiNQd-2XW-7@gated-at.bofh.it> |
| In reply to | #242093 |
On Fri, 12 Nov 2021 14:12:58 -0500 Gene Heskett <gheskett@shentel.net> wrote: > What do I use to create/write a new GPT partition table? I use fdisk. Parted and gparted will also do it. > > Despite nuking mdadm.conf, and zeroing the drive with dd, its still > locked and untouchable by gparted. And I cannot rmmod the raid stuff, > its busy. Blanking the third one now with dd a 34 minute job. I'll > reboot again when the 4th drive has been zeroed. There is a daemon that maintains the array for you. That has to be shut down. So rebooting may be the way to go. -- Does anybody read signatures any more? https://charlescurley.com https://charlescurley.com/blog/
[toc] | [prev] | [next] | [standalone]
| From | Andy Smith <andy@strugglers.net> |
|---|---|
| Date | 2021-11-13 12:40 +0100 |
| Message-ID | <DiZy1-1ws-1@gated-at.bofh.it> |
| In reply to | #242103 |
Hello, On Fri, Nov 12, 2021 at 03:41:15PM -0700, Charles Curley wrote: > On Fri, 12 Nov 2021 14:12:58 -0500 > Gene Heskett <gheskett@shentel.net> wrote: > > Despite nuking mdadm.conf, and zeroing the drive with dd, its still > > locked and untouchable by gparted. And I cannot rmmod the raid stuff, > > its busy. Blanking the third one now with dd a 34 minute job. I'll > > reboot again when the 4th drive has been zeroed. > > There is a daemon that maintains the array for you. That has to be shut > down. So rebooting may be the way to go. I have found that if trying to work on the underlying block devices of an mdadm array, the array needs to be stopped first. So: # mdadm --stop /dev/md0 # or whatever it is called You may still find that you have intermittent issues with the underlying device being "in use", as udev will keep trying to assemble things due to seeing the mdadm metadata on the block devices. To remove mdadm metadata (and everything else), I find it easiest to use wipefs: # wipefs -a /dev/sda1 # or whatever each block device is called mdadm does detect previous metadata and ask you if you want to remove it / go ahead, but because of being in a race with udev I do tend to just do a wipefs instead. Normally I can stop an array and repurpose its underlying devices without having to reboot. As long as it's all unmounted of course. Cheers, Andy -- https://bitfolk.com/ -- No-nonsense VPS hosting
[toc] | [prev] | [next] | [standalone]
| From | Dan Ritter <dsr@randomstring.org> |
|---|---|
| Date | 2021-11-12 18:20 +0100 |
| Message-ID | <DiInv-84S-1@gated-at.bofh.it> |
| In reply to | #242070 |
Andy Smith wrote: > On Fri, Nov 12, 2021 at 09:22:12AM -0500, Gene Heskett wrote: > > mdadm --create --verbose /dem/md0 --level=10 --raid-devices=4 /dev/sde /dev/sdf /dev/sdg /dev/sdh > > > > should work. > > You may want to create identical partitions on each of the devices > first, and use those instead of the raw unpartitioned devices. > > The reason is that there is hardware (primarily motherboards) out > there that get upset when they see a drive without a partition > table, and just blindly make one, which corrupts your RAID. There > are ASRock motherboards which are known to do this at every boot. There's also the fact that disk manufacturers are notoriously unable to commit to the same size disks across models. A RAID expecting 4 identical 1,024,000,048,576 byte disks might be unhappy when you have to substitute in a 1,016,000,000,384 byte disk from the same manufacturer -- but if you created partitions that were all 1,000,000,000,000 in size, everyone will get along. -dsr-
[toc] | [prev] | [next] | [standalone]
| From | Gene Heskett <gheskett@shentel.net> |
|---|---|
| Date | 2021-11-12 19:50 +0100 |
| Message-ID | <DiJMC-mB-1@gated-at.bofh.it> |
| In reply to | #242081 |
On Friday 12 November 2021 11:56:48 Dan Ritter wrote: > Andy Smith wrote: > > On Fri, Nov 12, 2021 at 09:22:12AM -0500, Gene Heskett wrote: > > > mdadm --create --verbose /dem/md0 --level=10 --raid-devices=4 > > > /dev/sde /dev/sdf /dev/sdg /dev/sdh > > > > > > should work. > > > > You may want to create identical partitions on each of the devices > > first, and use those instead of the raw unpartitioned devices. > > > > The reason is that there is hardware (primarily motherboards) out > > there that get upset when they see a drive without a partition > > table, and just blindly make one, which corrupts your RAID. There > > are ASRock motherboards which are known to do this at every boot. > > There's also the fact that disk manufacturers are notoriously > unable to commit to the same size disks across models. A RAID > expecting 4 identical 1,024,000,048,576 byte disks might be > unhappy when you have to substitute in a 1,016,000,000,384 byte > disk from the same manufacturer -- but if you created partitions > that were all 1,000,000,000,000 in size, everyone will get > along. > > -dsr- Dan: Forced to reboot to see if that would enable me to setup 2 partitions per disk that failed as the raid label overides any write perms, its locked for the other disk managers although fdisk was able to create and w rite an empty GPT table, which did not release the raid locks. So the ultimate hammer is now zeroing /dev/sde. At a rather glacial pace. Once that is done, I'll setup a 900g partition on each of /dev/sde|f|g| h1, and the remainder for the snapshots, called /dev/sde|f|g|h2. I was able to create an empty GPT table with fdisk and write it without being denied. I'll do the same with the other 3, and nuke /etc/mdadm/mdadm.conf, then do the /dev/md0 creation again with /dev/sde|f|g|h1 and md1 with the same list replacing the 1 with a 2. Then format md0 and md1. Will this satisfy everything? But now the real write speed is being tested, and it will take nearly 40 minutes to zero each drive, its used up the write buffer. Or /dev/zero is glacial. 1000204886016 bytes (1.0 TB, 932 GiB) copied, 2040.6 s, 490 MB/s =34 minutes And dd used to have a progress bar, but no mention in the man page, when did that go away? Its looking as if I'll have to reboot after zeroing all 4 of them, nuking mdadm.conf first. /dev/sde is still locked by the raid. Is there a quicker way to undo the creation and get my drives back to square zero so I can start all over? Thank you. 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 Genes Web page <http://geneslinuxbox.net:6309/gene>
[toc] | [prev] | [next] | [standalone]
| From | Charles Curley <charlescurley@charlescurley.com> |
|---|---|
| Date | 2021-11-12 23:50 +0100 |
| Message-ID | <DiNwS-2BT-5@gated-at.bofh.it> |
| In reply to | #242089 |
On Fri, 12 Nov 2021 13:41:22 -0500
Gene Heskett <gheskett@shentel.net> wrote:
> And dd used to have a progress bar, but no mention in the man page,
> when did that go away?
From man dd:
status=LEVEL
The LEVEL of information to print to stderr; 'none'
suppresses everything but error messages, 'noxfer' suppresses
the final transfer statistics, 'progress' shows periodic
transfer statistics
--
Does anybody read signatures any more?
https://charlescurley.com
https://charlescurley.com/blog/
[toc] | [prev] | [next] | [standalone]
| From | Gene Heskett <gheskett@shentel.net> |
|---|---|
| Date | 2021-11-13 01:10 +0100 |
| Message-ID | <DiOMi-3wr-3@gated-at.bofh.it> |
| In reply to | #242102 |
On Friday 12 November 2021 17:43:34 Charles Curley wrote: > On Fri, 12 Nov 2021 13:41:22 -0500 > > Gene Heskett <gheskett@shentel.net> wrote: > > And dd used to have a progress bar, but no mention in the man page, > > when did that go away? > > From man dd: > > status=LEVEL > The LEVEL of information to print to stderr; 'none' > suppresses everything but error messages, 'noxfer' suppresses > the final transfer statistics, 'progress' shows periodic > transfer statistics Well, I sit corrected, it is there but gkrellm was sitting on top of progress. Thank you. 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 Genes Web page <http://geneslinuxbox.net:6309/gene>
[toc] | [prev] | [next] | [standalone]
| From | Andy Smith <andy@strugglers.net> |
|---|---|
| Date | 2021-11-13 12:50 +0100 |
| Message-ID | <DiZHI-1zX-3@gated-at.bofh.it> |
| In reply to | #242081 |
Hello,
On Fri, Nov 12, 2021 at 11:56:48AM -0500, Dan Ritter wrote:
> There's also the fact that disk manufacturers are notoriously
> unable to commit to the same size disks across models.
I was interested to discover a couple of years ago that there has
for some time been a standard for storage capacity so that any
stated capacity will be consistent even between manufacturers. It's
called IDEMA LBA1-03:
http://www.idema.org/wp-content/downloads/2169.pdf
Basically it says that the actual capacity in bytes will always be
the stated GB * 1000194048 + 10838016.
Thinking back over the last 10 years or so I couldn't remember when
I had ever had a problem with differing capacities, this with
hundreds of different drives from different vendors, so I thought
that with this standard this problem was behind us.
Then, two months ago I saw some people on the zfs-linux mailing list
saying they'd had this problem so I asked around:
https://twitter.com/grifferz/status/1438269336418930688
…and indeed, it seems that some some are still not abiding by this
standard. Yet for most of their drives they do. :(
Cheers,
Andy
--
https://bitfolk.com/ -- No-nonsense VPS hosting
[toc] | [prev] | [next] | [standalone]
| From | Charles Curley <charlescurley@charlescurley.com> |
|---|---|
| Date | 2021-11-12 17:50 +0100 |
| Message-ID | <DiHUu-7FI-11@gated-at.bofh.it> |
| In reply to | #242064 |
On Fri, 12 Nov 2021 09:22:12 -0500 Gene Heskett <gheskett@shentel.net> wrote: > So > > mdadm --create --verbose /dem/md0 --level=10 --raid-devices=4 > /dev/sde /dev/sdf /dev/sdg /dev/sdh > > should work. It should. But there are good reasons to put partitions on the drives first and use the partitions.. > > but once assembled, does it need formatted? Yes. It's a raw block partition. I put LVM on, and made a logical volume which left some space so I would have lots of flexibility in my array. There is a systemd service in Bullseye that creates a snapshot of LVM logical volumes, fscks the snapshot, and reports the result if there is an error. So I leave at least 20 GB available on my system disk for that. Leaving a chunk available for that on your RAID array strikes me as a good idea. -- Does anybody read signatures any more? https://charlescurley.com https://charlescurley.com/blog/
[toc] | [prev] | [next] | [standalone]
| From | Gene Heskett <gheskett@shentel.net> |
|---|---|
| Date | 2021-11-12 18:10 +0100 |
| Message-ID | <DiIdR-81H-21@gated-at.bofh.it> |
| In reply to | #242073 |
On Friday 12 November 2021 11:34:24 Charles Curley wrote: > On Fri, 12 Nov 2021 09:22:12 -0500 > > Gene Heskett <gheskett@shentel.net> wrote: > > So > > > > mdadm --create --verbose /dem/md0 --level=10 --raid-devices=4 > > /dev/sde /dev/sdf /dev/sdg /dev/sdh > > > > should work. > > It should. But there are good reasons to put partitions on the drives > first and use the partitions.. > > > but once assembled, does it need formatted? > > Yes. It's a raw block partition. > > I put LVM on, and made a logical volume which left some space so I > would have lots of flexibility in my array. > > There is a systemd service in Bullseye that creates a snapshot of LVM > logical volumes, fscks the snapshot, and reports the result if there > is an error. So I leave at least 20 GB available on my system disk for > that. Leaving a chunk available for that on your RAID array strikes me > as a good idea. Thanks Charles. Sounds like a good idea. I'll see if I can get gparted to see them now. It see's it, but its locked, in use by the system even if unmounted. Now what? 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 Genes Web page <http://geneslinuxbox.net:6309/gene>
[toc] | [prev] | [next] | [standalone]
Page 3 of 4 — ← Prev page 1 2 [3] 4 Next page →
Back to top | Article view | linux.debian.user
csiph-web