Re: [gentoo-amd64] conversion sda to lvm2 questions

2007-10-13 Thread Richard Freeman
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Beso wrote:
>> can i use raid even if i got a single hd and a non raid board?! i think
>> i missed this thing. i knew that i could use raid on 2 separate disks of
>> the same ammount and only if i had a raid compatible board (with
>> hardware or software) but i didn't know that you could use it also on a
>> single disk.
> 

The simple answer is no - you can't use raid with one hard drive.  The
whole point of raid is to provide increased transfer rate and/or
redundancy (emphasis on the latter) by combining multiple drives together.

You do not need any special hardware to make raid work on linux (this is
software raid).  In fact, unless it is a $1000 adaptec raid controller
with battery backup that you're using I'd AVOID using any special
hardware.  My motherboard has "built-in raid support" and I don't use it
for my two raid-5 arrays or any of my raid-1s.  The cheap hardware
support provides little benefit and can cause problems (and these
solutions are almost always inflexible).

If you have only one hard drive just set up a boot partition (small), a
root partition (bigger - mine is 1GB, but you could go a little smaller
or larger), and then have one big partition assigned to lvm and then
split that up to handle everything else.

If at a later date you decide to install more hard drives and go with
raid the lvm partitions will be trivial to migrate.  Your boot will also
be easy - it isn't in use while the system is up.  The only pain will be
your root partition, and that will be mitigated by the fact that there
will be next to nothing on it.

> 
>> i tried to copy the system some time ago and found out that there are
>> files in /dev and /tmp or /var/tmp that have an enormous dimension. i
>> have left them behind and then got an unusable system for some reason.
>> the copy i had was from a livecd with the cp -p to preserve ownership
>> and permission.
>> for what i know from /dev i have only to get /dev/null and /dev/console
>> and let all others devices be created by udev. from /tmp instead i
>> should not copy anything and from /var/tmp i should copy only the
>> ccache. are my suppositions correct?
> 

If you copy files with cp - use the -a flag to make it not dereference
links/devices/etc.  "cp -a /dev/zero /tmp/zero" works just fine.

I would recommend making /tmp and /var/tmp tmpfs filesystems.  It
greatly improves performance and you shouldn't be storing anything in
these directories for longer than a reboot.  I also make myself another
tmp directory on a regular hard drive for "junk" and have tmpreaper keep
it clean - but it gets rare use.  In any case, even if you don't use
tmpfs I wouldn't bother copying them - losing your ccache isn't that big
a deal.

As somebody else pointed out, udev can take care of most of /dev, but
you do need at least a few devices there for bootup.  I don't know which
ones offhand, but you could just extract a stage 1 tarball someplace and
copy it's device directory for a core set of files.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHEOOjG4/rWKZmVWkRAlIvAJ0T4ZNKy2BovkbyzSLAigdYq3/EQQCeNygd
1HGLnNxkh6RkmWaKa7KT07g=
=Dd3P
-END PGP SIGNATURE-


smime.p7s
Description: S/MIME Cryptographic Signature


Re: [gentoo-amd64] conversion sda to lvm2 questions

2007-10-13 Thread Bernhard Auzinger
Am Samstag 13 Oktober 2007 schrieb Beso:
> can i use raid even if i got a single hd and a non raid board?! i think i
> missed this thing. i knew that i could use raid on 2 separate disks of the
> same ammount and only if i had a raid compatible board (with hardware or
> software) but i didn't know that you could use it also on a single disk.

RAID = Redundant Array of Independent Disks. I think this explains that it 
would be nonsense to have raid on a single disk. 

> i tried to copy the system some time ago and found out that there are files
> in /dev and /tmp or /var/tmp that have an enormous dimension. i have left
> them behind and then got an unusable system for some reason. the copy i had
> was from a livecd with the cp -p to preserve ownership and permission.
> for what i know from /dev i have only to get /dev/null and /dev/console and
> let all others devices be created by udev. from /tmp instead i should not
> copy anything and from /var/tmp i should copy only the ccache. are my
> suppositions correct?

Of course, copying /dev/zero is not a good idea on a running system. You will 
wait forever for this task to finish (/dev/zero, remember there comes data 
out of it, endlessly).

You don't have to copy anything of /dev. udev will provide you the solution to 
create a new /dev directory after boot.

LG
Bernhard
-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-amd64] conversion sda to lvm2 questions

2007-10-13 Thread Beso
2007/10/13, Richard Freeman <[EMAIL PROTECTED]>:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Beso wrote:
> > so if i understood right i have to go with /boot and a stripped / on
> > normal disks, with / duplicated to avoid loss of startup.
>
> Uh - unless you don't have enough space on one drive I'd mirror root -
> not stripe it.  Ditto for boot - if you are willing to do raid you can
> boot a mirrored /boot just fine.


can i use raid even if i got a single hd and a non raid board?! i think i
missed this thing. i knew that i could use raid on 2 separate disks of the
same ammount and only if i had a raid compatible board (with hardware or
software) but i didn't know that you could use it also on a single disk.


> > so the only think to do is find a good backup utility that is able to
> > make a copy of the entire system. if i copy the system by hand from a
> > live-cd would that work? if so, what should i avoid to copy?
> >
>
> You can just copy files from a live CD.  Actually, I've copied them from
> a running system - granted in single-user mode for the more critical
> stuff.  I just used cp -a without much issue, but there might be some
> advantages to using tar (it might handle stuff like mountpoints and hard
> links and device nodes and FIFOs and stuff like that better - I'm not
> sure about that offhand).
>
> If you copy and leave the original data intact it is pretty easy to
> recover.  I just moved data partition by partition and remounted on my
> existing root as I went along - slowly transforming my existing disk
> arrangement into my future setup.  I didn't have too much downtime
> except for the final cutover of the root filesystem.


i tried to copy the system some time ago and found out that there are files
in /dev and /tmp or /var/tmp that have an enormous dimension. i have left
them behind and then got an unusable system for some reason. the copy i had
was from a livecd with the cp -p to preserve ownership and permission.
for what i know from /dev i have only to get /dev/null and /dev/console and
let all others devices be created by udev. from /tmp instead i should not
copy anything and from /var/tmp i should copy only the ccache. are my
suppositions correct?

-BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.7 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFHEAvtG4/rWKZmVWkRAmPBAJ4vkrTg27Y8yhARb2YqtIQhwcE1OQCffrNc
> oPg+UVL+KjHvGYtgVOZFeeM=
> =bN8k
> -END PGP SIGNATURE-
>
>


-- 
dott. ing. beso


Re: [gentoo-amd64] conversion sda to lvm2 questions

2007-10-12 Thread Richard Freeman
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Beso wrote:
> so if i understood right i have to go with /boot and a stripped / on
> normal disks, with / duplicated to avoid loss of startup.

Uh - unless you don't have enough space on one drive I'd mirror root -
not stripe it.  Ditto for boot - if you are willing to do raid you can
boot a mirrored /boot just fine.

> on root i should put /lib32 /lib64 /etc /bin /sbin /root /dev /usr
> (excluded /usr/src and /usr/local and /usr/portage) /var (i should
> exclude /var/tmp which contains a lot of stuff due to ccache dir
> configured there and /var/paludis since there i have the additional
> repos) then  on the lvm volume i should insert everything else. am i
> right? 

Well, you could do that, but /usr and /var can go on LVM instead, and
that will save you a LOT of space on /.  You can then resize /usr and
/var at will.  I like to keep /var on a separate filesystem so that it
doesn't tend to fragment everything else.

> i wonder what happens to /proc and /sys since they are loaded
> through fstab and on how much space i should have. do 5gb do the trick?

/proc and /sys don't use any real disk space - they're just mountpoints.
 I have a 1GB root and it is only 30% full - but again I put usr and var
elsewhere.

> i don't use suspend to disk since the last time i've tried it didn't
> worked with my notebook and the only suspend i can use is suspend to ram
> so i don't really need swap. i use it only when i compile some large
> stuff as kdelibs and similar since my 860+mb of ram do not fill in
> everyday use.

Well, I won't start a big discussion on this here (look in the archives
for some good discussion on this topic).  The short version is that
there are potential benefits for having swap even if you have 200GB of
RAM and only run 50MB worth of applications (the returns probably do go
away if you actually have more RAM than total storage).

> so the only think to do is find a good backup utility that is able to
> make a copy of the entire system. if i copy the system by hand from a
> live-cd would that work? if so, what should i avoid to copy?
> 

You can just copy files from a live CD.  Actually, I've copied them from
a running system - granted in single-user mode for the more critical
stuff.  I just used cp -a without much issue, but there might be some
advantages to using tar (it might handle stuff like mountpoints and hard
links and device nodes and FIFOs and stuff like that better - I'm not
sure about that offhand).

If you copy and leave the original data intact it is pretty easy to
recover.  I just moved data partition by partition and remounted on my
existing root as I went along - slowly transforming my existing disk
arrangement into my future setup.  I didn't have too much downtime
except for the final cutover of the root filesystem.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHEAvtG4/rWKZmVWkRAmPBAJ4vkrTg27Y8yhARb2YqtIQhwcE1OQCffrNc
oPg+UVL+KjHvGYtgVOZFeeM=
=bN8k
-END PGP SIGNATURE-


smime.p7s
Description: S/MIME Cryptographic Signature


Re: [gentoo-amd64] conversion sda to lvm2 questions

2007-10-12 Thread Beso
so if i understood right i have to go with /boot and a stripped / on normal
disks, with / duplicated to avoid loss of startup.
on root i should put /lib32 /lib64 /etc /bin /sbin /root /dev /usr (excluded
/usr/src and /usr/local and /usr/portage) /var (i should exclude /var/tmp
which contains a lot of stuff due to ccache dir configured there and
/var/paludis since there i have the additional repos) then  on the lvm
volume i should insert everything else. am i right? i wonder what happens to
/proc and /sys since they are loaded through fstab and on how much space i
should have. do 5gb do the trick?
i don't use suspend to disk since the last time i've tried it didn't worked
with my notebook and the only suspend i can use is suspend to ram so i don't
really need swap. i use it only when i compile some large stuff as kdelibs
and similar since my 860+mb of ram do not fill in everyday use.
so the only think to do is find a good backup utility that is able to make a
copy of the entire system. if i copy the system by hand from a live-cd would
that work? if so, what should i avoid to copy?

2007/10/12, Daniel Gryniewicz <[EMAIL PROTECTED]>:
>
>
> On Fri, 2007-10-12 at 20:35 +0200, Bernhard Auzinger wrote:
>
> >
> > I do not have raid but I run LVM2 (on amd64) and I'm completely
> satisfied with
> > it. I would never go back. It's just nice to be able to organize one's
> disk
> > space in a comfortable way.
> >
>
> /metoo
>
> Daniel
>
> --
> [EMAIL PROTECTED] mailing list
>
>


-- 
dott. ing. beso


Re: [gentoo-amd64] conversion sda to lvm2 questions

2007-10-12 Thread Daniel Gryniewicz

On Fri, 2007-10-12 at 20:35 +0200, Bernhard Auzinger wrote:

> 
> I do not have raid but I run LVM2 (on amd64) and I'm completely satisfied 
> with 
> it. I would never go back. It's just nice to be able to organize one's disk 
> space in a comfortable way.
> 

/metoo

Daniel

-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-amd64] conversion sda to lvm2 questions

2007-10-12 Thread Bernhard Auzinger
Am Donnerstag 11 Oktober 2007 schrieb Beso:
> i'd like to commute my laptop system to lvm2, but before doing that i'd
> like some hints.
> first, i'd like to know if there's a way of passing an existing gentoo
> installation on a hda disk going through the sda stack (i needed to do that
> cause it was the only thing that fixed a problem with my ata disk going
> only on udma-33 after kernel 2.20) with sata-pata piix controller which is
> still experimental. i've taken a look around but haven't actually seen a
> document explaining if it is possible to do that and how to do that.
> second, i'd like to know if there's a need for a raid enabled motherboard
> and more than one disk to go on lvm. i only have a 100gb disk that i'd like
> to convert to lvm with no raid.
> and last, does it make sense doing a passage to lvm? i currently run into
> some problems with my root partition that gets filled and that i always
> have to watch the free space on it, so if i don't pass to raid i'll try to
> duplicate the partition on a greater one.
> i was forgetting: i'd like to use it on amd64. is there any problem? i have
> seen around some problems with lvm and amd64 some of them marked as solved,
> so i'd like to know if there could be problems with this arch.
> thanks for your help.

I do not have raid but I run LVM2 (on amd64) and I'm completely satisfied with 
it. I would never go back. It's just nice to be able to organize one's disk 
space in a comfortable way.

LG
Bernhard
-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-amd64] conversion sda to lvm2 questions

2007-10-12 Thread Richard Freeman
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

> Beso wrote:
>> second, i'd like to know if there's a need for a raid enabled
>> motherboard and more than one disk to go on lvm. i only have a 100gb
>> disk that i'd like to convert to lvm with no raid.

I recommend using software RAID unless you go all the way and get one of
those really fancy (expensive) RAID cards.  Honestly, software RAID has
some advantages over even the expensive setups, although a few
disadvantages as well.  I definitely wouldn't use the RAID built-into a
motherboard - it is effectively software RAID anyway and you're tossing
the flexibility of linux software RAID.

And LVM works fine without RAID - I've used it that way without issue at
all.  Of course, you have no protection so if you have a partition split
across two disks without RAID you lose data no matter which drive fails.

LVM is all about taking one pool of block devices and chopping it up
into a different pool of block devices - that's all.  You could run LVM2
on a floppy disk, on a USB drive, or whatever.  You could use LVM2 to
combine a floopy disk, an mp3-player, and a USB flash drive into a
single storage pool and then split it into a whole bunch of read-only
partitions.  It really has nothing to do with RAID other than the fact
that a RAID gives you one really big block device that is inconvenient
to use on its own.

One thing I haven't done is run boot/root on LVM2 - you might want to
look into that.  It might work with a initrd - I never bothered with
those so I keep it simple.  Besides, I keep little to nothing on my 1GB
root partition so it never fills up (root only contains /bin, /sbin,
/root, /lib, and /etc).


>> and last, does it make sense doing a passage to lvm? i currently run
>> into some problems with my root partition that gets filled and that i
>> always have to watch the free space on it, so if i don't pass to raid
>> i'll try to duplicate the partition on a greater one.

I'd recommend lvm for anybody doing anything at all.  It gives you a
whole lot more flexibility with your disk space.  If all your data is on
lvm and you want to add a raid later, or just add some new non-raid
drives, moving your data around becomes trivial (even with the system
running in full production).  Growing and shrinking partitions is
trivial as long as your filesystem supports it (I tend to use ext3 for
this reason - I don't think anything else supports both growing and
shrinking).

>> i was forgetting: i'd like to use it on amd64. is there any problem? i
>> have seen around some problems with lvm and amd64 some of them marked
>> as solved, so i'd like to know if there could be problems with this arch.
>> thanks for your help.

Maybe in the early dawns of time there were problems with lvm and amd64,
but I haven't experienced them.

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHD1KnG4/rWKZmVWkRAmowAJ9zk0Y71XPxfnopJY2El45nu5GpXgCgldZg
SiSjzsVfBCcDwy5UtE6Cj1I=
=CPm6
-END PGP SIGNATURE-


smime.p7s
Description: S/MIME Cryptographic Signature


Re: [gentoo-amd64] conversion sda to lvm2 questions

2007-10-11 Thread Mark Haney

Beso wrote:
i'd like to commute my laptop system to lvm2, but before doing that 
i'd like some hints.
first, i'd like to know if there's a way of passing an existing gentoo 
installation on a hda disk going through the sda stack (i needed to do 
that cause it was the only thing that fixed a problem with my ata disk 
going only on udma-33 after kernel 2.20) with sata-pata piix 
controller which is still experimental. i've taken a look around but 
haven't actually seen a document explaining if it is possible to do 
that and how to do that.
second, i'd like to know if there's a need for a raid enabled 
motherboard and more than one disk to go on lvm. i only have a 100gb 
disk that i'd like to convert to lvm with no raid.
and last, does it make sense doing a passage to lvm? i currently run 
into some problems with my root partition that gets filled and that i 
always have to watch the free space on it, so if i don't pass to raid 
i'll try to duplicate the partition on a greater one.
i was forgetting: i'd like to use it on amd64. is there any problem? i 
have seen around some problems with lvm and amd64 some of them marked 
as solved, so i'd like to know if there could be problems with this arch.

thanks for your help.

--
dott. ing. beso 
Here's my $0.02.  LVM is great is you need better fault tolerance.  i.e. 
a RAID setup.  I have LVM volumes on our SAN (20TB or so @ RAID 5) and I 
have less trouble out of it than a couple of RAID systems I have that 
are straight xfs.  That said I do not know about the first part, I've 
never tried it.  For the second part, a RAID enabled MB would be fine if 
you plan on going RAID at some point.  I don't normally get my RAID on 
the motherboard simply because I have more control over what controller 
to put in the system to make sure it's compatible with various flavors 
of linux.  I run LVM at home in a RAID5 config and I've had to extend / 
a couple of times, so it is beneficial in that respect.  You can do that 
as well with xfs or a clustered fs (like gfs from RH), but LVMs seem to 
be a little more painless in my experience.


I run almost exclusively 64-bit systems and distros from *BSD to SuSE to 
Fedora (and gentoo) and I've never seen any problem at all with LVM in a 
64-bit environment.  My SAN runs on a dual opteron box and it handles 
2TB of data a day with no trouble out of LVM.


HTH.


--
Mark Haney
Sr. Systems Administrator   
ERC Broadband


--
[EMAIL PROTECTED] mailing list