Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Gentoo User (http://www.linux-archive.org/gentoo-user/)
-   -   About ready to move /usr, /var and /home to LVM. (http://www.linux-archive.org/gentoo-user/655415-about-ready-move-usr-var-home-lvm.html)

Dale 04-12-2012 07:49 PM

About ready to move /usr, /var and /home to LVM.
 
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

:-) :-)

--
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"

Nikos Chantziaras 04-12-2012 07:58 PM

About ready to move /usr, /var and /home to LVM.
 
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.

Dale 04-12-2012 08:09 PM

About ready to move /usr, /var and /home to LVM.
 
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.
>
>
>


< dale goes to figure out a way around this one. >

Thanks for that. I hadn't thought about that. If I tie two drives
together, the file system spans both drives. One dies, the whole thing
is broken as you say. Makes sense.

< scratches chin > I think I can still make this work tho. Yea, I got
a idea. It wasn't my original plan but this should work. Sure glad you
mentioned that though. THANKS MUCH !!!

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"

Michael Mol 04-12-2012 08:16 PM

About ready to move /usr, /var and /home to LVM.
 
On Thu, Apr 12, 2012 at 4:09 PM, Dale <rdalek1967@gmail.com> wrote:
> 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.
>>
>>
>>
>
>
> < dale goes to figure out a way around this one. *>
>
> Thanks for that. *I hadn't thought about that. *If I tie two drives
> together, the file system spans both drives. *One dies, the whole thing
> is broken as you say. *Makes sense.
>
> < scratches chin > * I think I can still make this work tho. *Yea, I got
> a idea. *It wasn't my original plan but this should work. *Sure glad you
> mentioned that though. *THANKS MUCH !!!

This is why I do LVM on top of a RAID device.

--
:wq

Florian Philipp 04-12-2012 09:04 PM

About ready to move /usr, /var and /home to LVM.
 
Am 12.04.2012 21:49, schrieb Dale:
> 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.
>

So, you are not just moving /usr /var and /home but also the rest of
root? In that case it is best to do something like
mount --bind / /mnt/real_root
cp -a /mnt/real_root/* /mnt/new_root

mount --bind binds only the root file system, not any other or temporary
file systems mounted on top of it (like udev, /dev/pts, etc.). That
allows you to copy your static /dev file system (as created by untaring
the stage3).

> 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
>
> :-) :-)
>

Florian Philipp 04-12-2012 09:19 PM

About ready to move /usr, /var and /home to LVM.
 
Am 12.04.2012 22:16, schrieb Michael Mol:
> On Thu, Apr 12, 2012 at 4:09 PM, Dale <rdalek1967@gmail.com> wrote:
>> 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.
>>>>
[...]
>>>>
>>>> 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.
>>>
>>
>> < dale goes to figure out a way around this one. >
>>
>> Thanks for that. I hadn't thought about that. If I tie two drives
>> together, the file system spans both drives. One dies, the whole thing
>> is broken as you say. Makes sense.
>>
>> < scratches chin > I think I can still make this work tho. Yea, I got
>> a idea. It wasn't my original plan but this should work. Sure glad you
>> mentioned that though. THANKS MUCH !!!
>
> This is why I do LVM on top of a RAID device.
>

Or if you are short on disk space, you can also use LVM to mirror just
/home.

Neil Bothwick 04-12-2012 10:30 PM

About ready to move /usr, /var and /home to LVM.
 
On Thu, 12 Apr 2012 14:49:10 -0500, Dale wrote:

> 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.

There's no need for the second copy. Create the VG on the spare drive and
copy everything over. Then you can reboot into the system. Now you can
remove the old partitions from the main drive and create a single PV in
the space freed (reboot after repartitioning to make sure you're using
the new partition table.

Then add the new PV to the VG you are using and use pvmove to transfer
everything from the spare drive to the main one. You can use the system
while doing this, so there is only half the downtime compared with doing
two copies.


--
Neil Bothwick

Some cause happiness wherever they go. Others whenever they go.

Dale 04-13-2012 12:52 AM

About ready to move /usr, /var and /home to LVM.
 
Florian Philipp wrote:
> Am 12.04.2012 22:16, schrieb Michael Mol:
>> On Thu, Apr 12, 2012 at 4:09 PM, Dale <rdalek1967@gmail.com> wrote:
>>> 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.
>>>>>
> [...]
>>>>>
>>>>> 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.
>>>>
>>>
>>> < dale goes to figure out a way around this one. >
>>>
>>> Thanks for that. I hadn't thought about that. If I tie two drives
>>> together, the file system spans both drives. One dies, the whole thing
>>> is broken as you say. Makes sense.
>>>
>>> < scratches chin > I think I can still make this work tho. Yea, I got
>>> a idea. It wasn't my original plan but this should work. Sure glad you
>>> mentioned that though. THANKS MUCH !!!
>>
>> This is why I do LVM on top of a RAID device.
>>
>
> Or if you are short on disk space, you can also use LVM to mirror just
> /home.
>


I got backups of most important stuff but my almost full disk is videos.
LOTS of videos. I even found Gilligans Island. lol

Right now, I have a 160Gb which is for the OS itself, a 250Gb which is
what I plan to copy to and back from and a 750Gb for the videos. I plan
to buy a 2Tb or so drive as soon as I can. Buggers are pricey for me.
I want to get a good one since I have no way to back that up, yet. I
plan to later.

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"

Dale 04-13-2012 12:56 AM

About ready to move /usr, /var and /home to LVM.
 
Florian Philipp wrote:
> Am 12.04.2012 21:49, schrieb Dale:
>> 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.
>>
>
> So, you are not just moving /usr /var and /home but also the rest of
> root? In that case it is best to do something like
> mount --bind / /mnt/real_root
> cp -a /mnt/real_root/* /mnt/new_root
>
> mount --bind binds only the root file system, not any other or temporary
> file systems mounted on top of it (like udev, /dev/pts, etc.). That
> allows you to copy your static /dev file system (as created by untaring
> the stage3).
>
>> 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
>>
>> :-) :-)
>>
>
>


Right now I have this:

/
/boot
/home
/usr/portage
/var

I'm going to make a backup of /home before I do anything. Just in case.
I also plan to unmount my drive with the videos too.

Good idea. May give this a try. See what all I can break here in a
bit. lol

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"

Dale 04-13-2012 12:58 AM

About ready to move /usr, /var and /home to LVM.
 
Neil Bothwick wrote:
> On Thu, 12 Apr 2012 14:49:10 -0500, Dale wrote:
>
>> 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.
>
> There's no need for the second copy. Create the VG on the spare drive and
> copy everything over. Then you can reboot into the system. Now you can
> remove the old partitions from the main drive and create a single PV in
> the space freed (reboot after repartitioning to make sure you're using
> the new partition table.
>
> Then add the new PV to the VG you are using and use pvmove to transfer
> everything from the spare drive to the main one. You can use the system
> while doing this, so there is only half the downtime compared with doing
> two copies.
>
>


Florian has a good idea too. Dang, both of these sound good. Well, I
got to think on this one. ;-)

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"


All times are GMT. The time now is 01:37 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.