Mailing List Archive

online shrinking problem
Hello,

I try to shrink a drbd device online. The documentation says:

"To shrink DRBD on-line, issue the following command *after* you have
shrunk the file system residing on top of it:

# drbdadm resize --size=<new-size> <resource>

You may use the usual multiplier suffixes for *<new-size>* (K, M, G etc.).
After you have shrunk DRBD, you may also shrink the containing block device
(if it supports shrinking)."

cat /proc/drbd
version: 8.4.1 (api:1/proto:86-100)
GIT-hash: 91b4c048c1a0e06777b5f65d312b38d47abaea80 build by root@somehost,
2012-03-18 09:32:17

<snip>
2: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate C r-----
ns:0 nr:0 dw:0 dr:3588 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0
<snip>

drbdadm -V
DRBDADM_BUILDTAG=GIT-hash:\ 91b4c048c1a0e06777b5f65d312b38d47abaea80\
build\ by\ root@somehost\,\ 2012-03-18\ 09:32:08
DRBDADM_API_VERSION=1
DRBD_KERNEL_VERSION_CODE=0x080401
DRBDADM_VERSION_CODE=0x080401
DRBDADM_VERSION=8.4.1

fdisk -l /dev/drbd2

Disk /dev/drbd2: 78.4 GB, 78380724224 bytes
255 heads, 63 sectors/track, 9529 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xa97119f5

Device Boot Start End Blocks Id System

No partitions at all, no filesystem either, as this is just a test for the
real resize of a live system.

The problem:

# drbdadm resize --size=60G r2
drbdadm: unrecognized option '--size'
try 'drbdadm help resize'

'drbdadm help resize' doesn't mention --size as possible option

I'd like to know how can I shrink my drbd device.

Thanks for your help.
Re: online shrinking problem [ In reply to ]
On 06/07/2012 02:13 AM, Charles Tree wrote:
> Hello,
>
> I try to shrink a drbd device online. The documentation says:
>
> "To shrink DRBD on-line, issue the following command *after* you have
> shrunk the file system residing on top of it:
>
> # drbdadm resize --size=<new-size> <resource>
>
> You may use the usual multiplier suffixes for *<new-size>* (K, M, G etc.).
> After you have shrunk DRBD, you may also shrink the containing block device
> (if it supports shrinking)."
>
> cat /proc/drbd
> version: 8.4.1 (api:1/proto:86-100)
> GIT-hash: 91b4c048c1a0e06777b5f65d312b38d47abaea80 build by root@somehost,
> 2012-03-18 09:32:17
>
> <snip>
> 2: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate C r-----
> ns:0 nr:0 dw:0 dr:3588 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0
> <snip>
>
> drbdadm -V
> DRBDADM_BUILDTAG=GIT-hash:\ 91b4c048c1a0e06777b5f65d312b38d47abaea80\
> build\ by\ root@somehost\,\ 2012-03-18\ 09:32:08
> DRBDADM_API_VERSION=1
> DRBD_KERNEL_VERSION_CODE=0x080401
> DRBDADM_VERSION_CODE=0x080401
> DRBDADM_VERSION=8.4.1
>
> fdisk -l /dev/drbd2
>
> Disk /dev/drbd2: 78.4 GB, 78380724224 bytes
> 255 heads, 63 sectors/track, 9529 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disk identifier: 0xa97119f5
>
> Device Boot Start End Blocks Id System
>
> No partitions at all, no filesystem either, as this is just a test for the
> real resize of a live system.
>
> The problem:
>
> # drbdadm resize --size=60G r2
> drbdadm: unrecognized option '--size'
> try 'drbdadm help resize'
>
> 'drbdadm help resize' doesn't mention --size as possible option

Oops, thanks for bringing this to our attention we'll have that fixed soon.

>
> I'd like to know how can I shrink my drbd device.

This should work for the time being.

drbdadm -- --size=60G resize r2



--
Devin Vance
LINBIT | "Your Way to High Avialability"
1-503-573-1262 | 1-877-4-LINBIT
Web: http://www.linbit.com
_______________________________________________
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user