--- Simon fgc <[EMAIL PROTECTED]> wrote:

> Hello,
> 
> i have a system where i installed linux sometime back with
> partitioning scheme as follows
> 
> [EMAIL PROTECTED] simon]# df -h
> Filesystem                                             Size  Used
> Avail Use% Mounted on
> /dev/mapper/VolGroup00-LogVol00           36G   18G   17G  53% /
> /dev/hda1                                               99M   56M
> 39M  60% /boot
> none                                                     248M     0
> 248M   0% /dev/shm
> 
> Now i need to install windows on the same PC. so kind of resize
> /dev/mapper/VolGroup00-LogVol00  drive and then may be using fdisk to
> create a new partition.
> 
> I believe there is something we can do with the below commands
> 
> [EMAIL PROTECTED] simon]# man lvresize
> [EMAIL PROTECTED] simon]# man dmsetup
> 
> As i don't have a seperate media to take the back up and repartition
> the hardisk to install windows, i can not take the risk of loosing
> data by using above commands and hence looking for the expert advice.

To begin with I would recommend you read the LVM howto
http://www.tldp.org/HOWTO/LVM-HOWTO/ being a good starting point.

Next to summarize there are three major sections in a LVM namely
extents, volumes and volume groups.
To understand them more clearly you could think of Physical volumes as
hard disk or a software raid device, logical volumes would be
equivalent to a partition on that device.
These volumes would be internally split into chunks of data which would
be called physical or logical extent depending upon what type of volume
you are splitting.
Using these volumes you create Volume groups which is where you start
looking at it from outside the LVM therefore your filesystem sits on
the volume group.
Any resize activity you do should be supported by the volume group and
the filesystem sitting on it and everything else will happen
transparently.
Now to free space from LVM and have it usable for Windows you need to
have a logical volume freed from LVM. If you dont need to pass the
whole space to Windows you could ofcourse resize the partition and put
part of it back into the LVM.
Therefore to resize (shorten) a filesystem on LVM you need to do the
following
1. Run pvdisplay on the partition or device you wish to remove and
confirm it is not being used (check for "Free PE"). If it has data in
it - you need to have spare space in other extents in the VolGroup and
then run pvmove.
2. unmount the filesystem
3. Resize the filesystem
4. Run vgreduce to remove the volume from the volume group.
5. Mount the filesystem on the updated volume group.

I would recommend you read the HOWTO thoroughly and understand the
commands I have mentioned. Since I donot know the structure underneath
your volume group and since I dont want you to blindly copy my
instructions I have not mentioned the exact syntax to use. I do believe
I have mentioned all the steps but dont blame me if I missed any step -
it is your data after all :).



Mithun

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

_______________________________________________
ilugd mailinglist -- ilugd@lists.linux-delhi.org
http://frodo.hserus.net/mailman/listinfo/ilugd
Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi 
http://www.mail-archive.com/ilugd@lists.linux-delhi.org/

Reply via email to