Re: Procedure? Move existing Wheezy from sda2 to md1
Hi.
On Sun, 19 Jan 2014 16:15:31 +0000
Ron Leach <ronleach@tesco.net> wrote:
> 1. First insert the 2 3TB drives and, using the existing Wheezy,
> create a raid1 array. I would create three md arrays:
> md0 for Grub, 100 MB
> md1 for Wheezy, 250 GB
> md2 for the LV filesystem, approx 2.75 TB.
Given you're using >2Tb disks, GPT would be nessessary, and GRUB2 will
fail to install unless you'll create special 'bios_grub' partition.
I did similar thing recently, and my setup was:
bios_grub partition for grub2 (it failed to boot without it) - 1Mb
md0 for grub - 128Mb
md1 as a physical volume for the rest of the RAID1.
I've put root filesystem, /var filesystem and swap on a volume group on
a LVM to simplify backup. GRUB was installed on both disks. bios_grub
was put on both disks.
> 3. The Debian installer created several partitions for the Wheezy
> install and, in my plan, I do not have those partitions replicated in
> the raid1 system. So, moving (or copying, perhaps, is a better word)
> Wheezy to /dev/md1 poses a little more difficulty. Though I would
> have used DD if it were simply a matter of copying from one whole disk
> to another, this time I need to copy the whole of '/' (which is
> mounted on several partitions), while retaining all the metadata, etc.
Don't use dd for this unless you remount filesystems read-only (or
unmount them). I used this:
https://wiki.debian.org/ReadonlyRoot
so things were simple for me (i.e. create lv, copy block device into
lv).
> I think I would need to
> (a) create a filesystem on md1, and then
> (b) use cp, perhaps, as root, to copy the whole of / (excluding any
> nfs mount points). I've previously used the '-a' option with cp to
> ensure that metadata is retained.
Will work, although I'd prefer tar or cpio for this.
> But I worry this won't work because /usr (for example) is a separate
> mount point in fstab and I'll have to remove those (because the whole
> of / would now be on a single partition), but I'm not sure if fstab
> would be the only thing that needed to change.
At very least, you'll also need to reinstall GRUB on the RAID1 and
rebuild initrd. Whenever you'll keep /usr separate, or not is
irrelevant.
Reco.
Reply to: