LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-17-2009, 08:43 AM   #1
vofka
LQ Newbie
 
Registered: Jun 2009
Distribution: RHEL-5.2
Posts: 26

Rep: Reputation: 15
Question Shrinking the disk partition with Logical Volumes on it problem


I have the following problem. I want to reduce the size of my hard disk on which the Logical Volumes exist.
I do the following steps
Boot from my Red Hat disk, and choose Linux Rescue mode.
then i do following
(on Logical volumes there is not yet any filesystem, they are empty)
1. Shrink the Logical Volume by the command:
lvm lvresize -LNewSize Generalgroup/LogVolVar
2. Shrink the Physical volume:
lvm pvresize --setphysicalvolumesize newSize /dev/hda2
3. Shrink the partition with fdisk:
delete the partition:
Command :d
Partition number (1-4) 2
--------------------------
create new partition
Command:n
Command action
e extend
p primary partition (1-4)
p
Partition number (1-4)2
First cylinder (229-17753 ,default 229) 229
Last cylinder (229-17753, default 17753) NewSize
--------------------------------------
change type of partition from Linux to LVM partition
command :t
partition number (1-4):2
Hex code (type L to list codes):8e
Changed system type of partition 2 to 8e (Linux LVM)
----------------------------------------
and last save the changes by rewriting the partition table
Command: w
The partition table has been altered!

Calling ioctl() to re-read partition table
Syncing disks.

Then i run reboot

and then make the volumes available:
lvm vgchange -ay
device-mapper: reload ioctl failed: Invalid argument
4 logical volume(s) in volume group "GeneralGroup" now active
after that i see no LogVolVar Logical volume in the group

and if run
dmsetup table
i see that table LogVolVar is empty
We can see the Volome in the group only if run
lvm vgscan --mknodes.
However that is not fix the problem.

Have any any ideas how to fix the problem, what was incorrect in my operations, write please.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
creating logical volumes... mtsm Linux - Newbie 1 01-31-2009 06:38 AM
openSUSE 10.3 to 11.0 Upgrade Problem - install can't see logical volumes? wmcgeorge SUSE / openSUSE 1 06-23-2008 06:21 AM
Shrinking a Logical Volume With LVM jimmyjiang Red Hat 1 02-28-2008 04:45 PM
a doubt on shrinking logical volume nirmaltom Linux - General 6 02-14-2007 12:46 AM
I did not know about logical volumes gezi Linux - Newbie 5 04-27-2005 09:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration