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

Fwd: Re: Moving LVM volume?



Ooops!  Sorry, Frank.  I did it, again.  This was meant for the list.


-------- Forwarded Message --------

On 12/31/2014 05:54 PM, Frank Miles wrote:
I recently added a new hard drive to my home system.  I decided to use it
to create an all-new bootable 'jessie' system.  I created a partition
table that I thought would be flexible:
    /dev/sdb1         /   (root) {7G}
    /dev/sdb2         /swap       {4GB}
    /dev/sdb3         /oldjunk    {1G}
    /dev/sdb4  extended      {remainder}
    /dev/sdb5     LVM        {one large volume}

Most of the partitions- /usr, /home, /var, ... were in LVM2.

What I've learned since then is that /usr seems to have special
status, and probably shouldn't be part of LVM as certain tasks
early in the boot process can't seem to access the interior of
LVM.

I've moved 'oldjunk' into the LVM, and want to expand this
partition to become the new /usr.  I've shrunk the LVM, but
the freed space is all at the far end of the LVM.  I have
been unable to move it towards the end of the disk space,
so I can expand /dev/sdb3.  gparted, resize2fs, pvmove,...
(running from a CDROM-based rescue disk) have all failed.

Is there some method that I've overlooked?

    TIA!
    -Frank


As far as moving /usr out of the LVM, I would simply make a new logical
volume and copy /oldjunk into it.  Then delete everything from oldjunk
and copy /usr from its logical volume to the physical volume that used
to be oldjunk and remove the logical volume that was /usr.  On the other
hand, I have been running LVM for years with /home, /tmp, /usr, /var and
swap all as LVM logical volumes and I have had no issues with it.  What
sort of issues are you having and are you sure that they are caused by
having /usr on LVM?

Marc




Reply to: