lvm/ext3 resize

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

 



I've just inherited a box that has a single / volume plus a swap. I'd really rather have /home seperated. LVM is still new to me so i'd like someone else's opinion on the steps i've managed to come up with.

I'd like to reduce the single 75G vol to 20G, then create a /home vol with the remainder.

[bally@apollo ~]$ lvdisplay
  --- Logical volume ---
  LV Name                /dev/VolGroup00/LogVol00
  VG Name                VolGroup00
  LV UUID                us9s35-kxoF-1L92-0zsZ-vJtj-lO7A-Q89zmE
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                75.25 GB
  Current LE             2408
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:0

  --- Logical volume ---
  LV Name                /dev/VolGroup00/LogVol01
  VG Name                VolGroup00
  LV UUID                roe2Xm-PbHg-5HwP-5klc-SGRr-65Lx-jSpjuW
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                960.00 MB
  Current LE             30
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:1


So, the steps i have so far:

boot rescue mode

# tune2fs -O ^has_journal /dev/hda          # discontinue journaling

# lvm
lvm > vgscan
lvm > vgchange --available y VolGroup00
lvm > exit
e2fsck -f /dev/VolGroup00/LogVol00          # check & repair
resize2fs -p /dev/VolGroup00/LogVol00 20G   # resize to 20G
e2fsck -f /dev/VolGroup00/LogVol00          # check & repair

# lvm
lvm > lvreduce -L20G /dev/VolGroup00/LogVol00
lvm > lvcreate -L55.25G -nhome              # create volume for /home
lvm > exit
e2fsck -f /dev/VolGroup00/LogVol00          # check & repair
e2fsck -f /dev/VolGroup00/home              # check & repair

# tune2fs -O +has_journal /dev/hda          # restore journaling

Does this look OK? And is using tune2fs strictly necessary here?

Am I heading for a re-install?



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux