public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Dale <dalek@exceedtech.net>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user]  Re: Resize /
Date: Mon, 20 Nov 2006 23:55:05 -0600	[thread overview]
Message-ID: <456294B9.3040502@exceedtech.net> (raw)
In-Reply-To: <200611200847.06963.ext-dirk.heinrichs@nokia.com>

[-- Attachment #1: Type: text/plain, Size: 6101 bytes --]

Dirk Heinrichs wrote:
> Am Freitag, 17. November 2006 23:30 schrieb ext Dale:
>
>   
>> Somewhat on topic here.  How hard is it to do this with no previous
>> knowledge of how it works?  I am constantly running into the same thing
>> the OP is and having to move things around.  Currently I have two 80GB
>>
>> drives.  Here is my partition scheme at the moment:
>>     
>>> root@smoker / # mount
>>> /dev/hda6 on / type reiserfs (rw)
>>> /dev/hda1 on /boot type reiserfs (rw,noatime,notail)
>>> /dev/hda7 on /home type reiserfs (rw)
>>> /dev/hda8 on /usr type reiserfs (rw)
>>> /dev/hda9 on /usr/portage type reiserfs (rw)
>>> /dev/hda10 on /data type reiserfs (rw)
>>> root@smoker / #
>>> root@smoker / # df
>>> Filesystem           1K-blocks      Used Available Use% Mounted on
>>> /dev/hda6              9765136   1896004   7869132  20% /
>>> /dev/hda1               146612     45880    100732  32% /boot
>>> /dev/hda7              9765136   1236144   8528992  13% /home
>>> /dev/hda8              9765136   4269660   5495476  44% /usr
>>> /dev/hda9              5859272   3052004   2807268  53% /usr/portage
>>> /dev/hda10            43762436  10667796  33094640  25% /data
>>> root@smoker / #
>>>       
>> Just looking to get a better grasp on this since it sounds like
>> something I need to try.
>>     
>
> OK, here's my proposal: First, decide which volume management system to use 
> (LVM or EVMS). LVM is just one more volume management tool which you would 
> have to learn (beside fdisk, mkfs.*, raid tools, ...), while EVMS does it 
> all, and more. Then, do the real work:
>   

Which one is better and good for someone new to this?  I'm fairly
descent at Linux.  Just thought I would warn you I am not a guru, yet. 
;-)  I'm working on it though.
> You mentioned you have two 80G disks, but in the output above I only see one 
> in use. If this is really the case, you could start converting to LVM/EVMS 
> with the second one (assuming you don't use SW RAID, which I have no 
> knowledge of). Emerge LVM or EVMS, depending on your choice, and make sure 
> you have CONFIG_BLK_DEV_DM in your kernel. Then either switch to runlevel 1 
> or use a LiveCD to do the real work.
>   

I do have two 80GB drives.  One is a Maxtor and one is a Western
Digital.  The Maxtor is faster since it has more cache.  It is hda and
the one I boot off of.  I use the other to back up on before a major
upgrade, like gcc or something that can really screw things up.  Even
did it once before a --depclean too.  Never needed it but I had it if I
did.  I usually boot the Gentoo CD and mount the partitions and just do
a cp -av and let it roll by.  I never could master that tar thing others
use. 
> 1) Create one big partition on the second disk, with type LVM
> 2) Create a volume group from this partition, choose whatever name you like.
> 3) Create logical volumes inside this volume group, one for each partition 
> you have on hda, except /boot and /, create filesystems on them and mount 
> them somewhere. From the values above, you still have /var and /opt inside 
> hda6. Create new LV's for these two also.
> 4) Copy over the data partitionwise, like: cd /home && tar -clf - .|
> tar -C /mnt/home -xBpvf -
> 5) Change fstab accordingly and check RC_VOLUME_ORDER in /etc/conf.d/rc.
> 6) Rename your old /var and /opt (to /var.save and /opt.save) and recreate 
> them as empty directories (you will mount the new LV's there).
> 7) Since you didn't touch /boot and /, you should now be able to boot with 
> working LVM/EVMS setup. If this is the case, we can now do some changes on 
> hda.
> 8) You will need to boot a LiveCD now, for shrinking hda6 to a reasonable 
> amount (256M).
> 9) Create a (temporary) LV, create a filesystem, mount it somewhere and use 
> tar as above to copy over / to the new filesystem.
> 10) Repartition hda: Delete all partitions except hda1 (/boot). Create 2 new 
> ones, hda2 (/, 256M) and hda3 (rest of the disk, type LVM), make a 
> filesystem on hda2 and mount it.
> 11) Delete the old (renamed) /var.save and /opt.save from the temporary copy 
> of /, then use tar again to copy your / back to hda1.
> 12) Add hda3 to the already existing volume group.
> 13) (Optional) You could now move all logical volumes to hda3 and afterwards 
> delete hdb1 from the volume group. This would enable you to setup SW RAID 1 
> (Mirroring) in the future. If you want to use all 160G, keep it as it is.
> 14) reboot, without LiveCD. Hopefully your system should be up and running 
> now.
> 15) Delete the temporary LV from step 9).
>
>
> Enjoy your new flexibility.
>
> Bye...
>
> 	Dirk
>   

OK.  I did a cfdisk /dev/hdb and I found type "8E Linux LVM" and I
assume that it is the one you mentioned.  I have not changed anything
just yet.  I'm just exploring the idea here.  So . .  I make a boot
partition like I normally would, hda1.  Then create another partition
that is the LVM type, primary or logical or doesn't matter?  Is that
correct?  Is that all I have to do with cfdisk?  I assume the rest is
done elsewhere.  This is the part I am trying to get my head wrapped
around.  I can't seem to figure out how it gets split up quite yet. 
Maybe you can "dummy" it down a bit for me?  LOL

Can I also assume the 2006 Gentoo CD supports this?  You also realize
this is going to screw up my uptime?  It sounds like this may be worth
it though.  Alexander mentioned a snapshot.  Is that like making a
backup?  Sounds like a windoze restore point or whatever they call that
thing.  I don't use windoze at all here.  I just mess with everybody
elses crap. 

My plan, copy my OS over to hdb, then set up LVM or EVMS on hda and then
copy it back.  I like my Maxtor since it is faster.  All this from the
Gentoo CD of course.  I'm OK with that Gentoo CD.  It only took me about
three times to get my install to boot.  O_O  I plan to eventually use
all 160GB of space but the mirror sounds neat too.  I'm on dial-up so I
can't fill up a hard drive to fast anyway.  Sucky 26K.  :-(

Thanks for the help.  Links are welcome.  I try to read as much as I can. 

Dale

:-)  :-)  :-)

[-- Attachment #2: Type: text/html, Size: 6980 bytes --]

  reply	other threads:[~2006-11-21  6:04 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-16 17:55 [gentoo-user] Resize / jakommo
2006-11-16 18:02 ` Ryan Crisman
2006-11-16 18:03 ` Richard Fish
2006-11-16 18:10 ` Neil Bothwick
2006-11-16 18:28 ` Alan McKinnon
2006-11-16 18:46 ` geistteufel
2006-11-16 20:53   ` jakommo
2006-11-16 21:30     ` Alex Schuster
2006-11-16 21:56       ` jakommo
2006-11-17  7:01         ` Dirk Heinrichs
2006-11-17 19:43           ` [gentoo-user] " Alexander Skwar
2006-11-17 22:30             ` Dale
2006-11-18 17:54               ` [gentoo-user] " Alexander Skwar
2006-11-19  1:46                 ` Dale
2006-11-19  9:54                   ` [gentoo-user] LVM (was: Resize /) Alexander Skwar
2006-11-19 10:16                     ` [gentoo-user] LVM Dale
2006-11-19 17:53                       ` [gentoo-user] LVM Alexander Skwar
2006-11-20  6:54                     ` [gentoo-user] LVM (was: Resize /) Dirk Heinrichs
2006-11-20  7:47               ` [gentoo-user] Re: Resize / Dirk Heinrichs
2006-11-21  5:55                 ` Dale [this message]
2006-11-21  6:44                   ` geistteufel
2006-11-21  7:20                   ` Dirk Heinrichs
2006-11-21  8:38                     ` Dale
2006-11-21  9:01                       ` Dirk Heinrichs
2006-11-21  9:56                         ` Dirk Heinrichs
2006-11-21 12:36                         ` Dale
2006-11-21 14:33                           ` Dirk Heinrichs
2006-11-21 19:00                             ` Dale
2006-11-22  1:37                               ` Dale
2006-11-23  0:26                                 ` Dale
2006-11-22  7:53                               ` Dirk Heinrichs
2006-11-21  9:34                       ` Geistteufel
2006-11-21 10:14                         ` Dirk Heinrichs
2006-11-21 10:47                           ` Geistteufel
2006-11-23 11:38                     ` [gentoo-user] EVMS (was: Resize /) Alexander Skwar
2006-11-23 11:55                       ` [gentoo-user] EVMS Dale
2006-11-23 13:20                       ` [gentoo-user] EVMS (was: Resize /) Dirk Heinrichs
2007-01-03  4:01                         ` [gentoo-user] EVMS Dale
2006-11-17  6:53 ` [gentoo-user] Re: Resize / Alexander Skwar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=456294B9.3040502@exceedtech.net \
    --to=dalek@exceedtech.net \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox