Selasa, 18 November 2014

Bristol Digest, Vol 577, Issue 1

Send Bristol mailing list submissions to
bristol@mailman.lug.org.uk

To subscribe or unsubscribe via the World Wide Web, visit
https://mailman.lug.org.uk/mailman/listinfo/bristol
or, via email, send a message with subject or body 'help' to
bristol-request@mailman.lug.org.uk

You can reach the person managing the list at
bristol-owner@mailman.lug.org.uk

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Bristol digest..."


Today's Topics:

1. Two identical disks - system boots to the wrong one (Andrew)
2. Re: Two identical disks - system boots to the wrong one
(Alex Butcher)
3. Re: Two identical disks - system boots to the wrong one
(Simon Iremonger (bblug))


----------------------------------------------------------------------

Message: 1
Date: Mon, 17 Nov 2014 13:40:02 +0000
From: Andrew <andrewsoltau@gmail.com>
To: Bristol and Bath Linux User Group <bristol@mailman.lug.org.uk>
Subject: [bristol] Two identical disks - system boots to the wrong one
Message-ID: <5469FAB2.2020009@1dtv.com>
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"

Having had one ssd fail suddenly I now want to have a backup ready at
all times. So I have cloned the new ssd disk to a new hdd. I want to
have the backup running because I want to back up data regularly so the
backup disk is always up to date. Obviously, the backup has the same
identical mbr. This is causing a problem because although I have
disabled the hdd backup disk in the bios, this is still the disk which
the system always boots into by default.

The ssd is on sata 0 and the hdd is on sata 1. ssd is always sda and hdd
is always sdb. I am starting to think that the ssd does indeed boot, but
then boots the install on the hdd. Is that possible? Likely?

I have spent many hours googling and reading up on grub2, but I cannot
understand enough to work out what to change, or even to find out
exactly what is happening. The objective is that the new ssd will always
boot by default, but the hdd backup disk will boot if the ssd fails.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.lug.org.uk/mailman/private/bristol/attachments/20141117/834bc92e/attachment-0001.html>

------------------------------

Message: 2
Date: Mon, 17 Nov 2014 14:25:58 +0000 (GMT)
From: Alex Butcher <lug@assursys.co.uk>
To: andrew@1dtv.com, Bristol and Bath Linux User Group
<bristol@mailman.lug.org.uk>
Subject: Re: [bristol] Two identical disks - system boots to the wrong
one
Message-ID: <alpine.LFD.2.03.1411171417330.6778@nffheflf.pb.hx>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

On Mon, 17 Nov 2014, Andrew wrote:

> Having had one ssd fail suddenly I now want to have a backup ready at all
> times. So I have cloned the new ssd disk to a new hdd. I want to have the
> backup running because I want to back up data regularly so the backup disk
> is always up to date. Obviously, the backup has the same identical mbr. This
> is causing a problem because although I have disabled the hdd backup disk in
> the bios, this is still the disk which the system always boots into by
> default.
>
> The ssd is on sata 0 and the hdd is on sata 1. ssd is always sda and hdd is
> always sdb. I am starting to think that the ssd does indeed boot, but then
> boots the install on the hdd. Is that possible? Likely?
>
> I have spent many hours googling and reading up on grub2, but I cannot
> understand enough to work out what to change, or even to find out exactly
> what is happening. The objective is that the new ssd will always boot by
> default, but the hdd backup disk will boot if the ssd fails.

You will need to install grub on the MBR of sdb.

You will need grub to have a config that tells it the correct ordering of
devices (i.e. in device.map). Grub's config will also need to specify where
the root filesystem is, either by UUID or device node name. That root
filesystem will need to live on the HDD, obviously.

You will need to boot that secondary system periodically in order to make
sure it's kept up-to-date and can still boot. You will need for the grub
config to be kept up to date (i.e. derived from the main grub config, but
not a mere copy) as new kernels are installed.

You will need for the /etc/fstab in the root filesystem of the secondary
system to refer to filesystems only on the HDD rather than their SSD
equivalents.

If that sounds like a lot of work, that's probably because it is.

I'd recommend going with either a RAID1 setup, or possibly use something
like bcache if your distribution supports it. Either will probably require
rebuilding your discs from scratch, however.

Good luck,
Alex



------------------------------

Message: 3
Date: Tue, 18 Nov 2014 11:04:31 +0000
From: "Simon Iremonger (bblug)" <bblug@iremonger.me.uk>
To: andrew@1dtv.com, Bristol and Bath Linux User Group
<bristol@mailman.lug.org.uk>
Subject: Re: [bristol] Two identical disks - system boots to the wrong
one
Message-ID: <546B27BF.2040509@iremonger.me.uk>
Content-Type: text/plain; charset=windows-1252

On 2014-11-17 13:40, Andrew wrote:
> Having had one ssd fail suddenly I now want to have a backup ready at
> all times. So I have cloned the new ssd disk to a new hdd. I want to
> have the backup running because I want to back up data regularly so the
> backup disk is always up to date. Obviously, the backup has the same
> identical mbr. This is causing a problem because

> although I have disabled the hdd backup disk in the bios, this is
Yes, not good enough =) This may stop the Bios giving it an INT 13
drive and 'booting' grub from it ....
> still the disk which the system always boots into by default.
.... but, after GRUB has loaded, Linux sees the second disk anyway
and if you have a true clone (dd or equivalent) then when linux
looks for the second disk (usually by root=UUID=(something) given
in the initrd, it finds there are 2 different filesystems with the
same UUID and so either mounted as root is perfectly valid!!!.

> is always sdb. I am starting to think that the ssd does indeed boot, but
> then boots the install on the hdd. Is that possible? Likely?
Yes, read above carefurly... grub loads from one and loads linux,
then linux mounts the root from the other =).

> exactly what is happening. The objective is that the new ssd will always
> boot by default, but the hdd backup disk will boot if the ssd fails.
As the other poster mentioned, don't bother with all that... You want
RAID1 or similar with grub on both, then grub config and kernel
config on both...

The other problem is *what* happens with a disk failure!
Mechanical disks *tend* to get iffy sectors or fail entirely,
but SSDs have been known to do some rather weird/silly things
if you are unlucky... *hopefully* they just 'fail'
or 'become readonly' but you never know... (not to say
that mechanical disks can't do that either, but still...).

Some kind of offline / 'separate' backup would be a good idea,
too...! =). Can't assume raid system not corrupted... Think
all about risks =).


--Simon




------------------------------

_______________________________________________
Bristol mailing list
Bristol@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/bristol

End of Bristol Digest, Vol 577, Issue 1
***************************************

Tidak ada komentar:

Posting Komentar