LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   LVM volume resizing without data-lose (https://www.linuxquestions.org/questions/linux-newbie-8/lvm-volume-resizing-without-data-lose-4175441637/)

l0pht 12-16-2012 02:03 AM

LVM volume resizing without data-lose
 
Hi

i have this LVMs:

[root@localhost ~]# df -h

Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
35G 28G 5.2G 85% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
/dev/sda1 485M 33M 427M 8% /boot
/dev/mapper/VolGroup-lv_home
33G 4.5G 27G 15% /home





i need to reduce size of /home and add it for / partition

what can i do? my data on server is too important from losing.
---------------------------------------

in all there is any rescue cd for doing this work in GUI mode?

thanks all.

ophirg 12-16-2012 03:10 AM

Hi

which fs are you using?
please post your /etc/fstab file

l0pht 12-16-2012 03:19 AM

Quote:

Originally Posted by ophirg (Post 4850250)
Hi

which fs are you using?
please post your /etc/fstab file

/dev/mapper/VolGroup-lv_root / ext4 defaults 1 1
UUID=1dbbad19-c0c8-4a4f-acab-afa3856638fe /boot ext4 defaults 1 2
/dev/mapper/VolGroup-lv_home /home ext4 defaults 1 2
/dev/mapper/VolGroup-lv_swap swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0

ophirg 12-16-2012 03:44 AM

since you're changing the root directory, you'll need to boot from a live cd or a different partition.
you can use the lubuntu installation disk.

try this tutorial: http://www.mytechforum.com/unix/how-...t4-filesystem/
i found it useful

hope that helps
post if you have any problems

syg00 12-16-2012 04:19 AM

Of course if you think your data is important, you'll have a (at least one) backup before you start.

Resizing is pretty well understood these days - especially with ext4. Shouldn't even be a need to unmount it.

syg00 12-16-2012 06:10 AM

Presuming that is a RHEL/Fedora system, maybe have a look for system-config-lvm.
Used to work o.k. for this sort of thing, haven't tried it in a while (it's a GUI front-end).

*Edit:* still available in F16 repos.


All times are GMT -5. The time now is 09:20 PM.