Making space for another OS.

Bill Rugolsky Jr. brugolsky at telemetry-investments.com
Tue Nov 15 15:24:16 UTC 2005


On Tue, Nov 15, 2005 at 02:45:24PM +0000, Craig McLean wrote:
> I'm going to stick Solaris 10 on my laptop (this is not an advocacy
> post, just for info) and to do so I need to free up some physical space
> on my disk which is currently allocated to LVM2.

> 5) with fdisk, delete the partition entry and recreate from same
> starting block, but ending the partition ~10Gb short of where it ends now.

This will almost certainly hose your system; you need to resize
the physical volume (PV).  You might be able to do this by doing a
resize2fs/lvreduce, making sure that no physical extents (PEs) are in
use above some offset (probably the case if it was a linear contiguous
allocation), do a vgcfgbackup of the LVM2 metadata (which is in text form;
hooray!), hack it to reduce the extent counts, and then do a vgcfgrestore.

Alternatively (and "more safely"), you could plug in a USB2 drive, and do a
pvmove/vgreduce/pvremove/fdisk/pvcreate/vgextend/pvmove. [I say "more safely"
in scare quotes, because using usb-storage for multi-gigabyte copies
can cause problems on lots of lousy USB hardware.]

Finally, it might just be easier to do a full backup and restore, especially
if your laptop has a GigE interface.

If this is only for experimentation, perhaps you might consider installing
Solaris 10 to run under Xen?  I believe there is a port to Xen domU.

Doing the initial install might be a pain.  On my Opteron, I've used QEMU to
install Linux distribution CD's into a Logical Volume, and then hacked up the
environment configuration to use User-Mode Linux or Xen.

Regards,

	Bill Rugolsky




More information about the users mailing list