LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   SUSE / openSUSE (https://www.linuxquestions.org/questions/suse-opensuse-60/)
-   -   Install RAID1 with LVM partitions (https://www.linuxquestions.org/questions/suse-opensuse-60/install-raid1-with-lvm-partitions-4175611305/)

OutSiderBR 08-04-2017 08:53 AM

Install RAID1 with LVM partitions
 
I would like to introduce RAID 1 in my system with LVM partitions without loss of data, of course. The system may be rebooted as many times as necessary. I will install a second disk with exactly the same characteristics as the one already installed. I am using SLES 11 SP4.

The system is partitioned like this:

Quote:

lim1-190:~ # cat /etc/fstab
/dev/system/root_lv / ext3 acl,user_xattr,relatime 1 1
/dev/sda1 /boot ext2 acl,user_xattr 1 2
/dev/system/var_lv /var ext3 acl,user_xattr,relatime 1 2
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
/local/swap/swap1 swap swap defaults 0 0
funny:~ # pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 system lvm2 a-- 118.94g 0
funny:~ # vgs
VG #PV #LV #SN Attr VSize VFree
system 1 2 0 wz--n- 118.94g 0
funny:~ # lvs
LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert
root_lv system -wi-ao--- 102.94g
var_lv system -wi-ao--- 16.00g
funny:~ # fdisk -l

Disk /dev/sda: 128.0 GB, 128035676160 bytes
255 heads, 63 sectors/track, 15566 cylinders, total 250069680 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0005043a

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 626687 312320 83 Linux
/dev/sda2 626688 250068991 124721152 8e Linux LVM

Is there a guide of how to do it ?
Thanks in advance.

MensaWater 08-04-2017 08:59 AM

LVM can do its own mirroring (a/k/a RAID1). You can add your second disk as PV in your existing VG then use lvconvert to convert the individual LVs to mirrors.

syg00 08-04-2017 09:07 AM

Newer versions can even do RAID1 rather than simple mirroring, but I would doubt SLES 11 has it.
Ask SUSE as you no doubt have a support contract.

voleg 08-07-2017 11:28 AM

I had written couple of memos that suits for you:
Mirroring Linux system disk
Redundant disks without MDRAID

OutSiderBR 08-07-2017 01:13 PM

Thank you
 
Quote:

Originally Posted by voleg (Post 5745509)
I had written couple of memos that suits for you:
Mirroring Linux system disk
Redundant disks without MDRAID

Thank you very much. I will follow the instructions and see if they work fine for me. Once again, thank you.


All times are GMT -5. The time now is 08:58 PM.