FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 04-13-2012, 01:23 AM
Dale
 
Default About ready to move /usr, /var and /home to LVM.

Dale wrote:
> Howdy,
>
> Well, it appears we got the init thingy working. I'm about ready to
> move things around since one of my drives is about full and I need a
> spare to move things around with. I use cp -a to copy things while
> booted from a USB stick do hicky. So far, that has always worked and is
> pretty fast. I do have a question tho.
>
> When I copy this over, do I still need to copy over null, console and
> such to /dev? I know I don't need everything in /dev but do recall
> needing those in the past. Has this changed since I'm using the init
> thingy? Am I forgetting one? I thought there was three.
>
> Anything else that could be a gotcha? I plan to move this twice. Once
> to the spare drive, repartition the OS drive then copy things back over
> again. It's been a while and with LVM about to be used, I hope it is
> the last time.
>
> Thanks.
>
> Dale
>
> :-) :-)
>


One more question. Currently /usr is on / and that is the way it was
when I built the init thingy. Do I need to rebuild the init thingy so
that it knows /usr is on a separate partition and will mount it or will
it know that when it reboots?

Thanks again for all the help. Already headed off a couple problems.

Dale

:-) :-)

--
I am only responsible for what I said ... Not for what you understood or
how you interpreted my words!

Miss the compile output? Hint:
EMERGE_DEFAULT_OPTS="--quiet-build=n"
 
Old 04-13-2012, 04:52 AM
Matthew Marlowe
 
Default About ready to move /usr, /var and /home to LVM.

fyi, as someone who has played around quite a bit with most of the
ways to configure a home workstation, I find the best config currently
is:

Dedicated Fast Enterprise 2TB drive -> /, swap, and /boot (ext4)
Six 2TB Reliable SATA Drives in RAID10 -> /home (ext4 with appropriate
chunksize/etc)
Two 2TB Reliable SATA Drives in LVM VG -> /archive, other lvm volumes
I can afford to lose and may need to change sizes for.

No worrying about any bootup complications/initrd or seperate /usr or
/var on workstation, all the important personal data is on reliable
storage, lots of free space for big projects. Backups are on separate
disks from data.
Ext4 over RAID seem happier without lvm. Maybe a few years down the
road btrfs will be complete, I'll be able to switch to that.

Only complications of above is a) careful monitoring of boot disk, b)
with so many drives, chassis needs good air flow/power, and c) unless
/tmp or /var put on lvm, all gentoo compiles are limited by i/o of
boot disk (this isn't a problem for me now, but perhaps when I upgrade
to faster cpus with more cores..).

On Thu, Apr 12, 2012 at 6:23 PM, Dale <rdalek1967@gmail.com> wrote:
> Dale wrote:
>> Howdy,
>>
>> Well, it appears we got the init thingy working. *I'm about ready to
>> move things around since one of my drives is about full and I need a
>> spare to move things around with. *I use cp -a to copy things while
>> booted from a USB stick do hicky. *So far, that has always worked and is
>> pretty fast. *I do have a question tho.
>>
>> When I copy this over, do I still need to copy over null, console and
>> such to /dev? *I know I don't need everything in /dev but do recall
>> needing those in the past. *Has this changed since I'm using the init
>> thingy? *Am I forgetting one? *I thought there was three.
>>
>> Anything else that could be a gotcha? *I plan to move this twice. *Once
>> to the spare drive, repartition the OS drive then copy things back over
>> again. *It's been a while and with LVM about to be used, I hope it is
>> the last time.
>>
>> Thanks.
>>
>> Dale
>>
>> :-) *:-)
>>
>
>
> One more question. *Currently /usr is on / and that is the way it was
> when I built the init thingy. *Do I need to rebuild the init thingy so
> that it knows /usr is on a separate partition and will mount it or will
> it know that when it reboots?
>
> Thanks again for all the help. *Already headed off a couple problems.
>
> Dale
>
> :-) *:-)
>
> --
> I am only responsible for what I said ... Not for what you understood or
> how you interpreted my words!
>
> Miss the compile output? *Hint:
> EMERGE_DEFAULT_OPTS="--quiet-build=n"
>



--
Matthew Marlowe
matt@professionalsysadmin.com
https://www.twitter.com/deploylinux
1-805-857-9144
 
Old 04-13-2012, 08:01 AM
Paul Colquhoun
 
Default About ready to move /usr, /var and /home to LVM.

On Thu, 12 Apr 2012 22:58:03 Nikos Chantziaras wrote:
> On 12/04/12 22:49, Dale wrote:
> > Howdy,
> >
> > Well, it appears we got the init thingy working. I'm about ready to
> > move things around since one of my drives is about full and I need a
> > spare to move things around with. I use cp -a to copy things while
> > booted from a USB stick do hicky. So far, that has always worked and is
> > pretty fast. I do have a question tho.
> >
> > When I copy this over, do I still need to copy over null, console and
> > such to /dev? I know I don't need everything in /dev but do recall
> > needing those in the past. Has this changed since I'm using the init
> > thingy? Am I forgetting one? I thought there was three.
> >
> > Anything else that could be a gotcha? I plan to move this twice. Once
> > to the spare drive, repartition the OS drive then copy things back over
> > again. It's been a while and with LVM about to be used, I hope it is
> > the last time.
>
> Make sure this is really what you want. If *any* of the disks in the
> LVM goes bad, you lose everything, not just the data on that single disk.

Actually, that is not necessarily true. When you create the logical volume
you can specify that it is mirrored onto multiple physical drives, assuming
you have enough space on more than one drive.

See the "-m, --mirrors Mirrors" option in 'man lvcreate'

--
Reverend Paul Colquhoun, ULC. http://andor.dropbear.id.au/~paulcol
Before you criticize someone, you should walk a mile in their shoes.
Then, when you do, you'll be a mile away, and you'll have their shoes.
 
Old 04-13-2012, 09:58 AM
William Kenworthy
 
Default About ready to move /usr, /var and /home to LVM.

On Thu, 2012-04-12 at 22:58 +0300, Nikos Chantziaras wrote:
> On 12/04/12 22:49, Dale wrote:
> > Howdy,
> >
> > Well, it appears we got the init thingy working. I'm about ready to
> > move things around since one of my drives is about full and I need a
> > spare to move things around with. I use cp -a to copy things while
> > booted from a USB stick do hicky. So far, that has always worked and is
> > pretty fast. I do have a question tho.
> >
> > When I copy this over, do I still need to copy over null, console and
> > such to /dev? I know I don't need everything in /dev but do recall
> > needing those in the past. Has this changed since I'm using the init
> > thingy? Am I forgetting one? I thought there was three.
> >
> > Anything else that could be a gotcha? I plan to move this twice. Once
> > to the spare drive, repartition the OS drive then copy things back over
> > again. It's been a while and with LVM about to be used, I hope it is
> > the last time.
>
> Make sure this is really what you want. If *any* of the disks in the
> LVM goes bad, you lose everything, not just the data on that single disk.
>
>

Not necessarily so ... you can remove a failed drive and only lose the
data on that drive - the data on the other drives is usually accessible.
If a drive is in the process of failing you have more options to move
the data to another drive. If you dont have lvm ... the data on that
drive is toast anyway.

Downside, is you have to be aware that you are using LVM and respond
accordingly ... go at it the wrong way and it will be you who have lost
the data (on the whole set of disks), not LVM. Non LVM is simpler, but
the gain in flexibility offsets that enormously.

I have used LVM for years now, and have had failed drives, failing
drives and add/remove drives and have resized partitions quite a few
times over that period - without losing everything. Yes, I have
sometimes lost data on a drive before I could move it off ... but I look
at it from the point of view that without LVM, I would not have had a
chance to save what I did manage to get.

BillK
 
Old 04-13-2012, 02:51 PM
Dale
 
Default About ready to move /usr, /var and /home to LVM.

I have ran into a issue here. I copied everything over to sdb, my temp
drive. When I try to boot it, it still boots from sda which is the
primary drive. I can not get it to boot from the copy. I did update
the fstab file to point to the new sdb partitions, I use labels for that
and they have different names. I also edited grub and told it root was
sdb2. When I boot, everything mounted is sda.

I tried chrooting in and building a init thingy, still boots to sdb.

What gives here?

Name Flags Part TypeFS Type [Label] Size (MB)
-------------------------------------------------------------------
sdb1 Primary ext2 [boot-250g] 197.41
sdb2 Primary ext4 [root-250g] 74998.11
sdb5 Logical ext4 [home-250g] 50001.48



LABEL=boot-250g /boot ext2 defaults 1 2
LABEL=root-250g / ext4 defaults 0 1
LABEL=home-250g /home ext4 defaults 0 2


Those are from the copy. Here is grub:

title=Initramfs-new_drive
root (hd0,0)
kernel /bzImage-3.3.1-1 root=/dev/sdb2 init=/sbin/init nox
initrd /initramfs-3.3.1-1-tmp.img

I have done this in the past and it worked but not now. Is this the
init thingy mounting sda stuff and then Gentoo carries on from there?
If so, how do I tell the init thingy to point to sdb stuff?

Thoughts?

Dale

:-) :-)

--
I am only responsible for what I said ... Not for what you understood or
how you interpreted my words!

Miss the compile output? Hint:
EMERGE_DEFAULT_OPTS="--quiet-build=n"
 
Old 04-13-2012, 03:12 PM
 
Default About ready to move /usr, /var and /home to LVM.

William Kenworthy <billk@iinet.net.au> wrote:

> On Thu, 2012-04-12 at 22:58 +0300, Nikos Chantziaras wrote:
> > On 12/04/12 22:49, Dale wrote:
> > > Howdy,
> > >
> > > Well, it appears we got the init thingy working. I'm about ready to
> > > move things around since one of my drives is about full and I need a
> > > spare to move things around with. I use cp -a to copy things while
> > > booted from a USB stick do hicky. So far, that has always worked and is
> > > pretty fast. I do have a question tho.
> > >
> > > When I copy this over, do I still need to copy over null, console and
> > > such to /dev? I know I don't need everything in /dev but do recall
> > > needing those in the past. Has this changed since I'm using the init
> > > thingy? Am I forgetting one? I thought there was three.
> > >
> > > Anything else that could be a gotcha? I plan to move this twice. Once
> > > to the spare drive, repartition the OS drive then copy things back over
> > > again. It's been a while and with LVM about to be used, I hope it is
> > > the last time.
> >
> > Make sure this is really what you want. If *any* of the disks in the
> > LVM goes bad, you lose everything, not just the data on that single disk.
> >
> >
>
> Not necessarily so ... you can remove a failed drive and only lose the
> data on that drive - the data on the other drives is usually accessible.
> If a drive is in the process of failing you have more options to move
> the data to another drive. If you dont have lvm ... the data on that
> drive is toast anyway.
>
> Downside, is you have to be aware that you are using LVM and respond
> accordingly ... go at it the wrong way and it will be you who have lost
> the data (on the whole set of disks), not LVM. Non LVM is simpler, but
> the gain in flexibility offsets that enormously.
>
> I have used LVM for years now, and have had failed drives, failing
> drives and add/remove drives and have resized partitions quite a few
> times over that period - without losing everything. Yes, I have
> sometimes lost data on a drive before I could move it off ... but I look
> at it from the point of view that without LVM, I would not have had a
> chance to save what I did manage to get.
>

I had a bad drive, and I tried to use pvmove, but it stopped when it got
an error and would not tell me the file it had trouble with nor would
it move any data past that point -- is there a better way to recover
such data? I simply used the backup to get my data back, rather than
lvm.

--
Your life is like a penny. You're going to lose it. The question is:
How do
you spend it?

John Covici
covici@ccs.covici.com
 
Old 04-13-2012, 03:21 PM
Dale
 
Default About ready to move /usr, /var and /home to LVM.

Matthew Marlowe wrote:
> fyi, as someone who has played around quite a bit with most of the
> ways to configure a home workstation, I find the best config currently
> is:
>
> Dedicated Fast Enterprise 2TB drive -> /, swap, and /boot (ext4)
> Six 2TB Reliable SATA Drives in RAID10 -> /home (ext4 with appropriate
> chunksize/etc)
> Two 2TB Reliable SATA Drives in LVM VG -> /archive, other lvm volumes
> I can afford to lose and may need to change sizes for.
>
> No worrying about any bootup complications/initrd or seperate /usr or
> /var on workstation, all the important personal data is on reliable
> storage, lots of free space for big projects. Backups are on separate
> disks from data.
> Ext4 over RAID seem happier without lvm. Maybe a few years down the
> road btrfs will be complete, I'll be able to switch to that.
>
> Only complications of above is a) careful monitoring of boot disk, b)
> with so many drives, chassis needs good air flow/power, and c) unless
> /tmp or /var put on lvm, all gentoo compiles are limited by i/o of
> boot disk (this isn't a problem for me now, but perhaps when I upgrade
> to faster cpus with more cores..).
>


That would work IF I could afford all those drives. Right now, I have
three and one of them was given to me by another Gentoo user. I did
find a security system that has a 500Gb drive that I may use. Videos on
a drive made for videos should work fine. lol

Also, I have a Cooler Master case with lots of fans, large ones too.

Dale

:-) :-)


--
I am only responsible for what I said ... Not for what you understood or
how you interpreted my words!

Miss the compile output? Hint:
EMERGE_DEFAULT_OPTS="--quiet-build=n"
 
Old 04-13-2012, 08:35 PM
Dale
 
Default About ready to move /usr, /var and /home to LVM.

Dale wrote:
> I have ran into a issue here. I copied everything over to sdb, my temp
> drive. When I try to boot it, it still boots from sda which is the
> primary drive. I can not get it to boot from the copy. I did update
> the fstab file to point to the new sdb partitions, I use labels for that
> and they have different names. I also edited grub and told it root was
> sdb2. When I boot, everything mounted is sda.
>
> I tried chrooting in and building a init thingy, still boots to sdb.
>
> What gives here?
>
> Name Flags Part TypeFS Type [Label] Size (MB)
> -------------------------------------------------------------------
> sdb1 Primary ext2 [boot-250g] 197.41
> sdb2 Primary ext4 [root-250g] 74998.11
> sdb5 Logical ext4 [home-250g] 50001.48
>
>
>
> LABEL=boot-250g /boot ext2 defaults 1 2
> LABEL=root-250g / ext4 defaults 0 1
> LABEL=home-250g /home ext4 defaults 0 2
>
>
> Those are from the copy. Here is grub:
>
> title=Initramfs-new_drive
> root (hd0,0)
> kernel /bzImage-3.3.1-1 root=/dev/sdb2 init=/sbin/init nox
> initrd /initramfs-3.3.1-1-tmp.img
>
> I have done this in the past and it worked but not now. Is this the
> init thingy mounting sda stuff and then Gentoo carries on from there?
> If so, how do I tell the init thingy to point to sdb stuff?
>
> Thoughts?
>
> Dale
>
> :-) :-)
>


OK. I thought of something else to try. I created a new grub entry.
This is a plain entry with no init thingy at all. It looks like this:

title Gentoo no init tmp drive
kernel (hd0,0)/bzImage-3.3.1-1 root=/dev/sdb2 nox

Simple but it still boots the sda drive instead of the sdb drive. What
am I missing here? I looked in dmesg, the root=/dev/sdb2 line is in
there so grub passes it on.

This is weird. I need ideas folks. I'm running out of things to try.

Dale

:-) :-)

--
I am only responsible for what I said ... Not for what you understood or
how you interpreted my words!

Miss the compile output? Hint:
EMERGE_DEFAULT_OPTS="--quiet-build=n"
 
Old 04-14-2012, 01:21 AM
Alan McKinnon
 
Default About ready to move /usr, /var and /home to LVM.

On Fri, 13 Apr 2012 11:12:55 -0400
covici@ccs.covici.com wrote:

> I had a bad drive, and I tried to use pvmove, but it stopped when it
> got an error and would not tell me the file it had trouble with nor
> would it move any data past that point -- is there a better way to
> recover such data? I simply used the backup to get my data back,
> rather than lvm.

You can use an (expensive) data recovery expert.

What you ran into is a failing drive. You couldn't get the data off
because the drive didn't work, and that has nothing to do with LVM
whatsoever.

LVM is not a data security tool.
LVM is not a backup tool.
LVM does not cover your ass.

All that LVM does is make it easy to manipulate file system volumes,
and to easily make volumes larger than a single disk.

You still have to take all the same precautions to protect your data
that you have done without LVM.

--
Alan McKinnnon
alan.mckinnon@gmail.com
 
Old 04-14-2012, 03:46 AM
Dale
 
Default About ready to move /usr, /var and /home to LVM.

Stefan Schmiedl wrote:
> Dale,
>
> Friday, April 13, 2012, 10:35:43 PM, you wrote:
>
>>> I have ran into a issue here. I copied everything over to sdb, my temp
>>> drive. When I try to boot it, it still boots from sda which is the
>>> primary drive. I can not get it to boot from the copy. I did update
>>> the fstab file to point to the new sdb partitions, I use labels for that
>>> and they have different names. I also edited grub and told it root was
>>> sdb2. When I boot, everything mounted is sda.
>>>
>>> Those are from the copy. Here is grub:
>>>
>>> title=Initramfs-new_drive
>>> root (hd0,0)
>>> kernel /bzImage-3.3.1-1 root=/dev/sdb2 init=/sbin/init nox
>>> initrd /initramfs-3.3.1-1-tmp.img
>
> if you want to boot from /dev/sdb, why do you tell grub
> to use (hd0,0), which usually maps to /dev/sda1?
>
> I'd expect to see root (hd1,0) in there somewhere.
>
> Depending on boot flags and BIOS settings, you might still
> be using the MBR on /dev/sda.
>
> When I migrated a client's data over to a new disk a while
> ago, I basically used "tar cf - /sda | tar xf - -C /sdb" and
> then switched SATA cables before rebooting. The former /dev/sdb
> became /dev/sda and everything was fine.
>
> s.
>
>>>
>>> I have done this in the past and it worked but not now. Is this the
>>> init thingy mounting sda stuff and then Gentoo carries on from there?
>>> If so, how do I tell the init thingy to point to sdb stuff?
>>>
>>> Thoughts?
>>>
>>> Dale
>>>
>>> :-) :-)
>>>
>
>
> D> OK. I thought of something else to try. I created a new grub entry.
> D> This is a plain entry with no init thingy at all. It looks like this:
>
> D> title Gentoo no init tmp drive
> D> kernel (hd0,0)/bzImage-3.3.1-1 root=/dev/sdb2 nox
>
> D> Simple but it still boots the sda drive instead of the sdb drive. What
> D> am I missing here? I looked in dmesg, the root=/dev/sdb2 line is in
> D> there so grub passes it on.
>
> D> This is weird. I need ideas folks. I'm running out of things to try.
>
> D> Dale
>
> D> :-) :-)


I tried changing the root line and it still booted sda. Also, note that
I also tried a grub entry that doesn't even have a root line. It just
points directly to sdb.

From what I have always been told, the root line points to grub not the
root partition of the OS. Those are two different things. Correct me
if I am wrong here. That's the way I have always been told.

I'm using grub legacy here.

Dale

:-) :-)


--
I am only responsible for what I said ... Not for what you understood or
how you interpreted my words!

Miss the compile output? Hint:
EMERGE_DEFAULT_OPTS="--quiet-build=n"
 

Thread Tools




All times are GMT. The time now is 07:43 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org