renaming & resizing partitions

Marcin Struzak marcin-list at struzak.com
Tue Oct 4 21:29:20 UTC 2005


Hello,

My Fedora Core 3 is in its pretty much vanilla installation form.  It utilizes GRUB and LVM, and the installation process split my 18Gb hd into 3 filesystems:
/boot                    /boot (100Mb)/dev/VolGroup00/LogVol00 /     ( 16Gb)/dev/VolGroup00/LogVol01 swap  (  1Gb)I want to:
  1.. rename the volume groups and logical volumes to shorter and more meaningful strings, e.g., vg0, root, swap 
  2.. resize (shrink) /boot to 50Mb 
  3.. split up / into smaller chunks (root, home, usr, var)
I have a second drive, that has one large logical volume (part of VolGroup00), capable of holding at any given time all or portions of the partitions above; there is data in that LV, but there is also unused space left, which I could use to create a PV, LV, and use it only for this purpose (and yes, there would be enough space for everything as well).  

I just wanted to run this by the group and ask for comments, see if there is anything specific to worry about, etc.  Here is my general plan:  
  1.. use the FC3 DVD to boot into the system in single user maintenance mode 
  2.. rename the existing vol groups and log vols using vgrename and lvrename; 
  mount and check integrity; 
  modify /etc/grub.conf accordingly 
  3.. with /boot and the large, second disk partition mounted, copy everything out from /boot (using, e.g., tar) to the second drive (copy it into a directory on the existing LV, or create a brand new one?); 
  unmount; 
  resize the partition (using, e.g., parted); 
  remount; 
  copy everything back; 
  run grub-install --root-directory=/boot /dev/sda1 
  4.. now I am left with a 50Mb hole (starting at the end of the new /boot partition and ending at the beginning of the lvm partition; should I just blow the lvm away (after copying out the contents of / to my second disk), and start from scratch with one large PV, or should I add a PV to cover the 50Mb, then add it to the VG, and then try to somehow incorporate it into one of the new partitions? 
  the LV on my second drive is not accessible to parted; will I have any problem fetching it and adding to VGs if I chose to redo the whole enchilada from scratch on the first disk?  
  if I keep things the way they are, I should be able to use lvresize, lvextend, vgextend, etc, right? 
  5.. with all the data on my second drive, rearrange the LVs to my liking; 
  finally copy everything back into the appropriate partitions, and update /etc/fstab (how? there is a comment in there that it should only be used by fstab-sync; can it be edited manually as well?); 
Thanks in advance for any and all comments!  

--Marcin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20051004/a692b7b4/attachment-0001.htm>


More information about the fedora-list mailing list