btrfs.nrb@9ox.net
2013-Oct-29 15:19 UTC
Moving over to use BTRFS - first time, needs encryption
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 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Nigel Bray
2013-Oct-29 17:27 UTC
Re: Moving over to use BTRFS - first time, needs encryption (btrfs: message 1 of 20)
Update: I found this: .. by upgrading kernel ...according to the BTRFS wiki, changing raid levels after the filesystem has been created isn''t supported for 3.2 series and older kernels. Need to move from stable stock., > Ubuntu 12.04LTS and Debian 7.2. http://serverfault.com/questions/496503/converting-btrfs-filesystem-to-raid1-fails-with-inappropriate-ioctl-for-device -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
btrfs.nrb posted on Tue, 29 Oct 2013 15:19:19 +0000 as excerpted:> 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> # 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[I''ve no particular personal knowledge on encrypted filesystem usage, but this is a general reply...] First, are you aware of the btrfs wiki and have you read its encryption discussion (among other things)? https://btrfs.wiki.kernel.org Second, if you''ve read the wiki you know this already, but it''s worth repeating... btrfs is still under heavy development and still labeled experimental. As such, if you''re running btrfs you are by definition testing an experimental filesystem and should consider data reliability in that regard. IOW, KEEP TESTED BACKUPS AND BE PREPARED TO USE THEM should your btrfs tests go badly! Further, every new kernel brings important fixes to known issues, and anything older than two kernel series old is ANCIENT. Ideally, you''re on the latest stable kernel release at the OLDEST, and may well be running mainline kernel rcs if not even the btrfs-next patch-set. (Personally, I run a mainline git kernel, but don''t normally update to the development kernel until after rc1, but try to get to it before rc3, so if I notice any regressions I can file bugs with time to have them fixed before release.) Run anything older and not only are you very literally needlessly risking your data on known bugs that are already fixed, but if you do catch a bug and report it, your reports will be less useful because your kernel is so old. For btrfs testers, kernel 3.2 is "ancient as the hills!" There are reasons people might want to be conservative and run older kernels, but they really aren''t compatible with the reasons people would want to test new and potentially unstable filesystems such as btrfs. Please choose one or the other, and if you''re going to test btrfs, do so with a current kernel, currently meaning a post-3.11.5 stable series kernel at the oldest as I believe it had some critical btrfs patches, or 3.12 release cadidates or live-git, since 3.12 is very close to release now. Similarly but not /quite/ as critical, btrfs-progs v0.19 is /old/. Even v0.20-rc1 is from late last year, IIRC, and according to the version string I have here[1], 358 commits behind current. btrfs-progs development policy is to keep the git master branch "release ready" and do actual development in other branches which are only merged when they''re considered ready, so running "git-master" of btrfs-progs, updated weekly or no less than monthly, should be your best and safest option. --- [1] Btrfs-progs here, live-git updated less than a week ago, tho from memory the latest commit was back in July or so: btrfs --version Btrfs v0.20-rc1-358-g194aa4a -- Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html