Skip to main content
clarify warning
Source Link
Nick ODell
  • 2.8k
  • 3
  • 23
  • 29

My specific detail that doesn't seem to be addressed in other questions is the physical location of the data that I'm trying to preserve -- if I don't know which PV a file physically resides on, how can I confidently resize2fs and then ultimately pvremove?

You don't need to know that. That's LVM's job. resize2fs works on the logical volume, which is allowed to span multiple disks. Once your filesystem is small enough to fit onto one disk, you can tell LVM to move it over, and remove the other disks.


There are fourfive steps to doing this.

  1. Reduce the size of the filesystem to less than 4TB. (resize2fs)

  2. Reduce the size of the logical volume to less than 4TB. (lvreduce)

    (This step can lose datacan lose data if you truncate the logical volume to be smaller than the filesystem too far, so read the manpage!)

  3. Move the logical volume away from each drive. (pvmove <source pv> <dest pv>)

    (You'll need to do this one disk at a time.)

  4. Remove the disk. (vgreduce then pvremove)

  5. (Optional) If you made the logical volume larger than the filesystem in step 2, expand the filesystem to use the entire logical volume, so that no space is wasted. (resize2fs)

My specific detail that doesn't seem to be addressed in other questions is the physical location of the data that I'm trying to preserve -- if I don't know which PV a file physically resides on, how can I confidently resize2fs and then ultimately pvremove?

You don't need to know that. That's LVM's job. resize2fs works on the logical volume, which is allowed to span multiple disks. Once your filesystem is small enough to fit onto one disk, you can tell LVM to move it over, and remove the other disks.


There are four steps to doing this.

  1. Reduce the size of the filesystem to less than 4TB. (resize2fs)

  2. Reduce the size of the logical volume to less than 4TB. (lvreduce)

    (This step can lose data if you truncate the filesystem too far, so read the manpage!)

  3. Move the logical volume away from each drive. (pvmove <source pv> <dest pv>)

    (You'll need to do this one disk at a time.)

  4. Remove the disk. (vgreduce then pvremove)

My specific detail that doesn't seem to be addressed in other questions is the physical location of the data that I'm trying to preserve -- if I don't know which PV a file physically resides on, how can I confidently resize2fs and then ultimately pvremove?

You don't need to know that. That's LVM's job. resize2fs works on the logical volume, which is allowed to span multiple disks. Once your filesystem is small enough to fit onto one disk, you can tell LVM to move it over, and remove the other disks.


There are five steps to doing this.

  1. Reduce the size of the filesystem to less than 4TB. (resize2fs)

  2. Reduce the size of the logical volume to less than 4TB. (lvreduce)

    (This step can lose data if you truncate the logical volume to be smaller than the filesystem, so read the manpage!)

  3. Move the logical volume away from each drive. (pvmove <source pv> <dest pv>)

    (You'll need to do this one disk at a time.)

  4. Remove the disk. (vgreduce then pvremove)

  5. (Optional) If you made the logical volume larger than the filesystem in step 2, expand the filesystem to use the entire logical volume, so that no space is wasted. (resize2fs)

Commonmark migration
Source Link

My specific detail that doesn't seem to be addressed in other questions is the physical location of the data that I'm trying to preserve -- if I don't know which PV a file physically resides on, how can I confidently resize2fs and then ultimately pvremove?

You don't need to know that. That's LVM's job. resize2fs works on the logical volume, which is allowed to span multiple disks. Once your filesystem is small enough to fit onto one disk, you can tell LVM to move it over, and remove the other disks.


There are four steps to doing this.

  1. Reduce the size of the filesystem to less than 4TB. (resize2fs)

    Reduce the size of the filesystem to less than 4TB. (resize2fs)

  2. Reduce the size of the logical volume to less than 4TB. (lvreduce)

    Reduce the size of the logical volume to less than 4TB. (lvreduce)

    (This step can lose data if you truncate the filesystem too far, so read the manpage!)

  3. Move the logical volume away from each drive. (pvmove <source pv> <dest pv>)

    (You'll need to do this one disk at a time.)

  4. Remove the disk. (vgreduce then pvremove)

(This step can lose data if you truncate the filesystem too far, so read the manpage!) 3. Move the logical volume away from each drive. (pvmove <source pv> <dest pv>)

(You'll need to do this one disk at a time.)

  1. Remove the disk. (vgreduce then pvremove)

My specific detail that doesn't seem to be addressed in other questions is the physical location of the data that I'm trying to preserve -- if I don't know which PV a file physically resides on, how can I confidently resize2fs and then ultimately pvremove?

You don't need to know that. That's LVM's job. resize2fs works on the logical volume, which is allowed to span multiple disks. Once your filesystem is small enough to fit onto one disk, you can tell LVM to move it over, and remove the other disks.


There are four steps to doing this.

  1. Reduce the size of the filesystem to less than 4TB. (resize2fs)
  2. Reduce the size of the logical volume to less than 4TB. (lvreduce)

(This step can lose data if you truncate the filesystem too far, so read the manpage!) 3. Move the logical volume away from each drive. (pvmove <source pv> <dest pv>)

(You'll need to do this one disk at a time.)

  1. Remove the disk. (vgreduce then pvremove)

My specific detail that doesn't seem to be addressed in other questions is the physical location of the data that I'm trying to preserve -- if I don't know which PV a file physically resides on, how can I confidently resize2fs and then ultimately pvremove?

You don't need to know that. That's LVM's job. resize2fs works on the logical volume, which is allowed to span multiple disks. Once your filesystem is small enough to fit onto one disk, you can tell LVM to move it over, and remove the other disks.


There are four steps to doing this.

  1. Reduce the size of the filesystem to less than 4TB. (resize2fs)

  2. Reduce the size of the logical volume to less than 4TB. (lvreduce)

    (This step can lose data if you truncate the filesystem too far, so read the manpage!)

  3. Move the logical volume away from each drive. (pvmove <source pv> <dest pv>)

    (You'll need to do this one disk at a time.)

  4. Remove the disk. (vgreduce then pvremove)

deleted 34 characters in body
Source Link
Rui F Ribeiro
  • 58k
  • 28
  • 156
  • 237

My specific detail that doesn't seem to be addressed in other questions is the physical location of the data that I'm trying to preserve -- maybe I'm just a noob w/ LVM, but if I don't know which PV a file physically resides on, how can I confidently resize2fs and then ultimately pvremove?

You don't need to know that. That's LVM's job. resize2fs works on the logical volume, which is allowed to span multiple disks. Once your filesystem is small enough to fit onto one disk, you can tell LVM to move it over, and remove the other disks.


There are four steps to doing this.

  1. Reduce the size of the filesystem to less than 4TB. (resize2fs)
  2. Reduce the size of the logical volume to less than 4TB. (lvreduce)

(This step can lose data if you truncate the filesystem too far, so read the manpage!) 3. Move the logical volume away from each drive. (pvmove <source pv> <dest pv>)

(You'll need to do this one disk at a time.)

  1. Remove the disk. (vgreduce then pvremove)

My specific detail that doesn't seem to be addressed in other questions is the physical location of the data that I'm trying to preserve -- maybe I'm just a noob w/ LVM, but if I don't know which PV a file physically resides on, how can I confidently resize2fs and then ultimately pvremove?

You don't need to know that. That's LVM's job. resize2fs works on the logical volume, which is allowed to span multiple disks. Once your filesystem is small enough to fit onto one disk, you can tell LVM to move it over, and remove the other disks.


There are four steps to doing this.

  1. Reduce the size of the filesystem to less than 4TB. (resize2fs)
  2. Reduce the size of the logical volume to less than 4TB. (lvreduce)

(This step can lose data if you truncate the filesystem too far, so read the manpage!) 3. Move the logical volume away from each drive. (pvmove <source pv> <dest pv>)

(You'll need to do this one disk at a time.)

  1. Remove the disk. (vgreduce then pvremove)

My specific detail that doesn't seem to be addressed in other questions is the physical location of the data that I'm trying to preserve -- if I don't know which PV a file physically resides on, how can I confidently resize2fs and then ultimately pvremove?

You don't need to know that. That's LVM's job. resize2fs works on the logical volume, which is allowed to span multiple disks. Once your filesystem is small enough to fit onto one disk, you can tell LVM to move it over, and remove the other disks.


There are four steps to doing this.

  1. Reduce the size of the filesystem to less than 4TB. (resize2fs)
  2. Reduce the size of the logical volume to less than 4TB. (lvreduce)

(This step can lose data if you truncate the filesystem too far, so read the manpage!) 3. Move the logical volume away from each drive. (pvmove <source pv> <dest pv>)

(You'll need to do this one disk at a time.)

  1. Remove the disk. (vgreduce then pvremove)
Source Link
Nick ODell
  • 2.8k
  • 3
  • 23
  • 29
Loading