All of lore.kernel.org
 help / color / mirror / Atom feed
* Resize doesnt work as expected
@ 2016-05-28 20:32 Peter Becker
  2016-05-28 20:52 ` Alexander Fougner
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Becker @ 2016-05-28 20:32 UTC (permalink / raw)
  To: linux-btrfs

Hello, i have found a small issue but i doesn't know if this is intended.

Starting with a RAID 1 setup with 3 x 4GB devices.
If you replace one of this devices with a 2GB device and run "resize
max" nothing happens.
Only if you resize with the device-ID the additional GB will be usable.
Loop at this demo:
(its my first try with  loopback devices :))


[ -f /tmp_resize ] && rm -f /tmp_resize

mkdir /tmp_resize
dd if=/dev/zero of=/tmp_resize/btrfs-vol1.img bs=1G count=1
dd if=/dev/zero of=/tmp_resize/btrfs-vol2.img bs=1G count=1
dd if=/dev/zero of=/tmp_resize/btrfs-vol3.img bs=1G count=1
dd if=/dev/zero of=/tmp_resize/btrfs-vol4.img bs=1G count=1
dd if=/dev/zero of=/tmp_resize/btrfs-vol5.img bs=2G count=1

losetup /dev/loop1 /tmp_resize/btrfs-vol1.img
losetup /dev/loop2 /tmp_resize/btrfs-vol2.img
losetup /dev/loop3 /tmp_resize/btrfs-vol3.img
losetup /dev/loop4 /tmp_resize/btrfs-vol4.img
losetup /dev/loop5 /tmp_resize/btrfs-vol5.img

mkfs.btrfs -d raid1 /dev/loop1 /dev/loop2 /dev/loop3 /dev/loop4

btrfs filesystem show /dev/loop2

mkdir /media/test

mount /dev/loop3 /media/test

echo "Vorher"
btrfs fi sh

echo "Replace 1G device with 2G device"
btrfs repl start /dev/loop4 /dev/loop5 /media/test

echo "After replace, still 1GB usable"
btrfs fi sh

echo "Resize"
btrfs fi res max /media/test

echo "After resize, still 1GB usable !!!!"
btrfs fi sh

echo "Resize with device id"
btrfs fi res 4:max /media/test

echo "!!! now 2GB usable !!!!"
btrfs fi sh

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-05-29 18:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-28 20:32 Resize doesnt work as expected Peter Becker
2016-05-28 20:52 ` Alexander Fougner
2016-05-28 21:42   ` Peter Becker
2016-05-29 17:11     ` Chris Murphy
2016-05-29 18:16       ` Peter Becker
2016-05-29 18:29         ` Chris Murphy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.