[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

trouble editing a partition table



A kvm virtual machine has two disks provided by LVM logical volumes.
They are identical; each has 3 partitions.  To get more space I used
lvextend to grow the logical volumes.

My problem is that the partition tables are unchanged; the last
partition should extend to the end of the new disk but it does not.
None of the tools I have used to change that will cooperate.

How can I expand the partition?

Inside the VM the disks are used like this
LVM
software-raid
partition
drive.

Partition 3 on each virtual disk is software RAID1 with the other.  The
resulting device, /dev/md1, is used for an LVM volume group.

The virtual disks were 6G and now are 8G.

I shut the VM of which the disks were a part and attached them to
another VM running squeeze (the main VM is lenny).

PARTED
(parted) u
Unit?  [compact]? s
(parted) p
Model: ATA QEMU HARDDISK (scsi)
Disk /dev/sdc: 16777216s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start    End        Size       Type     File system  Flags
 1      63s      192779s    192717s    primary  ext3         raid
 2      192780s  401624s    208845s    primary
 3      401625s  12578894s  12177270s  primary               raid


(parted) resize 3 401625s 16777215s
WARNING: you are attempting to use parted to operate on (resize) a file system.
parted's file system manipulation code is not as robust as what you'll find in
dedicated, file-system-specific packages like e2fsprogs.  We recommend
you use parted only to manipulate partition tables, whenever possible.
Support for performing most operations on most types of file systems
will be removed in an upcoming release.
Error: Could not detect file system.

When I quit I was not asked to save, and on restart there was no change.

CFDISK
Shows freespace at the end, with partition 3 type Linux raid autodetect (as is partition 1).
Free space shows at the end.
When I select partition 3 and hit enter on maximize, cfdisk displays "Illegal command".
Again, no changes persist, even when I select write.

FDISK
Said to prefer cfdisk, and warned not to trust it, so I didn't try anything.

GPARTED
Shows a yellow triangle with an exclamation mark next to partitions 2
and 3.  It shows file system of  "lvm2" for partition 3, as well as the
RAID flag.  Info for 3 says "Logical Volume Management is not yet
supported."  lvm2 is not installed on the system, and given the stack
above it would not be at all appropriate to call (since LVM is on top of
md1).  All resizing options are greyed out in the edit and partition
menus.  Attempting to click the end of the graphical box toward the top
representing sdc3 does nothing.

Ross


Reply to: