All of lore.kernel.org
 help / color / mirror / Atom feed
* Moving over to use BTRFS - first time, needs encryption
@ 2013-10-29 15:19 btrfs.nrb
  2013-10-29 17:27 ` Moving over to use BTRFS - first time, needs encryption (btrfs: message 1 of 20) Nigel Bray
  2013-10-29 17:29 ` Moving over to use BTRFS - first time, needs encryption Duncan
  0 siblings, 2 replies; 3+ messages in thread
From: btrfs.nrb @ 2013-10-29 15:19 UTC (permalink / raw)
  To: linux-btrfs

Hi,  I would be pleased to get some help after I have looked and not
figured out how this should work:

Summary
=======
btrfs device add <LUKS encrypted container> <path>
Returns - Inappropriate ioctl for device

Details
=====
// I have an existing btrfs file system

// built from one ~650G partition in middle of 1TB GPT disk,
// luksFormat 'ed
// mkfs.btrfs 'ed

// mounted and used successfully with:
# a=451609d5-89f5-4826-9052-ca60897d493e &&
b=ec3fb67c-41c2-4920-b67c-3d3b6451a1ee && c=ec3 && d=/data/nrb/
// myMount (a=LUKS UUID, b=BTRFS UUID, c=mount directory, d=mount path)
# sudo cryptsetup luksOpen /dev/disk/by-uuid/"${a}" "${a}" && mkdir -p
"$d$c" && sudo mount -U "$b" "$d$c" ; sudo blkid | grep $a ; sudo
blkid | grep $b ; sudo btrfs fi df "$d$c"
/dev/sdX5: UUID="451609d5-89f5-4826-9052-ca60897d493e" TYPE="crypto_LUKS"
/dev/mapper/451609d5-89f5-4826-9052-ca60897d493e:
UUID="ec3fb67c-41c2-4920-b67c-3d3b6451a1ee"
UUID_SUB="99ca8ddf-39d5-4c0d-b967-62aa6e76769d" TYPE="btrfs"

// Then to add a new encrypted device
// built from one 400G
// luksFormat 'ed
// no file system

# a=1965f0dc-c4df-43ec-8c13-56aebec5d886 && c=ec3 && d=/data/nrb/
// (a=LUKS UUID, c=existing mounted BTRFS filesystem directory, d=mount path)
# sudo cryptsetup luksOpen /dev/disk/by-uuid/"${a}" "${a}"
# btrfs device add /dev/disk/by-uuid/"${a}" "$d$c"
ERROR: error adding the device
'/dev/disk/by-uuid/1965f0dc-c4df-43ec-8c13-56aebec5d886' -
Inappropriate ioctl for device
// similar errors after trying /dev/dm-7 and /dev/sda2

# btrfs --version
Btrfs Btrfs v0.19
# uname -a
Linux 874-deb 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux

BR/ Nigel


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-10-29 17:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-29 15:19 Moving over to use BTRFS - first time, needs encryption btrfs.nrb
2013-10-29 17:27 ` Moving over to use BTRFS - first time, needs encryption (btrfs: message 1 of 20) Nigel Bray
2013-10-29 17:29 ` Moving over to use BTRFS - first time, needs encryption Duncan

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.