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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • 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. mount: command not found
  2. How to Install the pip Package in CentOS/RHEL 7 and 8
  3. “Abort command issued nexus” error messages in /var/log/messages file
  4. mountpoint Command Examples in Linux
  5. RDEPENDS V/s DEPENDS in Yocto
  6. resize2fs: commnd not found
  7. jq: command not found (JSON CLI Parser)
  8. add-apt-repository Command Examples
  9. “uname” Command Examples to Check UNIX/Linux Version
  10. depmod: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • raw: command not found
  • raw Command Examples in Linux
  • rankmirrors Command Examples in Linux
  • radeontop: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright