[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Nbd] 3TB disk ... Exported device is too big for me. Get 64-bit machine



Salatiel Filho <salatiel.filho@...17...> writes:

> I am trying to connect to a 3TB nbd exported disk from a MIPS machine
> in to a debian ARM machine.
> When i try to connect i get 'Exported device is too big for me. Get
> 64-bit machine'.
> Is there a way to make this connection work ?
>
> []'s
> Salatiel

Looking at the code (nbd 3.0):

  #ifdef NBD_SET_SIZE_BLOCKS
	if ((size64>>12) > (uint64_t)~0UL) {
		printf("size = %luMB", (unsigned long)(size64>>20));
		err("Exported device is too big for me. Get 64-bit machine :-(\n");
	} else
		printf("size = %luMB", (unsigned long)(size64>>20));
  #else
	if (size64 > (~0UL >> 1)) {
		printf("size = %luKB", (unsigned long)(size64>>10));
		err("Exported device is too big. Get 64-bit machine or newer kernel :-(\n");
	} else
		printf("size = %lu", (unsigned long)(size64));
  #endif

And NBD_SET_SIZE_BLOCKS is defined in nbd.h. This should allow devices
up to 2^32 pages or 16 TiB on 32bit machines. Maybe this is a recent
feature and your nbd client is too old?

Other than that you would have to introduce a new syscall to the kernel
that uses an off64_t instead of a long for the size.

MfG
        Goswin



Reply to: