LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-02-2009, 12:42 PM   #1
Pearlseattle
Member
 
Registered: Aug 2007
Location: Zurich, Switzerland
Distribution: Gentoo
Posts: 999

Rep: Reputation: 142Reputation: 142
btrfs filesystem - problems with btrfsctl when shrinking & defragmenting fs


Hello folks

I'd like to try out the new butter filesystem / btrfs but I'm having some problems with the features I'm more interested in - the defragmentation and the shrinking/growing of the fs - both to be triggered by the "btrfsctl" executable.

First of all some details about the system on which I am performing the tests:
- Gentoo distribution
- Kernel 2.6.28
- btrfs-progs package version 0.18
- btrfs kernel module 0.17

I created a 5GB file, formatted and mounted it:
Code:
dd if=/dev/zero of=2delete.img bs=100k count=50000
Code:
mkfs.btrfs 2delete.img

WARNING! - Btrfs Btrfs v0.18 IS EXPERIMENTAL
WARNING! - see http://btrfs.wiki.kernel.org before using

fs created label (null) on 2delete.img
        nodesize 4096 leafsize 4096 sectorsize 4096 size 4.77GB
Btrfs Btrfs v0.18
Code:
mount -v -o loop 2delete.img /mnt/temp/
df -h /mnt/temp/
Filesystem            Size  Used Avail Use% Mounted on
/dev/loop0            4.8G   28K  4.8G   1% /mnt/temp
Then I tried to shrink it, or defragment it, but the error message I get is always the same one:
Code:
btrfsctl -r -1M /mnt/temp    
ioctl:: Inappropriate ioctl for device
Code:
btrfsctl -d /mnt/temp
ioctl:: Inappropriate ioctl for device
This doesn't work too:
Code:
btrfsctl -a           
Scanning for Btrfs filesystems
failed to read /dev/sr0
And this doesn't bring back any interesting information:
Code:
btrfsctl -A /dev/loop0
operation complete
Btrfs Btrfs v0.18
I tried out all this as well with a "real" HDD (but it's an external one, connected through USB2) and I get exactly the same results.

Am I doing something wrong? Well, I think I did the same as explained here http://btrfs.wiki.kernel.org/index.php/Btrfsctl so probably the support is not yet ok, or?
Thanks a lot.
 
Old 05-06-2009, 12:14 PM   #2
Pearlseattle
Member
 
Registered: Aug 2007
Location: Zurich, Switzerland
Distribution: Gentoo
Posts: 999

Original Poster
Rep: Reputation: 142Reputation: 142
Solved - I needed the kernel module and the userspace utilities to be on the same version number. Stupid mistake - thanks anyway... .
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LVM and shrinking the root filesystem coreychch Linux - Newbie 5 11-22-2015 10:35 PM
LXer: Linux Don't Need No Stinkin' ZFS: BTRFS Intro & Benchmarks LXer Syndicated Linux News 0 04-23-2009 02:30 AM
LXer: Using The BTRFS Filesystem On Debian Lenny LXer Syndicated Linux News 0 04-01-2009 01:40 PM
LXer: Kernel 2.6.29: Corbet Says Btrfs Next Generation Filesystem LXer Syndicated Linux News 0 01-13-2009 05:00 PM
LXer: Linux Foundation End User Summit: New BtrFS Filesystem and Knowledge Center LXer Syndicated Linux News 0 10-18-2008 04:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration