All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roman Mamedov <rm@romanrm.net>
To: Ulli Horlacher <framstag@rus.uni-stuttgart.de>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: how to extend a btrfs disk image?
Date: Thu, 17 Dec 2020 19:12:07 +0500	[thread overview]
Message-ID: <20201217191207.17243c40@natsu> (raw)
In-Reply-To: <20201217123008.GA22831@tik.uni-stuttgart.de>

On Thu, 17 Dec 2020 13:30:08 +0100
Ulli Horlacher <framstag@rus.uni-stuttgart.de> wrote:

> root@fextest:/nfs/rusnas/fex# mount disk1.btrfs /mnt/tmp
> root@fextest:/nfs/rusnas/fex# df -TH /mnt/tmp
> Filesystem     Type   Size  Used Avail Use% Mounted on
> /dev/loop2     btrfs   16T  3.7M   16T   1% /mnt/tmp

You see here 'mount' has transparently created a 'loop device' for you in order
to mount the FS.

> Now I want to extend this filesystem, but this approach fails:
> 
> root@fextest:/nfs/rusnas/fex# touch disk2.btrfs
> root@fextest:/nfs/rusnas/fex# truncate -s 16TB disk2.btrfs
> root@fextest:/nfs/rusnas/fex# btrfs device add /nfs/rusnas/fex/disk2.btrfs /mnt/tmp
> ERROR: /nfs/rusnas/fex/disk2.btrfs is not a block device

Since file is not a block device, here you have to do the same manually. See
documentation for 'losetup'.

-- 
With respect,
Roman

  reply	other threads:[~2020-12-17 14:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-17 12:30 how to extend a btrfs disk image? Ulli Horlacher
2020-12-17 14:12 ` Roman Mamedov [this message]
2020-12-19 22:59   ` Ulli Horlacher
2020-12-20  9:22     ` Roman Mamedov
2020-12-20 10:35       ` Ulli Horlacher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201217191207.17243c40@natsu \
    --to=rm@romanrm.net \
    --cc=framstag@rus.uni-stuttgart.de \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.