• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Ubuntu: Changing the stripe size of a striped LVM volume

by admin

Question: How can we change the stripe size of an existing logical volume?

The logical volume (LV) must be converted to type RAID5 and then back to type striped to change the stripe size. An example is shown on how to change the stripe size of a logical volume with a default stripe size of 64K to a stripe size of 128K.

1. First convert to type RAID5:

# lvconvert --type raid5 vgtest/stripelv
# lvs -ao +lv_full_name,devices,stripe_size

2. Then, reshape the RAID5, changing the stripe size:

# lvconvert -I 128 vgtest/stripelv
# lvs -ao +lv_full_name,devices,stripe_size

Note that this requires a small amount of extra space for the reshaping, typically about 1 extent. This extra space allows blocks in a stripe to be updated safely, and not be corrupted in case of a crash. If a crash occurs, reshaping can simply be restarted.

3. Now that we have modified the stripe size, we can convert back to type striped, where you will see that the stripe size is modified.

# lvconvert --type striped vgtest/stripelv
# lvs -ao +lv_full_name,devices,stripe_size

Final Word

For more information on reshaping and takeover, please see man lvmraid:

# man lvmraid

Also, after each type conversion, from stripe to raid, and then back to stripe, ensure that the conversion has completely finished before moving on. This can be monitored with the ‘watch lvs -o sync_percent [logical_volume]’ command.

# watch lvs -o sync_percent [logical_volume]

Filed Under: Linux, Ubuntu

Some more articles you might also be interested in …

  1. “git reset” Command Examples
  2. How to Save Command history of Selected Users in Linux
  3. strace Command Examples in Linux
  4. jp2a Command Examples
  5. How to uninstall libcurl4-openssl-dev software package in Ubuntu
  6. pvresize Command Examples in Linux
  7. sic Command Examples in Linux
  8. i3-scrot Command Examples in Linux
  9. fprintd-list: command not found
  10. “gnmic set” Command Examples

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright