Discussion:
Resize DRBD / XFS without LVM
Stefan Priebe - allied internet ag
2009-11-24 09:14:07 UTC
Permalink
Hi!

I've two servers running DRBD with a XFS Filesystem. I'm not using LVM.
Now i want to resize / grow the XFS Filesystem.

How is this working?

- resize both Raid Arrays (not resizing any partition)

But what to do next? I can delete the partition table and create a new
one with the same starting but i've to stop DRBD to reread the partition
table but then DRBD does not find his metadata anymore.

Greets.

Stefan
Stefan Seifert
2009-11-24 09:40:39 UTC
Permalink
Post by Stefan Priebe - allied internet ag
I've two servers running DRBD with a XFS Filesystem. I'm not using LVM.
Now i want to resize / grow the XFS Filesystem.
How is this working?
- resize both Raid Arrays (not resizing any partition)
But what to do next? I can delete the partition table and create a new
one with the same starting but i've to stop DRBD to reread the partition
table but then DRBD does not find his metadata anymore.
No you haven't. Like newer versions of fdisk you can use partprobe to tell the
kernel to re-read partition tables.

Regards,
Stefan
Stefan Priebe - allied internet ag
2009-11-24 10:03:11 UTC
Permalink
Post by Stefan Seifert
No you haven't. Like newer versions of fdisk you can use partprobe to tell the
kernel to re-read partition tables.
Regards,
Stefan
Thanks Stefan for your answer. I know partprobe - but does it work on a
mounted partition? Or is it more like:

- expand raid
- unmount part. on primary
- delete part. via fdisk and create new part
- on primary: drbdadm resize resource
- on primary: xfs_grow to grow the fs

=> done.

So the document
http://www.drbd.org/users-guide/s-resizing.html
here is outdated?

Cause it is written that:
"
The affected resource's backing device must be one managed by a logical
volume management subsystem, such as LVM or EVMS.
"

Greets
Stefan
Stefan Priebe - allied internet ag
2009-11-24 11:04:06 UTC
Permalink
Does anybody know how long the
"drbdadm resize resource" takes and how long xfs_grow?

Stefan
Post by Stefan Priebe - allied internet ag
Post by Stefan Seifert
No you haven't. Like newer versions of fdisk you can use partprobe to tell the
kernel to re-read partition tables.
Regards,
Stefan
Thanks Stefan for your answer. I know partprobe - but does it work on a
- expand raid
- unmount part. on primary
- delete part. via fdisk and create new part
- on primary: drbdadm resize resource
- on primary: xfs_grow to grow the fs
=> done.
So the document
http://www.drbd.org/users-guide/s-resizing.html
here is outdated?
"
The affected resource's backing device must be one managed by a logical
volume management subsystem, such as LVM or EVMS.
"
Greets
Stefan
Stefan Seifert
2009-11-24 15:27:55 UTC
Permalink
Post by Stefan Priebe - allied internet ag
Post by Stefan Seifert
No you haven't. Like newer versions of fdisk you can use partprobe to
tell the kernel to re-read partition tables.
Regards,
Stefan
Thanks Stefan for your answer. I know partprobe - but does it work on a
mounted partition?
For all I know it should work with a mounted partition as well. If the
partition were not mounted or otherwise used, you wouldn't need partprobe.

And I assume "mounted" in this context means "used as drbd storage device".
I also assume that by RAID you mean some hardware RAID, because partitioning
an MD RAID wouldn't make much sense.

Like with all these things it's a very good idea to first test it on a test
system. Ideally identical machines, but if not available at least some VM (we
use qemu for that and though its pretty slow, its enough for such tests). Life
gets so much more relaxed, if you don't have to experiment around with your
production machines :)

Regards,
Stefan
allied internet ag- Stefan Priebe
2009-11-25 07:32:02 UTC
Permalink
Hi!

Yes of cause HW Raid.

I'll do a test today - i've already prepared testequipment yesterday.

Stefan
Post by Stefan Seifert
Post by Stefan Priebe - allied internet ag
Post by Stefan Seifert
No you haven't. Like newer versions of fdisk you can use partprobe to
tell the kernel to re-read partition tables.
Regards,
Stefan
Thanks Stefan for your answer. I know partprobe - but does it work on a
mounted partition?
For all I know it should work with a mounted partition as well. If the
partition were not mounted or otherwise used, you wouldn't need partprobe.
And I assume "mounted" in this context means "used as drbd storage device".
I also assume that by RAID you mean some hardware RAID, because partitioning
an MD RAID wouldn't make much sense.
Like with all these things it's a very good idea to first test it on a test
system. Ideally identical machines, but if not available at least some VM (we
use qemu for that and though its pretty slow, its enough for such tests). Life
gets so much more relaxed, if you don't have to experiment around with your
production machines :)
Regards,
Stefan
Loading...