Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
Lars Ellenberg wrote: > On Thu, Feb 14, 2008 at 11:04:59PM +0100, Rudolph Bott wrote: > >> Harald Rinker schrieb: >> >>> Hi @all >>> >>> What is the best solution to use LVM with drbd >>> >>> i think there are 2 possible way?s to do so >>> >>> 1. drbd on top of lvm >>> >> I wouldn't recommend this - there's almost no point in this kind of >> setup because you loose all the flexibility of LVM and its dynamic >> logical volumes! >> >> >>> 2. lvm on top of drbd >>> >> this is quite the way to go, but MAKE SURE (via /etc/lvm/lvm.conf or >> whatsoever) that LVM *only* scans the drbd devices under /dev/ >> Otherweise it might find the underlaying device (/dev/sdX or /dev/mdX >> etc.) and brake your whole setup! >> >> If you need to extend your storage you can add another drbd device >> (maybe on top of another raid device or a new harddisk etc.) and add it >> to your LVM setup as a new physical volume. Then extend your volume >> group(s) to also use the new physical volume and you're done. >> >> On top of that don't start LVM on the server which is currently the >> secondary - it won't be able to find the LVM metadata on the drbd volume >> because it is locked by the system. Which means if you fail over you >> have to restart LVM/re-run the checks on the new primary to make sure >> the system 'sees' all of the volumes that have been >> added/changed/removed on the old primary before it went down. >> >> Another point is that you can use snapshots of your logical volumes to >> create backups etc. >> Having drbd ON TOP of lvm would mean that you could only create >> snapshots of logical volume(s) containing the drbd structures - which is >> quite pointless in my eyes... >> > > > both have their purpose. you can even mix both, if you can deal with the > additional administrative complexity. > > having drbd sitting on top of an lv is nice: you can replicate "just > enough" data, then grow later as the file system fills up. > > snapshotting below drbd is a nice feature as well: you can snapshot the > secondary, and mount the snapshot on the secondary, for > backups/reports/consitency checks. > > having a few drbd on lvm gives you the flexibility to migrate resources > independently. > > having lvm on drbd makes your snapshots fail over with the resource > itself. > > neither way is "better" per se, it always depends on your needs. > > > Ok, so just to understand this. Let's say I want to setup RAID + LVM + DRBD, with the option of growing the whole storage with minimal fuss, do you recommend the following? 4x 250GB HDD's setup as RAID 5 (1x spare), with LVM on top of that, and DRBD on top of the LVM? And then, I can just replace the 250GB HDD's one-by-one, and increase the LVM ? Kind Regards Rudi Ahlers CEO, SoftDux Office: 087 805-9573 Fax No: 086 609 6128 Cell: 082 554 7532 Web: http://www.SoftDux.com Forum: http://Forum.SoftDux.com Join SA WebHostingTalk today, on http://www.WebHostingTalk.co.za