On Mon, 2009-10-26 at 09:10 -0700, malahal@us.ibm.com wrote: > Nicholas Robinson [npr@bottlehall.co.uk] wrote: > > Hi > > > > I've been using lvm for quite a few years, but only occasionally when I > > need to add/remove new drives. So, my knowledge is limited and a bit > > rusty! I should have removed the old drive when I added a new one a > > couple of years ago, but for reasons I cannot remember, I didn't. > > > > I only know how to remove a drive when there is a new drive about to > > move the stuff onto. My problem now is that the new drive is fully > > allocated and so this route won't work. There is plenty of free space on > > the new drive so it should be possible to move everything that might be > > on the old physical drive and then remove it from the lvg. I just can't > > work out how. The HOWTOs and threads don't seem to cover this starting > > point. > > > > My questions are: > > > > 1. Can I do move the data off the old drive to the new drive without > > adding another new drive? > > pvmove followed by vgreduce. If you have enough free space, pvmove > should work and there is no need to add another new drive. > Thanks, I will give this a go. I think I was getting confused between allocated and used. I thought the destination PV had to have enough unallocated extents on it to absorb the old PV data rather than just unused. > > 2. I don't understand the output from pvdisplay - why is it telling me > > about /dev/sda1 at the bottom when this partition is a boot partition > > and tiny? > > It also reports a large size! Somehow, it detected PV signature in that > partition. You can remove such signature by running pvremove. Note that > it wipes out LVM label, so back up your data in /dev/sda1 somewhere else > before you run "pvremove /dev/sda1". If the partition is mountable after > 'pvremove', you are fine. Otherwise restore the backup! > Although it is listed as a boot partition in fdisk -l, it is not currently used. The old disc is still the boot disc and so /dev/sda1 is not being used at all. I can safely do a pvremove and make this partition the real boot partition. > > 3. Where has the LogVol01 come from and what is it doing? Can I remove > > it? > I tried mounting it as you suggest and it muttered about it looking like swap. So, I checked and it is mounted as swap! That explains that one. The newer naming convention of ...lv_swap would have made this much clearer! > Try mounting it and see if there is anything there. You can use lvremove > if you don't need it. > > > 4. Can I rename the volgroup/logvols to the same pattern used by new > > installations? e.g. vg_hostname and lv_root, etc. > > Yes, see lvrename and vgrename commands. > > > If you've read this far, then thank you! I hope the following extracts > > are sufficient. > > You are welcome. > You are very kind. I have printed your reply out and will follow it carefully. Thank you very much. > _______________________________________________ > linux-lvm mailing list > linux-lvm@redhat.com > https://www.redhat.com/mailman/listinfo/linux-lvm > read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/ _______________________________________________ linux-lvm mailing list linux-lvm@redhat.com https://www.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/