* [linux-lvm] raid1+lvm
@ 2002-09-23 9:41 galt
2002-09-23 10:07 ` Andreas Baier
2002-09-23 13:31 ` Luca Berra
0 siblings, 2 replies; 9+ messages in thread
From: galt @ 2002-09-23 9:41 UTC (permalink / raw)
To: linux-lvm
perhaps I'm missing something.
Luca,
So it is or is not possible to boot a root filesystem thats inside an lvm
without a separate /boot that is either raid1 or normal? From what you
said I'd like to interpret it as you need a initrd inside the root lv...is
that the case? If so, could I see the root= and boot= lines from your
lilo.conf? (Assuming you have this configuration)
William Blunn,
my reasoning behind wanting root in lvm is not to expand it. I want the
raid1 for data integrity, and I would like to avoid having more than one
raid1 set on the same disks...I figure theres more overhead and there
would be more io contention than necessary (assuming that what I'm asking
for is possible). So, in a perfect world, I would have my two disks
mirrored with raid1 and then my root,swap, and whatever else I want as lv's
inside that raid1. I mean, yes it is possible to have a bunch of raid1's
on the same disks, and yes the io contention probably isnt an issue, but
what I'm trying to do seems like the most elegant solution to me at this time.
galt
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [linux-lvm] raid1+lvm
2002-09-23 9:41 [linux-lvm] raid1+lvm galt
@ 2002-09-23 10:07 ` Andreas Baier
2002-09-23 10:18 ` Patrick Caulfield
2002-09-23 13:31 ` Luca Berra
1 sibling, 1 reply; 9+ messages in thread
From: Andreas Baier @ 2002-09-23 10:07 UTC (permalink / raw)
To: linux-lvm
Hi,
here is a point where I would like to ask - is it really possible to
have swap on a logical volume?
I always thought, it is only possible to have swap on a raid, perhaps
on a soft-raid, too, but on a lvm - please help me seeing this clear.
(assuming that what I'm asking
> for is possible). So, in a perfect world, I would have my two disks
> mirrored with raid1 and then my root,swap, and whatever else I want as lv's
> inside that raid1.
Best regards
--
Andreas Baier
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [linux-lvm] raid1+lvm
2002-09-23 10:07 ` Andreas Baier
@ 2002-09-23 10:18 ` Patrick Caulfield
2002-09-23 10:28 ` Theo Van Dinter
0 siblings, 1 reply; 9+ messages in thread
From: Patrick Caulfield @ 2002-09-23 10:18 UTC (permalink / raw)
To: linux-lvm
On Mon, Sep 23, 2002 at 05:05:52PM +0200, Andreas Baier wrote:
> Hi,
>
>
> here is a point where I would like to ask - is it really possible to
> have swap on a logical volume?
> I always thought, it is only possible to have swap on a raid, perhaps
> on a soft-raid, too, but on a lvm - please help me seeing this clear.
>
I have two boxes that swap onto LVM2 volumes and have seen no problems. LVM1
should be OK too.
--
patrick
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [linux-lvm] raid1+lvm
2002-09-23 10:18 ` Patrick Caulfield
@ 2002-09-23 10:28 ` Theo Van Dinter
2002-09-24 0:28 ` Gerwin Lienert
0 siblings, 1 reply; 9+ messages in thread
From: Theo Van Dinter @ 2002-09-23 10:28 UTC (permalink / raw)
To: linux-lvm
[-- Attachment #1: Type: text/plain, Size: 657 bytes --]
On Mon, Sep 23, 2002 at 04:14:59PM +0100, Patrick Caulfield wrote:
> I have two boxes that swap onto LVM2 volumes and have seen no problems. LVM1
> should be OK too.
I've swapped on a LVM1 setup before. The only "issue" was that swap
gets enabled before the volumes are brought online, but apparently is
then attempted again after the volumes are up. (RedHat 7.2?)
I've since taken to keeping /boot, /, and swap out of LVM since they
normally don't need to be resized, and makes the system easier to recover
in case of problems. :)
--
Randomly Generated Tagline:
"Well my mother was Irish... and your father? ... wasn't ..." - The Ref
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [linux-lvm] raid1+lvm
2002-09-23 10:28 ` Theo Van Dinter
@ 2002-09-24 0:28 ` Gerwin Lienert
2002-09-24 6:25 ` Wolfgang Weisselberg
0 siblings, 1 reply; 9+ messages in thread
From: Gerwin Lienert @ 2002-09-24 0:28 UTC (permalink / raw)
To: linux-lvm
If you act generous you may be right with
> I've since taken to keeping /boot, /, and ..
not need to resize.
> ..swap out of LVM since they
> normally don't need to be resized, and makes the system easier to recover
> in case of problems. :)
But what do you do, when your swap becomes to small. Shure, you can start,
having one swap device outside of your lvm, but in case of increased memory
leak, you will be happy, if you can easily define another swap device on your
lvm. I did so, and for me it worked fine.
--
Bis dann
Gerwin
======================
Werden Sie mit uns zum "OnlineStar 2002"! Jetzt GMX w�hlen -
und tolle Preise absahnen! http://www.onlinestar.de
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [linux-lvm] raid1+lvm
2002-09-24 0:28 ` Gerwin Lienert
@ 2002-09-24 6:25 ` Wolfgang Weisselberg
2002-09-24 6:55 ` Andreas Baier
0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Weisselberg @ 2002-09-24 6:25 UTC (permalink / raw)
To: linux-lvm
Gerwin Lienert (gerwin.lienert@gmx.de) wrote 37 lines:
> But what do you do, when your swap becomes to small.
- use a swapfile (can be on LVM) with a low priority
- use a swap partition on LVM with a low priority
> Shure, you can start,
> having one swap device outside of your lvm, but in case of increased memory
> leak, you will be happy, if you can easily define another swap device on your
> lvm. I did so, and for me it worked fine.
How about fixing the memory leak? :-)
Anyway, in most cases HD space is cheap and you can easily
allocate 3-4 times your RAM -- if you need more, you have a
bad leak or should definitively buy more RAM.
In all other cases, you can add swap space on the fly. And if
you have multiple fast hard disks, do make a swap space on them
all (or even better on each raid system) and use the kernel's
inbuild ability to strip over them (set the priority identical).
-Wolfgang
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [linux-lvm] raid1+lvm
2002-09-24 6:25 ` Wolfgang Weisselberg
@ 2002-09-24 6:55 ` Andreas Baier
0 siblings, 0 replies; 9+ messages in thread
From: Andreas Baier @ 2002-09-24 6:55 UTC (permalink / raw)
To: linux-lvm
Hi,
right now, I am not yet sure, if this all is ok, I´ve learned quiet a
bit about the LVM, and I remember, that it was not suggested to use
swap on a lvm in former times, and it doesn´t matter if it is a swap
file or a partition, since there could be bad things when memory is
tight. Perhaps this is problem is removed - I never used swap on a
lvm, but I did on a software raid1.
It would be perfect if that all would work, you built a system with
two cheap IDE-disks or scsi if you´re rich - than one can build a
small boot partition on both disks and with the rest of the disk one
can make a soft-raid1 with the lvm on top.
I know I can do it, so I have root and swap and data on the raid,
accessible via the lvm. But would it work if mem is tight and the
system load is high or could I run into a deadlock ?
Best regards
Andreas
Wolfgang Weisselberg wrote:
> Gerwin Lienert (gerwin.lienert@gmx.de) wrote 37 lines:
>
>
>>But what do you do, when your swap becomes to small.
>>
>
> - use a swapfile (can be on LVM) with a low priority
> - use a swap partition on LVM with a low priority
>
>
--
Andreas Baier
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [linux-lvm] raid1+lvm
2002-09-23 9:41 [linux-lvm] raid1+lvm galt
2002-09-23 10:07 ` Andreas Baier
@ 2002-09-23 13:31 ` Luca Berra
1 sibling, 0 replies; 9+ messages in thread
From: Luca Berra @ 2002-09-23 13:31 UTC (permalink / raw)
To: linux-lvm
galt wrote:
> perhaps I'm missing something.
>
> Luca,
> So it is or is not possible to boot a root filesystem thats inside an lvm
> without a separate /boot that is either raid1 or normal? From what you
> said I'd like to interpret it as you need a initrd inside the root lv...is
> that the case? If so, could I see the root= and boot= lines from your
> lilo.conf? (Assuming you have this configuration)
This config is far from perfect, was done in a hurry and since i was not
able to batter lilo into perfection i had to use boot=/dev/sda and do a
dd if=/dev/sda of=/dev/sdb bs=512 count=1
after running lilo
This config was tested and i was able to boot it removing the first drive.
# lilo -V
LILO version 22.3.2
# cat /etc/lilo.conf
boot=/dev/sda
map=/boot/map
vga=normal
default=linux
keytable=/boot/us.klt
lba32
prompt
nowarn
timeout=100
message=/boot/message
menu-scheme=wb:bw:wb:bw
ignore-table
password="XXXXXXX"
image=/boot/vmlinuz
restricted
label=linux
root=/dev/vg00/lvol3
initrd=/boot/initrd.img
append="devfs=mount console=ttyS1,9600 console=tty0"
read-only
# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/vg00/lvol3 3096336 1070072 1868980 37% /
/dev/vg00/lvol1 126931 8277 112101 7% /boot
/dev/vg00/lvol4 4128448 2632024 1286712 68% /home
/dev/vg00/lvol5 2064208 240884 1718468 13% /var
# swapon -s
Filename Type Size Used Priority
/dev/vg00/lvol2 partition 1048568 26640 -1
# cat /proc/lvm/global
LVM module LVM version 1.0.3(19/02/2002)
# fdisk -l
Disk /dev/scsi/host0/bus0/target0/lun0/disc: 255 heads, 63 sectors, 2213
cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End
Blocks Id System
/dev/scsi/host0/bus0/target0/lun0/part1 * 1 7
56196 6 FAT16
/dev/scsi/host0/bus0/target0/lun0/part2 8 2213
17719695 fd Linux raid autodetect
Disk /dev/scsi/host0/bus0/target1/lun0/disc: 255 heads, 63 sectors, 2213
cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End
Blocks Id System
/dev/scsi/host0/bus0/target1/lun0/part1 * 1 7
56196 6 FAT16
/dev/scsi/host0/bus0/target1/lun0/part2 8 2213
17719695 fd Linux raid autodetect
# cat /etc/raidtab
raiddev /dev/md0
raid-level 1
nr-raid-disks 2
nr-spare-disks 0
device /dev/scsi/host0/bus0/target0/lun0/part2
raid-disk 0
device /dev/scsi/host0/bus0/target1/lun0/part2
raid-disk 1
I was not able to boot from an LVM 2 since lilo does not grok
device-mapper devices, btw lilo seems to need HDIO_GETGEO
syscall that is (was?) not available with device-mapper.
L.
P.S. in case yoo wonder sd?1 is the server diagnostic partition
--
Luca Berra -- bluca@comedia.it
Service Delivery Manager
Communication Media & Services S.r.l.
Via A. Modigliani 1 - MILANO
^ permalink raw reply [flat|nested] 9+ messages in thread
* [linux-lvm] raid1+lvm
@ 2002-09-24 4:25 galt
0 siblings, 0 replies; 9+ messages in thread
From: galt @ 2002-09-24 4:25 UTC (permalink / raw)
To: linux-lvm
I got it working, thanks to all, especially to Luca. After verifying
that my lilo configuration was sane, I tried making the initrd on another
host. I was able to boot just fine. I was trying to do everything from
the slackware 8.1 install cd, but the lvmcreate_initrd script doesnt want
to work properly in that environment.
Heres the setup:
# lilo -V
LILO version 22.2
# cat /etc/lilo.conf
lba32
boot = /dev/sda
delay = 50
vga = ext
image = /boot/vmlinuz
root = /dev/rootvg/root
initrd = /boot/initrd-lvm-2.4.18-heh3.gz
label = linux1
read-only
# df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/rootvg/root 2097084 719204 1377880 35% /
/dev/rootvg/var 6254396 40824 6213572 1% /var
# swapon -s
Filename Type Size Used Priority
/dev/rootvg/swap partition 524280 0 -1
# cat /proc/lvm/global
LVM driver LVM version 1.0.1-rc4(ish)(03/10/2001)
# fdisk -l
Disk /dev/sda: 255 heads, 63 sectors, 1106 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 1106 8883913+ fd Linux raid autodetect
Disk /dev/sdb: 255 heads, 63 sectors, 1106 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 1106 8883913+ fd Linux raid autodetect
# cat /etc/raidtab
raiddev /dev/md0
raid-level 1
nr-raid-disks 2
nr-spare-disks 0
device /dev/sda1
raid-disk 0
device /dev/sdb1
raid-disk 1
#
LVM rules.
galt
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2002-09-24 6:55 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-23 9:41 [linux-lvm] raid1+lvm galt
2002-09-23 10:07 ` Andreas Baier
2002-09-23 10:18 ` Patrick Caulfield
2002-09-23 10:28 ` Theo Van Dinter
2002-09-24 0:28 ` Gerwin Lienert
2002-09-24 6:25 ` Wolfgang Weisselberg
2002-09-24 6:55 ` Andreas Baier
2002-09-23 13:31 ` Luca Berra
-- strict thread matches above, loose matches on Subject: below --
2002-09-24 4:25 galt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.