public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user]  migrating to LVM
@ 2007-10-17  5:20 Thufir
  2007-10-17  5:56 ` Dirk Heinrichs
  0 siblings, 1 reply; 13+ messages in thread
From: Thufir @ 2007-10-17  5:20 UTC (permalink / raw
  To: gentoo-user

I have a working gentoo install which I don't want to muck with too much, 
except to change over to LVM.  I understand that I can use dd so that 
everything will be in a LVM, but I'm unclear on the outline.  The LVM is 
created, the root partition is copied over to the LVM, then grub, fstab 
and initrd and edited to reflect the changes?


arrakis ~ # 
arrakis ~ # fdisk /dev/hda

The number of cylinders for this disk is set to 9729.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1        1912    15358108+  83  Linux
/dev/hda2            1913        1925      104422+  83  Linux
/dev/hda3            1926        9729    62685630   8e  Linux LVM

Command (m for help): q

arrakis ~ # 
arrakis ~ # fdisk /dev/hdb

The number of cylinders for this disk is set to 59582.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/hdb: 30.7 GB, 30750031872 bytes
16 heads, 63 sectors/track, 59582 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               1         203      102280+  83  Linux
/dev/hdb2             204        2109      960624   82  Linux swap / 
Solaris
/dev/hdb3            2110       59579    28964880   83  Linux

Command (m for help): q

arrakis ~ # 
arrakis ~ # date
Tue Oct 16 22:10:22 PDT 2007
arrakis ~ # 



thanks,

Thufir

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-user]  migrating to LVM
  2007-10-17  5:20 [gentoo-user] migrating to LVM Thufir
@ 2007-10-17  5:56 ` Dirk Heinrichs
  2007-10-17 15:35   ` Albert Hopkins
  0 siblings, 1 reply; 13+ messages in thread
From: Dirk Heinrichs @ 2007-10-17  5:56 UTC (permalink / raw
  To: gentoo-user

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

Am Mittwoch, 17. Oktober 2007 schrieb ext Thufir:

> I have a working gentoo install which I don't want to muck with too much,
> except to change over to LVM.

OK.

> I understand that I can use dd so that 

No, you can't. Use tar, cpio or rsync.

> everything will be in a LVM, but I'm unclear on the outline.  The LVM is
> created,

How do you create an LVM (Logical Volume Manager)? Or do you mean LV 
(Logical Volume)?

> the root partition is copied over to the LVM, then grub, fstab 
> and initrd and edited to reflect the changes?
>
> Disk /dev/hda: 80.0 GB, 80026361856 bytes
> 255 heads, 63 sectors/track, 9729 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
>
>    Device Boot      Start         End      Blocks   Id  System
> /dev/hda1               1        1912    15358108+  83  Linux
> /dev/hda2            1913        1925      104422+  83  Linux
> /dev/hda3            1926        9729    62685630   8e  Linux LVM

I guess 1 and 2 are / and /boot?

> Disk /dev/hdb: 30.7 GB, 30750031872 bytes
> 16 heads, 63 sectors/track, 59582 cylinders
> Units = cylinders of 1008 * 512 = 516096 bytes
>
>    Device Boot      Start         End      Blocks   Id  System
> /dev/hdb1               1         203      102280+  83  Linux
> /dev/hdb2             204        2109      960624   82  Linux swap /
> Solaris
> /dev/hdb3            2110       59579    28964880   83  Linux

Why 3 partitions?

I'm not sure I get what your problem is. If you could tell more about what 
you have (i.e. how are the partitions on those two drives used currently) 
and what you want, it would be much easier to help.

Bye...

	Dirk
-- 
Dirk Heinrichs          | Tel:  +49 (0)162 234 3408
Configuration Manager   | Fax:  +49 (0)211 47068 111
Capgemini Deutschland   | Mail: dirk.heinrichs@capgemini.com
Wanheimerstraße 68      | Web:  http://www.capgemini.com
D-40468 Düsseldorf      | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: www.keyserver.net

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-user]  migrating to LVM
  2007-10-17  5:56 ` Dirk Heinrichs
@ 2007-10-17 15:35   ` Albert Hopkins
  2007-10-18  7:08     ` [gentoo-user] " Thufir
  0 siblings, 1 reply; 13+ messages in thread
From: Albert Hopkins @ 2007-10-17 15:35 UTC (permalink / raw
  To: gentoo-user


On Wed, 2007-10-17 at 07:56 +0200, Dirk Heinrichs wrote:
> I'm not sure I get what your problem is. If you could tell more about
> what 
> you have (i.e. how are the partitions on those two drives used
> currently) 
> and what you want, it would be much easier to help.

Just wanted to chime in with the same thoughts.  It's not immediately
apparent what your requirements are (i.e what problem are you trying to
solve).  So any answer you get might not really fit your needs and in
the end just cause you a problems.  And then you'll hate us and say we
all suck (j/k I hope :-)

-a

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 13+ messages in thread

* [gentoo-user]  Re: migrating to LVM
  2007-10-17 15:35   ` Albert Hopkins
@ 2007-10-18  7:08     ` Thufir
  2007-10-18  8:26       ` Dirk Heinrichs
  0 siblings, 1 reply; 13+ messages in thread
From: Thufir @ 2007-10-18  7:08 UTC (permalink / raw
  To: gentoo-user

On Wed, 17 Oct 2007 10:35:13 -0500, Albert Hopkins wrote:

> And then you'll hate us and say we
> all suck (j/k I hope

you suck ;)

I'm moving the Windows partition from the slave hdd to the master, and 
going from two distros (fedora and gentoo) to one distro (gentoo) in part 
to better utilize disc space.




-Thufir

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-user]  Re: migrating to LVM
  2007-10-18  7:08     ` [gentoo-user] " Thufir
@ 2007-10-18  8:26       ` Dirk Heinrichs
  2007-10-19  6:55         ` Thufir
  0 siblings, 1 reply; 13+ messages in thread
From: Dirk Heinrichs @ 2007-10-18  8:26 UTC (permalink / raw
  To: gentoo-user

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

Am Donnerstag, 18. Oktober 2007 schrieb ext Thufir:
> On Wed, 17 Oct 2007 10:35:13 -0500, Albert Hopkins wrote:
> > And then you'll hate us and say we
> > all suck (j/k I hope
>
> you suck ;)
>
> I'm moving the Windows partition from the slave hdd to the master, and
> going from two distros (fedora and gentoo) to one distro (gentoo) in part
> to better utilize disc space.

OK, but that still doesn't give us the exact partition layout you currently 
have and what each single partition is currently used for.

However, I assume you want to get someting like this:

hda1: Windows
hda2: Linux (/boot)
hda3: Linux (/)
hda4: PV for LVM (PV = Physical Volume)
hdb1: PV for LVM

The two PVs will be assigned to one Volume Group (VG), inside which you want 
to create LVs (Logical Volumes) for /usr, /var, /home/<user>, swap, ...

Is this correct?

Bye...

	Dirk
-- 
Dirk Heinrichs          | Tel:  +49 (0)162 234 3408
Configuration Manager   | Fax:  +49 (0)211 47068 111
Capgemini Deutschland   | Mail: dirk.heinrichs@capgemini.com
Wanheimerstraße 68      | Web:  http://www.capgemini.com
D-40468 Düsseldorf      | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: www.keyserver.net

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [gentoo-user]  Re: migrating to LVM
  2007-10-18  8:26       ` Dirk Heinrichs
@ 2007-10-19  6:55         ` Thufir
  2007-10-19 12:11           ` Don Jerman
  0 siblings, 1 reply; 13+ messages in thread
From: Thufir @ 2007-10-19  6:55 UTC (permalink / raw
  To: gentoo-user

On Thu, 18 Oct 2007 10:26:49 +0200, Dirk Heinrichs wrote:

> hda1: Windows
> hda2: Linux (/boot)
> hda3: Linux (/)
> hda4: PV for LVM (PV = Physical Volume) 
> hdb1: PV for LVM
> 
> The two PVs will be assigned to one Volume Group (VG), inside which you
> want to create LVs (Logical Volumes) for /usr, /var, /home/<user>, swap,
> ...
> 
> Is this correct?


Yes.

Looking at <http://gentoo-wiki.com/
HOWTO_Install_Gentoo_on_an_LVM2_root_partition>, and the section of the 
Gentoo Handbook it points to, critical system files would be on / 
partition, the root partition?



thank you,

Thufir

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-user] Re: migrating to LVM
  2007-10-19  6:55         ` Thufir
@ 2007-10-19 12:11           ` Don Jerman
  2007-10-19 18:56             ` Thufir
                               ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Don Jerman @ 2007-10-19 12:11 UTC (permalink / raw
  To: gentoo-user

On 10/19/07, Thufir <hawat.thufir@gmail.com> wrote:
> On Thu, 18 Oct 2007 10:26:49 +0200, Dirk Heinrichs wrote:
>
> > hda1: Windows
> > hda2: Linux (/boot)
> > hda3: Linux (/)
> > hda4: PV for LVM (PV = Physical Volume)
> > hdb1: PV for LVM
> >
> > The two PVs will be assigned to one Volume Group (VG), inside which you
> > want to create LVs (Logical Volumes) for /usr, /var, /home/<user>, swap,
> > ...
> >
> > Is this correct?
>
>
> Yes.
>
> Looking at <http://gentoo-wiki.com/
> HOWTO_Install_Gentoo_on_an_LVM2_root_partition>, and the section of the
> Gentoo Handbook it points to, critical system files would be on /
> partition, the root partition?
>
Usually, yes.  If /boot and /root are not members of the LVM volume
group it's much simpler to manage and recover from problems.

It's possible to put everything on LV's (apparently grub even supports
/boot on LV) but it means you have to have an initrd that can perform
the LVM initialization from the ramdisk and swap all the critical
partitions before starting the "real" init process.  If that
initialization goes wrong somehow it's not going to boot at all (no
"linux single" rescue mode) so you're stuck going back to a non-LV
boot method (CD, or a  "rescue partition" or something).  Once you get
the juggling act right the risk is fairly small, but it does add more
complexity to the boot process so there's more errors that can break
it.

So / and /boot will be smallish physical partitions - I use the
minimum size for /boot and around 10G for root, and LVM manages
anything that gets dynamically large or uncertain like /home/, /opt/,
and application directories like /var/lib/mythtv/ or /var/spool/mail/.
 Anything that starts to eat up a large part of my root partition is a
candidate for copying over to a LV later on.
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 13+ messages in thread

* [gentoo-user]  Re: migrating to LVM
  2007-10-19 12:11           ` Don Jerman
@ 2007-10-19 18:56             ` Thufir
  2007-10-20 20:24             ` Neil Bothwick
  2007-10-22  4:16             ` Thufir
  2 siblings, 0 replies; 13+ messages in thread
From: Thufir @ 2007-10-19 18:56 UTC (permalink / raw
  To: gentoo-user

On Fri, 19 Oct 2007 08:11:55 -0400, Don Jerman wrote:


> So / and /boot will be smallish physical partitions - I use the minimum
> size for /boot and around 10G for root, and LVM manages anything that
> gets dynamically large or uncertain like /home/, /opt/, and application
> directories like /var/lib/mythtv/ or /var/spool/mail/.
>  Anything that starts to eat up a large part of my root partition is a
> candidate for copying over to a LV later on.


Awesome, thanks for the background info.



-Thufir

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-user] Re: migrating to LVM
  2007-10-19 12:11           ` Don Jerman
  2007-10-19 18:56             ` Thufir
@ 2007-10-20 20:24             ` Neil Bothwick
  2007-10-21  0:04               ` Albert Hopkins
  2007-10-21 11:29               ` Don Jerman
  2007-10-22  4:16             ` Thufir
  2 siblings, 2 replies; 13+ messages in thread
From: Neil Bothwick @ 2007-10-20 20:24 UTC (permalink / raw
  To: gentoo-user

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

Hello Don Jerman,

> So / and /boot will be smallish physical partitions - I use the
> minimum size for /boot and around 10G for root,

When did 10GB become small for a root partition? I have a 400MB root
partition, 35% full, no /boot and everything else on LVM.


-- 
Neil Bothwick

Energizer Bunny arrested, charged with battery :)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-user] Re: migrating to LVM
  2007-10-20 20:24             ` Neil Bothwick
@ 2007-10-21  0:04               ` Albert Hopkins
  2007-10-21 11:29               ` Don Jerman
  1 sibling, 0 replies; 13+ messages in thread
From: Albert Hopkins @ 2007-10-21  0:04 UTC (permalink / raw
  To: gentoo-user


On Sat, 2007-10-20 at 21:24 +0100, Neil Bothwick wrote:
> Hello Don Jerman,
> 
> > So / and /boot will be smallish physical partitions - I use the
> > minimum size for /boot and around 10G for root,
> 
> When did 10GB become small for a root partition? I have a 400MB root
> partition, 35% full, no /boot and everything else on LVM.
> 

Agreed. My GNOME desktop system us using only about 140MB on root, but I
usually make the  root filesystem at ~2GB for historical reasons.
> 
--
Albert W. Hopkins

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-user] Re: migrating to LVM
  2007-10-20 20:24             ` Neil Bothwick
  2007-10-21  0:04               ` Albert Hopkins
@ 2007-10-21 11:29               ` Don Jerman
  2007-10-21 20:28                 ` Neil Bothwick
  1 sibling, 1 reply; 13+ messages in thread
From: Don Jerman @ 2007-10-21 11:29 UTC (permalink / raw
  To: gentoo-user

On 10/20/07, Neil Bothwick <neil@digimed.co.uk> wrote:
> Hello Don Jerman,
>
> > So / and /boot will be smallish physical partitions - I use the
> > minimum size for /boot and around 10G for root,
>
> When did 10GB become small for a root partition? I have a 400MB root
> partition, 35% full, no /boot and everything else on LVM.
>
>
> --
> Neil Bothwick
>
> Energizer Bunny arrested, charged with battery :)
>
>
Since my smallest hard disk is a quarter terabyte :) 8G to 10G is
plenty to keep portage and compile openoffice before you build out
your logical volumes, and my goal is to simplify management, more than
to manage efficiently.
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-user] Re: migrating to LVM
  2007-10-21 11:29               ` Don Jerman
@ 2007-10-21 20:28                 ` Neil Bothwick
  0 siblings, 0 replies; 13+ messages in thread
From: Neil Bothwick @ 2007-10-21 20:28 UTC (permalink / raw
  To: gentoo-user

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

On Sun, 21 Oct 2007 07:29:35 -0400, Don Jerman wrote:

> Since my smallest hard disk is a quarter terabyte :) 8G to 10G is
> plenty to keep portage and compile openoffice

You have PORTAGE_TMPDIR in your root filesystem? You are braver than me,
I point to to a filesystem where it won't cause problems if it fills up.


-- 
Neil Bothwick

If man ruled the world:

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [gentoo-user]  Re: migrating to LVM
  2007-10-19 12:11           ` Don Jerman
  2007-10-19 18:56             ` Thufir
  2007-10-20 20:24             ` Neil Bothwick
@ 2007-10-22  4:16             ` Thufir
  2 siblings, 0 replies; 13+ messages in thread
From: Thufir @ 2007-10-22  4:16 UTC (permalink / raw
  To: gentoo-user

On Fri, 19 Oct 2007 08:11:55 -0400, Don Jerman wrote:

> So / and /boot will be smallish physical partitions - I use the minimum
> size for /boot and around 10G for root, and LVM manages anything that
> gets dynamically large or uncertain like /home/, /opt/, and application
> directories like /var/lib/mythtv/ or /var/spool/mail/.
>  Anything that starts to eat up a large part of my root partition is a
> candidate for copying over to a LV later on.


Great discussion, thanks to all.



-Thufir

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2007-10-22  4:40 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-17  5:20 [gentoo-user] migrating to LVM Thufir
2007-10-17  5:56 ` Dirk Heinrichs
2007-10-17 15:35   ` Albert Hopkins
2007-10-18  7:08     ` [gentoo-user] " Thufir
2007-10-18  8:26       ` Dirk Heinrichs
2007-10-19  6:55         ` Thufir
2007-10-19 12:11           ` Don Jerman
2007-10-19 18:56             ` Thufir
2007-10-20 20:24             ` Neil Bothwick
2007-10-21  0:04               ` Albert Hopkins
2007-10-21 11:29               ` Don Jerman
2007-10-21 20:28                 ` Neil Bothwick
2007-10-22  4:16             ` Thufir

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox