Skip to contentSkip to conversation

device mapper and resizing devices

DISCUSSION Andy 3 participants 5 messages Mar 1, 2005 – Mar 2, 2005 Device mapper

lore
Share & tools
lore

Andy

author
#0 lore raw

I am using dm-multipath on non-partitioned (xfs) devices on a SAN. If I resize the device, and rescan my path devices (i.e rescan /dev/sda, /dev/sdb, /dev/sdc,/dev/sdd (all the same path)) the kernel sees the new size of the individual devices, but the /sys/block/dm-0 device is still the old size. I believe this is the reason why I cannot grow my xfs filesystem without doing a reboot so that the dm device will have the new size. I'd like to avoid unmounting and rebooting to resize the device. I haven't played with lvm enough to feel comfortable using it. Is there any way to get the dm device to be the proper size, or is this a bug, or a feature that needs further discussion?

Andy

#1 lore raw

As far as I understand this is not supported. What we do is we add a new device, we then do sg_reset -b /dev/sgX and then we add them into the volume group and then we resize it.

I would also warn you that we have seen corruption repeatable times with xfs over devicemapper under 2.6.

Cheers
Arthur

-----
CTO @ Fotango Ltd
+447834716919
http://www.fotango.com/

Quoted 17 lines · Andy

I am using dm-multipath on non-partitioned (xfs) devices on a SAN. If I resize the device, and rescan my path devices (i.e rescan /dev/sda, /dev/sdb, /dev/sdc,/dev/sdd (all the same path)) the kernel sees the new size of the individual devices, but the /sys/block/dm-0 device is still the old size. I believe this is the reason why I cannot grow my xfs filesystem without doing a reboot so that the dm device will have the new size. I'd like to avoid unmounting and rebooting to resize the device. I haven't played with lvm enough to feel comfortable using it. Is there any way to get the dm device to be the proper size, or is this a bug, or a feature that needs further discussion?

Andy

--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel

#2 lore raw
In reply to Andy
Quoted 11 lines · Andy

I am using dm-multipath on non-partitioned (xfs) devices on a SAN. If I resize the device, and rescan my path devices (i.e rescan /dev/sda, /dev/sdb, /dev/sdc,/dev/sdd (all the same path)) the kernel sees the new size of the individual devices, but the /sys/block/dm-0 device is still the old size. I believe this is the reason why I cannot grow my xfs filesystem without doing a reboot so that the dm device will have the new size. I'd like to avoid unmounting and rebooting to resize the device. I haven't played with lvm enough to feel comfortable using it. Is there any way to get the dm device to be the proper size, or is this a bug, or a feature that needs further discussion?

Runing "multipath" again, after rescans, should pick up the size change and adjust the device map.

If not please report.

Regards,

Signature · 1 line
christophe varoqui <[email protected]>
author
#3 lore raw
Quoted 13 lines · christophe varoqui
Quoted 11 lines · Andy

I am using dm-multipath on non-partitioned (xfs) devices on a SAN. If I resize the device, and rescan my path devices (i.e rescan /dev/sda, /dev/sdb, /dev/sdc,/dev/sdd (all the same path)) the kernel sees the new size of the individual devices, but the /sys/block/dm-0 device is still the old size. I believe this is the reason why I cannot grow my xfs filesystem without doing a reboot so that the dm device will have the new size. I'd like to avoid unmounting and rebooting to resize the device. I haven't played with lvm enough to feel comfortable using it. Is there any way to get the dm device to be the proper size, or is this a bug, or a feature that needs further discussion?

Quoted 3 lines

Runing "multipath" again, after rescans, should pick up the size change and adjust the device map.

multipath does, and prints the new size, but it is unable to add the target to the dm table because dev_size in device-mapper is still the smaller size and I get the "device x:yy too small for target" message (/sys/block/dm-x/size still shows the old size, even when everything else has the new size).

Andy