LAZY MODE: Exchanging a LVM'ed disk
I currently have a disk in my LVM set which is only 1Gb. It's also quite old, so I'd like to replace that with a newer/bigger one..
How would I go about doing this?
1. Add the new disk at the end of the LVM
2. Extend the filesystem
3. Move the data from the old disk to the new
4. Remove the old disk
Is this about right? Or is there a simpler/faster way?
Bare in mind that all the SCSI id's will change when i remove the old disk, will that complicate issues?
Signature · 9 lines
Turbo __ _ Debian GNU Unix _IS_ user friendly - it's just
^^^^^ / /(_)_ __ _ ___ __ selective about who its friends are
/ / | | '_ \| | | \ \/ / Debian Certified Linux Developer
_ /// / /__| | | | | |_| |> < Turbo Fredriksson [email protected]
\\\/ \____/_|_| |_|\__,_/_/\_\ Gothenburg/Sweden
domestic disruption ammonium Cocaine FSF quiche 747 FBI terrorist
Serbian smuggle Noriega Panama Treasury Qaddafi kibo
[See http://www.aclu.org/echelonwatch/index.html for more about this]Quoted 4 lines · Turbo Fredriksson
I currently have a disk in my LVM set which is only 1Gb. It's also quite old, so I'd like to replace that with a newer/bigger one..
How would I go about doing this?
http://tech.sistina.com/lvm/doc/lvm_howto/Removing_an_old_disk.html
1. Backup the existing filesystem(s)
2. Verify the backup
3. Create a PV on the new disk (pvcreate)
4. Add the new PV to the existing VG (vgextend)
5. Move the data from the old PV to the new PV (pvmove)
6. Remove the old PV from the VG (vgreduce)
7. Extend the LV to use the entire new PV (lvextend)
8. Resize the filesystem to use the entire LV
Quoted 2 lines
Bare in mind that all the SCSI id's will change when i remove the old disk, will that complicate issues?
It will (it always does), but "vgscan" should handle most of it.
Signature · 4 lines
Ben Scott <[email protected]> | The opinions expressed in this message are those of the author and do not | | necessarily represent the views or policy of any other person, entity or | | organization. All information is provided without warranty of any kind. |
Quoting Benjamin Scott <[email protected]>:
Quoted 12 lines · Turbo Fredriksson
Quoted 2 lines
I currently have a disk in my LVM set which is only 1Gb. It's also quite old, so I'd like to replace that with a newer/bigger one..
1. Backup the existing filesystem(s)
2. Verify the backup
3. Create a PV on the new disk (pvcreate)
4. Add the new PV to the existing VG (vgextend)
5. Move the data from the old PV to the new PV (pvmove)
6. Remove the old PV from the VG (vgreduce)
7. Extend the LV to use the entire new PV (lvextend)
8. Resize the filesystem to use the entire LV
Quoting Benjamin Scott <[email protected]>:
Quoted 7 lines · Turbo Fredriksson
Quoted 2 lines
Do I _have_ to copy all the info to a empty disk, then create the lv (pvcreate et al)?
No, you could just blow away your existing non-LVM partition and lose all
your data. ;-) But if you would like to *keep* your data, the answer is "Yes, you have to copy it all to another filesystem".
Dang! I was hopping I could get away easy here! :)
Thanx for the answer, I appreciate it, even though I don't "like it" if you know what I mean :)
Signature · 10 lines
Turbo __ _ Debian GNU Unix _IS_ user friendly - it's just
^^^^^ / /(_)_ __ _ ___ __ selective about who its friends are
/ / | | '_ \| | | \ \/ / Debian Certified Linux Developer
_ /// / /__| | | | | |_| |> < Turbo Fredriksson [email protected]
\\\/ \____/_|_| |_|\__,_/_/\_\ Gothenburg/Sweden
plutonium NSA arrangements SEAL Team 6 toluene tritium
counter-intelligence pits 747 CIA Mossad Honduras munitions Saddam
Hussein colonel
[See http://www.aclu.org/echelonwatch/index.html for more about this]