[GLLUG] Link two RAIDs in one LVM?
Dr. Axel Stammler
axst at users.sourceforge.net
Mon May 11 19:14:15 UTC 2020
Hi,
And thank you for all contributions.
On Mon 2020-05-11 19.40.15, Greater London Linux User Group wrote:
>On Mon, May 11, 2020 at 01:15:55PM +0100, James Courtier-Dutton via GLLUG wrote:
><snip>
>> If you have a separate data from the OS partition:
>> you could "rsync -avpP" the data/image/picture/whatever files over to
>> the new disks on top of LVM.
>> You could handle the OS partition offline.
>> You can then do a final "catch up" rsync of the data in offline mode.
><snip>
>
>Can I add a suggestion to use '-H' ('--hard-links') to the list of
>rsync options to make sure that files which are hard links are not
>copied as separate non-linked files?
>
>This is important for the OS partitions, where several deb packages
>install the same file under different names (eg bzip2).
>
>It does have the downside of being slightly slower as it has to check
>for hard links, so might be skipped for those filesystems where you
>know there are no hard links.
I feel rather nervous as I am about to do all this, and I do have some questions (see below).
1. Create Physical Volumes on the two new 8 TB hard disk drives:
pvcreate /dev/sdc
pvcreate /dev/sde
2. Create a Volume Group containing these Physical Volumes
vgcreate vg_blobs /dev/sdc /dev/sde
3. Create a mirrored Logical Volume using this Volume Group
lvcreate -n lv_blobs -m1 vg_blobs
Questions:
- How do I make the new volume use all available space? Will mirroring choose the physical volumes automatically?
- Where does the log go? = Do I need a partition on a separate disk for it? How large should it be and how do I incorporate it?
4. Create a new file system on the mirrored LV
mkfs.ext4 /dev/vg_blobs/lv_blobs
5. Copy the data from the existing RAID-1 system (on sda and sdb) to the new mirrored LV
rsync -at <RAID mount point> <LV mount point> # or -avpP or -avpPH?
6. How do I then remove sda + sdb from RAID-1 md127p1?
7. How do I eliminate RAID-1 md127p1?
8. Create Physical Volumes on the two old 8 TB hard disk drives:
pvcreate /dev/sda
pvcreate /dev/sdb
9. Do I now extend the Volume Group created in step 2 or do I create a new Volume Group?
vgextend vg_blobs
Or:
vgcreate vg_blobs2
10. ?
lvextend
Or:
lvresize
11. Grow the filesystem to 16 TB.
Are there any more ideas concerning these commands and their options?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20200511/9d49fca4/attachment.sig>
More information about the GLLUG
mailing list