1822229 Members
3896 Online
109642 Solutions
New Discussion юеВ

Re: lvm on linux

 
SOLVED
Go to solution
K.C. Chan
Trusted Contributor

lvm on linux

All,
I am using lvm for linux I want to be able to mirror one of my lvol, Is this possible with lvm under linux? Thanks.
Reputation of a thousand years can be determined by the conduct of an hour
8 REPLIES 8
K.C. Chan
Trusted Contributor

Re: lvm on linux

All,
I found my answer. Mirroring is not implemented under Linux LVM.

But I found that you can RAID the disk as raid one and run LVM on top of it. It's the the same as lvm mirroring. But it works. I am currently testing it out.
Reputation of a thousand years can be determined by the conduct of an hour
Steven E. Protter
Exalted Contributor
Solution

Re: lvm on linux

HP charges big bucks for mirroring on HP-UX and isn't going to let that functionality be ported to Linux while HP-UX users are paying for it.

I'm using the mirroring setup(software) that came with Red Hat 7.3 for Raid 10 on my production web hosting servers. I have had no incidents in 10 months of production use. Its reliable and efficient. Prior to going production I tested it by power disabling one of the two IDE drives. The system continued to run and was easily brought back to synch status.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
K.C. Chan
Trusted Contributor

Re: lvm on linux

what raidtool are you talking bout for redhat? Can you shed some lights. I used software raid (raid1) on two scsi disk. The command I used to configured it is mkraid and the conf file is /etc/raidtab. Are we talking about the same thing? thanks.
Reputation of a thousand years can be determined by the conduct of an hour
Jose Antonio Orozco
Frequent Advisor

Re: lvm on linux

I installed a Red Hat 8.0 box 6 months ago, for NFS use and some apps test, with scsi at OS, and 2 IDE drives using software RAID.

I configured RAID at *install* time, with a striped volume with RAID 0 for a swap (to test perfomance) and a mirrored RAID 1 volume for data (exported with NFS)

All works fine since then, and in my tests, the swap performs very nice.

This is my raidtab file, where /dev/md1 is the data volume (mirror), and /dev/md0 is the swap volume (striped)

raiddev /dev/md1
raid-level 1
nr-raid-disks 2
chunk-size 64k
persistent-superblock 1
nr-spare-disks 0
device /dev/hde2
raid-disk 0
device /dev/hdg2
raid-disk 1
raiddev /dev/md0
raid-level 0
nr-raid-disks 2
chunk-size 64k
persistent-superblock 1
nr-spare-disks 0
device /dev/hde1
raid-disk 0
device /dev/hdg1
raid-disk 1
What is not backed up, it not exists
K.C. Chan
Trusted Contributor

Re: lvm on linux

Joe,
this nice, I wonder have you tested if swap still works if disk hde or hdg is yank out? will the server crash, since you striped swap? Thanks.
Reputation of a thousand years can be determined by the conduct of an hour
Jose Antonio Orozco
Frequent Advisor

Re: lvm on linux

shure it will crash, but i did it this way because i didn't like to put 2 extra IDE drives to test swap.

For the test, you must enable the swap striped volume with swapon /dev/md0, and at end of test, take it off with swapoff /dev/md0
(md0 is my stripedd volume)
What is not backed up, it not exists
Caesar_3
Esteemed Contributor

Re: lvm on linux

Hello!

I'm using LVM under RH 9 and as i see there is no such thing as mirror for LV.
But you can try raid commands.

Caesar
Steven E. Protter
Exalted Contributor

Re: lvm on linux

If you have a raid controller chip?

http://www.tldp.org/HOWTO/ATA-RAID-HOWTO/index.html

Another link
http://www.tldp.org/HOWTO/mini/DPT-Hardware-RAID.html

If you want to use software raid and LILO

http://www.tldp.org/HOWTO/mini/Boot+Root+Raid+LILO.html

Old software raid
http://www.tldp.org/HOWTO/Root-RAID-HOWTO.html

Software Raid .9 and up.

http://www.tldp.org/HOWTO/Software-RAID-HOWTO.html

I did it with GRUB. Basically thus:

When doing an initial install of Red Hat 7.2 there are options in the graphical disk druid that let you set up RAID.

You have to first set up the filesystem, then set up the mirror and choose your raid.

It can be done after the fact on the command line but I don't have those commands happy. Should have included these links with my original post.

More on RAID:

http://linas.org/linux/Software-RAID/Software-RAID.html

http://www.ostenfeld.dk/~jakob/Software-RAID.HOWTO/Software-RAID.HOWTO.html



Somewhere in one of these these links is the actual document I used. I kept a hard copy at home which I'm not at right now.

I do apologize for sending you on a hunt, but none of these docs appears to be exactly what I used.

The good news is in two days, I'll be home.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com