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

Re: Changing to lvm from ext4



On Tue, May 28, 2013 at 05:30:09PM -0400, To Ro wrote:
> What would be the best course of action to switch my system to lvm? This is
> what I have:
> 
> Filesystem                                              Size  Used Avail
> Use% Mounted on
> rootfs                                                  9.2G  8.3G  425M
> 96% /
> udev                                                     10M     0   10M
> 0% /dev
> tmpfs                                                   592M  756K  591M
> 1% /run
> /dev/disk/by-uuid/b9a3a0e3-9f3b-401e-8f12-8d123e6e7f3b  9.2G  8.3G  425M
> 96% /
> tmpfs                                                   5.0M     0  5.0M
> 0% /run/lock
> tmpfs                                                   1.5G  536K  1.5G
> 1% /run/shm
> /dev/sda7                                                29G  5.6G   22G
> 21% /home
...
> And there is also 600 GB of adjacent disk space where /home used to be from
> squeeze. I already made a tarball with these older /home and saved it to an
> exterior device. I want to reuse this disk space, with lvm, and migrate
> existing wheezy installation to it, occupying the whole disk this time and
> bringing back most of the old data saved in the tarball.

I'd want to avoid fragmenting things, personally so what I'd do is:
* duplicate the above setup in the 600 GB of space,
* make sure I can boot into that,
* from the new location nuke the above partitions,
* create 1 for lvm,
* do the lvm setup and copy the data,
* make sure I can boot into the new setup,
* from the new setup nuke the temporary setup,
* extend the partition you made (remove and recreate in fdisk with the same
  starting position)
* extend the group.

  If the last two steps scare you then group multiple partitions together
  and use that.

-- 
  "A search of his car uncovered pornography, a homemade sex aid, women's 
  stockings and a Jack Russell terrier."
    - http://www.dailytelegraph.com.au/news/wacky/indeed/story-e6frev20-1111118083480


Reply to: