From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1GmOkR-0000yW-O9 for garchives@archives.gentoo.org; Tue, 21 Nov 2006 06:04:48 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.8/8.13.8) with SMTP id kAL5xssg015598; Tue, 21 Nov 2006 05:59:54 GMT Received: from mirus.exceedtech.net (ns0.exceedtech.net [70.151.169.5]) by robin.gentoo.org (8.13.8/8.13.8) with ESMTP id kAL5tFj0013976 for ; Tue, 21 Nov 2006 05:55:16 GMT Received: from [65.144.132.171] (0-2pool132-171.nas2.greenwood1.ms.us.da.qwest.net [65.144.132.171]) by mirus.exceedtech.net (8.12.8/8.12.8) with ESMTP id kAL5vvqQ014624 for ; Mon, 20 Nov 2006 23:57:58 -0600 Message-ID: <456294B9.3040502@exceedtech.net> Date: Mon, 20 Nov 2006 23:55:05 -0600 From: Dale User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.8) Gecko/20061110 SeaMonkey/1.0.6 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Re: Resize / References: <794831050611160955s2cd593f0pb2c1fdb8b6057bcc@mail.gmail.com> <3172466.NERXbHXypP@m-id.message-center.info> <455E381E.7000206@exceedtech.net> <200611200847.06963.ext-dirk.heinrichs@nokia.com> In-Reply-To: <200611200847.06963.ext-dirk.heinrichs@nokia.com> Content-Type: multipart/alternative; boundary="------------060804050800090803010105" X-Archives-Salt: 0d7b0fdc-8278-46f7-a58c-15e7d4894ab0 X-Archives-Hash: 668eefc28442994ce8f65ad90f16d639 This is a multi-part message in MIME format. --------------060804050800090803010105 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 :-) :-) :-) --------------060804050800090803010105 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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

:-)  :-)  :-)
--------------060804050800090803010105-- -- gentoo-user@gentoo.org mailing list