Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Jonas Bonn <jonas@southpole.se>
To: linux-btrfs@vger.kernel.org
Subject: Seed device questions
Date: Fri, 28 Nov 2008 11:30:31 +0100	[thread overview]
Message-ID: <492FC847.1090605@southpole.se> (raw)

Hi,
I am trying the 'seed device' functionality, trying to get a read-only 
block-device to act as a seed for multiple other filesystems.

The following sequence works for setting up the first filesystem.

#-------------

#First initialize 'seed device'
mkfs.btrfs /dev/vdb
mount /dev/vdb /mnt
btrfs -S subvol /mnt
echo hello > /mnt/subvol/xxx
umount /mnt

#Make block device a "seed device" (read-only)
btrfstune -S 1 /dev/vdb

#Mount the seed device... it will be mounted read-only.
mount /dev/vdb /mnt

#Add the writeable block device
btrfs-vol -a /dev/vdc /mnt

#Now remount the filesystem read-write.
mount -oremount,rw /mnt

#Now all changes to /mnt should go to /dev/vdc.

#--------------

After this, however, it's not possible to mount /dev/vdb again in order to set 
up a second filesystem as seed.  I want to do:

mount /dev/vdb /othermnt
btrfs-vol -a /dev/vdd /othermnt
mount -oremount,rw /othermnt

So my questions (comments):

i)  Is the seed-device _really_ read-only... no metadata updates or anything? 
(i.e. I can have my seed device on read-only media)
ii)  Should it be possible to have a device as a 'seed' for multiple other 
filesystems.
iii)  When the seeded filesystem is created, the size of the filesystem is the 
aggregate of all devices, whereas it should be the aggregate size of only the 
'writable' devices.

/Jonas


             reply	other threads:[~2008-11-28 10:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-28 10:30 Jonas Bonn [this message]
2008-11-28 13:19 ` Seed device questions Yan Zheng

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=492FC847.1090605@southpole.se \
    --to=jonas@southpole.se \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox