Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't replace the disk, during auto memory expansion #157

Open
UserAlexUser opened this issue Sep 20, 2024 · 0 comments
Open

I can't replace the disk, during auto memory expansion #157

UserAlexUser opened this issue Sep 20, 2024 · 0 comments

Comments

@UserAlexUser
Copy link

Hello, version:

uname -r
6.1.77

lvm version
LVM version:     2.03.22(2) (2023-08-02)
Library version: 1.02.196 (2023-08-02)
Driver version:  4.47.0

I create a thin volume on top of the raid with this command:

pvcreate -f /dev/sdb /dev/sdc /dev/sdd /dev/sdf
vgcreate lpol /dev/sdb /dev/sdc /dev/sdd /dev/sdf

lvcreate --type raid5 -L 20G -I 64K -n thin_vg_meta lpol -y
lvcreate --type raid5 -L 20G -I 64K -n thin_vg lpol -y

lvconvert --type thin-pool --poolmetadataspare n --poolmetadata lpol/thin_vg_meta lpol/thin_vg -y

lvcreate -y -V5T -T lpol/thin_vg -n t1

The volume has 20G size and expands automatically as more data written to.
I want to replace the disk while the volume is expanding, I do this with the following commands:

pvcreate -f /dev/sde
vgextend lpol /dev/sde
pvmove /dev/sdc /dev/sde
vgreduce lpol /dev/sdc
pvremove /dev/sdc

But after pvmove i can't vgreduce old disk. I get this message
Physical volume "/dev/sdc" still in use

I think it's because of lvextend thin volume, can you tell me how I can solve this problem, I need to replace disk while writing to it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant