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 > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 03-11-2009, 05:34 AM
Tim Anstey
 
Default LVM and install over existing installation

Hi,
I've recently acquired a cheap dedicated server for testing purposes which was shipped was CentOS, not my preferred distro. To resolve this I intend to install Debian from within the existing install as documented in the Debian installation guide.

Now, this has always worked well in the past and this is aided by the fact that normally servers are provisioned with normal, boring filesystems like / being ext3. In this instance they've used LVM and frankly I've never used LVM before and I don't know how it will effect what I plan to do.

So what I'm asking is, can I turn the LVM partition back into ext3 or alternatively can I just treat the LVM partition as a normal one?
[root@server ~]# fdisk -l;

Disk /dev/hda: 20.4 GB, 20416757760 bytes255 heads, 63 sectors/track, 2482 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes
** Device Boot * * *Start * * * * End * * *Blocks * Id *System
/dev/hda1 * * * * * * * 1 * * * * *13 * * *104391 * 83 *Linux/dev/hda2 * * * * * * *14 * * * *2482 * *19832242+ *8e *Linux LVM
The biggest problem I foresee with the LVM configuration (apart from not understanding it) is that there is no proper swap partition, it's a logical volume and the only way I know of to do the remote change is to boot into the swap partition.

Anyone got any useful thoughts?
Thanks,Tim
 
Old 03-11-2009, 06:03 AM
randall
 
Default LVM and install over existing installation

Tim Anstey wrote:

Hi,

I've recently acquired a cheap dedicated server for testing purposes
which was shipped was CentOS, not my preferred distro. To resolve this
I intend to install Debian from within the existing install as
documented in the Debian installation guide.


Now, this has always worked well in the past and this is aided by the
fact that normally servers are provisioned with normal, boring
filesystems like / being ext3. In this instance they've used LVM and
frankly I've never used LVM before and I don't know how it will effect
what I plan to do.


So what I'm asking is, can I turn the LVM partition back into ext3 or
alternatively can I just treat the LVM partition as a normal one?
it probably has ext3 already (or another filesystem) but this would be
on top of a "volume group"


makes sense? probably not, you might want to consider reading in to LVM,
it could be very useful to you depending on your needs.


in this case /dev/hda2 is configured as "physical volume" in LVMspeak
(you could also make a single partition or 2 disks 1 physical colume)


now, what does that do? on top of a physical volume you can put several
"volume groups"
a volume group is like a partition but you can resize them later on,
this could be very useful.


on top of such a resizable volume group you can put a file system like
ext3 and mount it as any other partition.


the command "pvdisplay" will show you some more details about you
physical volumes.

(below is mine as an example)
--- Physical volume ---
PV Name /dev/md3
VG Name vg
PV Size 921.27 GB / not usable 3.00 MB
Allocatable yes
PE Size (KByte) 4096
Total PE 235844
Free PE 10696
Allocated PE 225148
PV UUID l0Jf1O-QD9C-8Ee4-6KG8-Nnv1-5ZL5-DzQeEo

as we said earlier, within each physical volume you can have several
volume groups

"vgdisplay" will show you if you have any.
(below is mine as an example, you see i only have 1 large volume group
here, i could resize this one and add others but i personally only use
it form LVMsnapshots, another nice feature of LVM )


--- Volume group ---
VG Name vg
System ID
Format lvm2

Metadata Areas 1
Metadata Sequence No 34
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size 921.27 GB
PE Size 4.00 MB
Total PE 235844
Alloc PE / Size 225148 / 879.48 GB
Free PE / Size 10696 / 41.78 GB
VG UUID 0RCDf5-hk05-TIVR-ALxj-efUU-yMc3-tzixJS



[root@server ~]# fdisk -l;

Disk /dev/hda: 20.4 GB, 20416757760 bytes
255 heads, 63 sectors/track, 2482 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 2482 19832242+ 8e Linux LVM

The biggest problem I foresee with the LVM configuration (apart from
not understanding it) is that there is no proper swap partition, it's
a logical volume and the only way I know of to do the remote change is
to boot into the swap partition.
since i'm not familiar with the routine you describe i can not give you
any useful advice, but you could put the swap on top of the lvm as a
volume group i guess (would this work?) or you completely remove the
LVM, but then i would advise to properly remove it with the LVM
commands, i had disks "remembering" that they were LVM in the past even
if they were overwritten.


Anyone got any useful thoughts?

Thanks,
Tim



--

www.songshu.org
Just another collection of nuts


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-11-2009, 06:22 AM
Tim Anstey
 
Default LVM and install over existing installation

Ah, so if I see this right, I can configure LVM and treat it as I would any other partition.*
So say I had this:**
--- Logical volume ---

**LV Name * * * * * * * */dev/VolGroup00/LogVol01

I could treat that exactly the same as /dev/hdax?

If so that's awfully helpful, I assumed LVM relied on the currently installed OS to function so by booting into another OS install I wouldn't be able to access it.
 
Old 03-11-2009, 06:32 AM
randall
 
Default LVM and install over existing installation

Tim Anstey wrote:
Ah, so if I see this right, I can configure LVM and treat it as I
would any other partition.

So say I had this:


--- Logical volume ---

LV Name /dev/VolGroup00/LogVol01


I could treat that exactly the same as /dev/hdax?

yes, you can mount LogVol01just as you would mount /dev/hdax
assuming that LogVol01 is formatted as ext3 you could use the follwing
in your fstab


/dev/VolGroup00/LogVol01 /mountpoint ext3
defaults 0 0


If so that's awfully helpful, I assumed LVM relied on the currently
installed OS to function so by booting into another OS install I
wouldn't be able to access it.
as long as the OS understands LVM there should be no issue, you would
need to install LVM2 before you can use it.



--

www.songshu.org
Just another collection of nuts


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-11-2009, 06:33 AM
Tim Anstey
 
Default LVM and install over existing installation

Fantastic.
Thanks for all of your assistance.
 

Thread Tools




All times are GMT. The time now is 12:19 AM.

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