* [gentoo-user] Botched Raid1 install
@ 2011-07-28 14:46 James
2011-07-28 23:46 ` Daniel Frey
0 siblings, 1 reply; 8+ messages in thread
From: James @ 2011-07-28 14:46 UTC (permalink / raw
To: gentoo-user
Background:
I worked on this last April can gave up on the (livedDVD)
install with too many other things to do, and pissed off at
a lack of usable (current) documentation.
Currently:
Meds have kicked in ( peace and joy ) (yea right).
So, taking a fresh look at the BOTCHED system:
The 2 drives are identical 2TB: Seagate
drives: Model Number: ST32000542AS
I read about the 4K block problem and could have
easily made a formating mistake....(?).
fdisk /dev/sda (not the best tool to use...
Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xab83344a
Device Boot Start End Blocks Id System
/dev/sda1 * 1 33 262144 fd Linux raid autodetect
Partition 1 does not end on cylinder boundary.
/dev/sda2 33 659 5023744 fd Linux raid autodetect
Partition 2 does not end on cylinder boundary.
/dev/sda3 659 243202 1948227672 fd Linux raid autodetect
Partition 3 does not end on cylinder boundary.
But from what I read fdisk is not the best choice
for reading/formating 2T drives, so Here is what
sfdisk says:
Disk /dev/sda: 243201 cylinders, 255 heads, 63 sectors/track
Old situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sda1 * 0+ 32- 33- 262144 fd Linux raid autodetect
start: (c,h,s) expected (0,32,33) found (0,36,33)
end: (c,h,s) expected (32,194,34) found (41,214,48)
/dev/sda2 32+ 658- 626- 5023744 fd Linux raid autodetect
start: (c,h,s) expected (32,194,35) found (41,214,49)
end: (c,h,s) expected (658,48,30) found (842,210,16)
/dev/sda3 658+ 243201- 242544- 1948227672 fd Linux raid autodetect
start: (c,h,s) expected (658,48,31) found (842,210,17)
end: (c,h,s) expected (1023,254,63) found (169,217,56)
But in my attempt to install, I used this geometry:
fdisk -H 224 -S 56 /dev/sda
Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
224 heads, 56 sectors/track, 311465 cylinders
Units = cylinders of 12544 * 512 = 6422528 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xab83344a
Device Boot Start End Blocks Id System
/dev/sda1 * 1 42 262144 fd Linux raid autodetect
Partition 1 does not end on cylinder boundary.
/dev/sda2 42 843 5023744 fd Linux raid autodetect
Partition 2 does not end on cylinder boundary.
/dev/sda3 843 311466 1948227672 fd Linux raid autodetect
Partition 3 does not end on cylinder boundary.
using the livedDVD:
cat /proc/mdstat
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md125 : active raid1 md127p1[0]
262080 blocks [2/1] [U_]
md126 : active raid1 md127p2[0]
5023680 blocks [2/1] [U_]
md127 : active raid1 sdb[1] sda[0]
1948227584 blocks [2/2] [UU]
mdadm -E /dev/sda1
/dev/sda1:
Magic : a92b4efc
Version : 0.90.00
UUID : 8939604f:676aa8df:cb201669:f728008a (local to host livecd)
Creation Time : Thu Apr 14 14:10:56 2011
Raid Level : raid1
Used Dev Size : 262080 (255.98 MiB 268.37 MB)
Array Size : 262080 (255.98 MiB 268.37 MB)
Raid Devices : 2
Total Devices : 1
Preferred Minor : 125
Update Time : Wed Jul 27 17:25:15 2011
State : clean
Active Devices : 1
Working Devices : 1
Failed Devices : 1
Spare Devices : 0
Checksum : f7f2bc6f - correct
Events : 20
Number Major Minor RaidDevice State
this 0 259 0 0 active sync /dev/md/125_0p1
0 0 259 0 0 active sync /dev/md/125_0p1
1 1 0 0 1 faulty removed
It has been suggested kernel >=2.6.37 will have (better?)
support for 4k sectors disks [1].
SOOOOOOOOOOOOOOO
Should I just start over?
(If so, what docs do I follow?)
Or should I first try to salvage the installation
from last april (chroot and install a newer kernel?
[1] http://forums.funtoo.org/viewtopic.php?pid=869
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] Botched Raid1 install
2011-07-28 14:46 [gentoo-user] Botched Raid1 install James
@ 2011-07-28 23:46 ` Daniel Frey
2011-07-29 2:45 ` Paul Hartman
2011-07-29 17:10 ` James
0 siblings, 2 replies; 8+ messages in thread
From: Daniel Frey @ 2011-07-28 23:46 UTC (permalink / raw
To: gentoo-user
On 01/-10/37 11:59, James wrote:
> Background:
> I worked on this last April can gave up on the (livedDVD)
> install with too many other things to do, and pissed off at
> a lack of usable (current) documentation.
>
> So, taking a fresh look at the BOTCHED system:
> The 2 drives are identical 2TB: Seagate
> drives: Model Number: ST32000542AS
>
> I read about the 4K block problem and could have
> easily made a formating mistake....(?).
>
> fdisk /dev/sda (not the best tool to use...
>
fdisk does have a partition/drive limit of ~2.2TB, but this drive should
still work with it. The only other option is GPT, but I don't think grub
boots from that yet (unless you use grub2 with patches?)
>
> Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
> But in my attempt to install, I used this geometry:
> fdisk -H 224 -S 56 /dev/sda
That should align it to 4k blocks, I had to do the same on my SSD
(224/56=4)...
> using the livedDVD:
>
> cat /proc/mdstat
> Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
> md125 : active raid1 md127p1[0]
> 262080 blocks [2/1] [U_]
>
> md126 : active raid1 md127p2[0]
> 5023680 blocks [2/1] [U_]
>
> md127 : active raid1 sdb[1] sda[0]
> 1948227584 blocks [2/2] [UU]
>
>
Are the partitions on each drive *exactly* the same? If the end cylinder
and start cylinder for the other drive is off by one it will affect two
partitions, leaving them in a dirty state and the third in a clean state.
>
> It has been suggested kernel >=2.6.37 will have (better?)
> support for 4k sectors disks [1].
>
I believe I have 2.6.37 on my htpc and it works fine with the 4k-aligned
SSD.
> Should I just start over?
I would start over.
Are you using BIOS-raid? (Such as Intel ICH*R?) I assume no, given the
'fd' type partitions. If you are, you are using the wrong approach. It's
already in a raid set and you need to create normal partitions on it,
not type 'fd'.
However, there's a lot of information on how to use mdraid and create
native linux software raid partitions.
If you are trying to use BIOS raid, it's a little different, and
unneeded if you are not using Windows. The reason I mention this is that
mdadm gave my BIOS fakeraid /dev/md126* partitions. When I created
native linux raid partitions, they were /dev/md0, /dev/md1, etc.
I can't really help more until I know exactly what you are trying to do.
Right now (to me, anyway) it looks like you are mixing software raid and
BIOS fakeraid, as with native mdadm you generally don't have partitions
(/dev/md126p1, /dev/md126p2, etc) with native raid (which is /dev/md0,
/dev/md1, etc) as I said above.
If you are trying to use mdadm with a BIOS fakeraid, then you are
correct in that there's no documentation. Just yesterday I finally got a
working install after three weeks of messing around.
What's the output of `mdadm --detail-platform`?
Dan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] Botched Raid1 install
2011-07-28 23:46 ` Daniel Frey
@ 2011-07-29 2:45 ` Paul Hartman
2011-07-29 17:23 ` [gentoo-user] " James
2011-07-29 17:10 ` James
1 sibling, 1 reply; 8+ messages in thread
From: Paul Hartman @ 2011-07-29 2:45 UTC (permalink / raw
To: gentoo-user
On Thu, Jul 28, 2011 at 6:46 PM, Daniel Frey <djqfrey@gmail.com> wrote:
> fdisk does have a partition/drive limit of ~2.2TB, but this drive should
> still work with it. The only other option is GPT, but I don't think grub
> boots from that yet (unless you use grub2 with patches?)
grub in Gentoo includes a GPT patch:
/usr/portage/sys-boot/grub/files/grub-0.97-gpt.patch
I'm using GPT and grub-0.97-r10 and it works.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [gentoo-user] Re: Botched Raid1 install
2011-07-28 23:46 ` Daniel Frey
2011-07-29 2:45 ` Paul Hartman
@ 2011-07-29 17:10 ` James
1 sibling, 0 replies; 8+ messages in thread
From: James @ 2011-07-29 17:10 UTC (permalink / raw
To: gentoo-user
Daniel Frey <djqfrey <at> gmail.com> writes:
> fdisk does have a partition/drive limit of ~2.2TB, but this drive should
> still work with it. The only other option is GPT, but I don't think grub
> boots from that yet (unless you use grub2 with patches?)
The failed install used media from March, 2011.
I'm going to use newer installation media:
install-amd64-minimal-20110714.iso
That should solve the gptpart and grub issues.
> > fdisk -H 224 -S 56 /dev/sda
> That should align it to 4k blocks, I had to do the same on my SSD
> (224/56=4)...
Nice to know. I'm new to linux software raid. I do run
custom gentoo fire walls on 4 G Compact Flash; so I'll be
seeking your advice, the next time I decide to build a
new firewall, as it will use dual CF in a Raid 1 config...
Once I gain some confidence in Raid1 for a workstation.
> Are the partitions on each drive *exactly* the same? If the end cylinder
> and start cylinder for the other drive is off by one it will affect two
> partitions, leaving them in a dirty state and the third in a clean state.
Identical drives, identical partitioning. A new RAID1
install to begin later on today.
>
> >
> > It has been suggested kernel >=2.6.37 will have (better?)
> > support for 4k sectors disks [1].
> >
>
> I believe I have 2.6.37 on my htpc and it works fine with the 4k-aligned
> SSD.
New install media should have the >= 2.6.37 kernel, solving
this issue.
> I would start over.
YEP....
>
> Are you using BIOS-raid?
Nope.
> not type 'fd'.
I did use fd on the partition type.
Originally, I use ext4 on the boot partition.
Later I change it to ext2 but neither would work.
I now assume the borked install was not due to using
ext4 on boot partition, but grub-kernel-mdadm-diskformat issues
from my research and the errors I saw.....
> However, there's a lot of information on how to use mdraid and create
> native linux software raid partitions.
This is the best(most current)doc I have found. Let me know if
a better doc to follow exists for gentoo Raid1 installation [1]
> native linux raid partitions, they were /dev/md0, /dev/md1, etc.
some of the errors I got were unique to that md125, md126, md127
type of errors. [1] talks about a work around for that.
>
> I can't really help more until I know exactly what you are trying to do.
New install (new thread when trouble arises)
Workstation (amd 64 dual 2t Seagate drives) all RAID1 for boot,/,swap.
> Right now (to me, anyway) it looks like you are mixing software raid and
> BIOS fakeraid, as with native mdadm you generally don't have partitions
> (/dev/md126p1, /dev/md126p2, etc) with native raid (which is /dev/md0,
> /dev/md1, etc) as I said above.
I check the bios, no raid activated in Bios....
[1] http://en.gentoo-wiki.com/wiki/RAID/Software#Setup_RAID
^ permalink raw reply [flat|nested] 8+ messages in thread
* [gentoo-user] Re: Botched Raid1 install
2011-07-29 2:45 ` Paul Hartman
@ 2011-07-29 17:23 ` James
2011-07-29 17:30 ` Michael Mol
0 siblings, 1 reply; 8+ messages in thread
From: James @ 2011-07-29 17:23 UTC (permalink / raw
To: gentoo-user
Paul Hartman <paul.hartman+gentoo <at> gmail.com> writes:
> grub in Gentoo includes a GPT patch:
> /usr/portage/sys-boot/grub/files/grub-0.97-gpt.patch
> I'm using GPT and grub-0.97-r10 and it works.
Is this true for
install-amd64-minimal-20110714.iso ???
My install media of choice now.
If not then I can just emerge the GPT patched grub and
gptpart during the install? If not, then after the initial
install and enter the system via chrooting a rebooted
system and patch grub?
I think this is at the heart of my failure last April,
to get a RAID1 install correct. That and the 4K block
problem on 2T drives. This [1] doc only glosses over
that issue so maybe somebody will enhance the the wiki
document.....
I also intend to use ext4 for all 3 partitions, boot,root,swap;
unless there exist a strong, compelling reason to use
ext-2 for the boot partition ??? ease of recovery ?
[1] http://en.gentoo-wiki.com/wiki/RAID/Software#Setup_RAID
James
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] Re: Botched Raid1 install
2011-07-29 17:23 ` [gentoo-user] " James
@ 2011-07-29 17:30 ` Michael Mol
2011-07-29 17:56 ` Alan McKinnon
2011-07-29 18:36 ` James
0 siblings, 2 replies; 8+ messages in thread
From: Michael Mol @ 2011-07-29 17:30 UTC (permalink / raw
To: gentoo-user
On Fri, Jul 29, 2011 at 1:23 PM, James <wireless@tampabay.rr.com> wrote:
> Paul Hartman <paul.hartman+gentoo <at> gmail.com> writes:
> I also intend to use ext4 for all 3 partitions, boot,root,swap;
> unless there exist a strong, compelling reason to use
> ext-2 for the boot partition ??? ease of recovery ?
I gather that it's now possible to put your swap in a swap file on a
filesystem, as opposed to giving it its own partition, but...why?
--
:wq
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] Re: Botched Raid1 install
2011-07-29 17:30 ` Michael Mol
@ 2011-07-29 17:56 ` Alan McKinnon
2011-07-29 18:36 ` James
1 sibling, 0 replies; 8+ messages in thread
From: Alan McKinnon @ 2011-07-29 17:56 UTC (permalink / raw
To: gentoo-user
On Friday, 29 July 2011 13:30:18 Michael Mol did opine thusly:
> On Fri, Jul 29, 2011 at 1:23 PM, James <wireless@tampabay.rr.com>
wrote:
> > Paul Hartman <paul.hartman+gentoo <at> gmail.com> writes:
> > I also intend to use ext4 for all 3 partitions, boot,root,swap;
> > unless there exist a strong, compelling reason to use
> > ext-2 for the boot partition ??? ease of recovery ?
>
> I gather that it's now possible to put your swap in a swap file on a
> filesystem, as opposed to giving it its own partition, but...why?
A swap partition is permanent - you pretty much always have it all the
time. You might not have it swapon'ed all the time, but the several GB
it takes up is always consumed on the disk. You can't easily free up
disk space to make room for a temporary swap partition, usually
something has to be unmounted first (to then be "fs-reduced" to make
space). If that partition is the only one (common on desktop systems)
it is mounted at / and you can't unmount it.
Swap *files* solve all these problems, all you need is enough free
space on the filesystems to accommodate the temporary swap you need.
LVM also goes a long way towards making this easier, but dealing with
LVM and mkswap is considerably more involved than just making a swap
file.
Rules of thumb:
Permanent swap = use a swap partition
Temporary swap = use a swap file.
--
alan dot mckinnon at gmail dot com
^ permalink raw reply [flat|nested] 8+ messages in thread
* [gentoo-user] Re: Botched Raid1 install
2011-07-29 17:30 ` Michael Mol
2011-07-29 17:56 ` Alan McKinnon
@ 2011-07-29 18:36 ` James
1 sibling, 0 replies; 8+ messages in thread
From: James @ 2011-07-29 18:36 UTC (permalink / raw
To: gentoo-user
Michael Mol <mikemol <at> gmail.com> writes:
> > I also intend to use ext4 for all 3 partitions, boot,root,swap;
> I gather that it's now possible to put your swap in a swap file on a
> filesystem, as opposed to giving it its own partition, but...why?
Sorry, only for boot and root; definitely not for swap....
I will be using RAID-1 on boot, root and swap too so the
system does not fail, if the swap on one drive fails.....
James
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-07-29 18:38 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-28 14:46 [gentoo-user] Botched Raid1 install James
2011-07-28 23:46 ` Daniel Frey
2011-07-29 2:45 ` Paul Hartman
2011-07-29 17:23 ` [gentoo-user] " James
2011-07-29 17:30 ` Michael Mol
2011-07-29 17:56 ` Alan McKinnon
2011-07-29 18:36 ` James
2011-07-29 17:10 ` James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox