Re: PV and LVM resize ext4

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

 



On Fri, Oct 16, 2009 at 2:37 PM, Tait Clarridge <tait@xxxxxxxxxxxx> wrote:
> Hello,
>
> I am about to buy a 60GB SSD to replace my netbook's current 160GB drive
> and wanted to get some feedback whether the process I am thinking of
> taking to resize the drives will work properly.
>
> So here goes:
> My volume group in this example is called: vg_taitsvolume
> The logical volume (root) being resized is: lv_root
> The physical volume is: /dev/sda2
>
> Current Partition Sizes:
>
> /boot - 200M - formatted ext3
> swap - 4GB - swap
> / - 145GB - formatted ext4
>
> There is only ~8GB in use on the / fs
>
> Boot into a LiveCD
>
> e2fsck -f /dev/vg_taitsvolume/lv_root
> resize2fs -p /dev/vg_taitsvolume/lv_root 30G
> lvreduce --size 30G vg_taitsvolume/lv_root --test
> lvreduce --size 30G vg_taitsvolume/lv_root
>
> pvresize --setphysicalvolumesize 40G /dev/sda2

Everything looks good to this point as far as I can tell (from memory)

>
> (I chose 40GB to keep it away from the maximum of 60GB so there are no
> issues with block sizes/sectors)
>
> use gparted to resize /dev/sda2 to 40G
>
> dd to smaller drive

These steps should not be necessary as part of the advantage if LVM[1]
is moving the LV's around.
>
> use gparted to resize /dev/sda2 to maximum allowed
>
> pvresize /dev/sda2
> lvextend /dev/vg_hornet/lv_root /dev/sda2
> e2fsck -f /dev/vg_hornet/lv_root
> resize2fs /dev/vg_hornet/lv_root
>
>
> So, will this work? Are there any steps I can take out? I haven't really
> played with LVM before (at all) so I thought I would come up with my own
> steps through the man pages and put it to the list to see if anyone has
> either completed what I need to do, or has any tips.
>
> I will be backing up the important files so if something goes wrong it
> is not a problem, but kind of an annoyance.
>
> Thanks,
> Tait

Richard

[1] http://tldp.org/HOWTO/LVM-HOWTO/recipemovevgtonewsys.html

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux