Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
New filesystem: Btrfs!
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3 ... 22, 23, 24, 25, 26  Next  
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
Veldrin
Veteran
Veteran


Joined: 27 Jul 2004
Posts: 1942
Location: Zurich, Switzerland

PostPosted: Sat Feb 27, 2010 2:19 pm    Post subject: Reply with quote

Has anybody tried btrfs on 2.6.33? (or any rc for that matter)
For some reason, my system seems unable to mount (multiple) subvol anymore. I can mount the root/system subvol, but any subsequent fail.

I there any option, that has been introduced in 2.6.33 that needs to be enable, in order to use btrfs? (As always, I copied the old config, and ran a make menuconfig to check for new/interesting parts, the compiled it through genkernel)

I try to get you more information...


cheers
V.
Back to top
View user's profile Send private message
Shining Arcanine
Veteran
Veteran


Joined: 24 Sep 2009
Posts: 1110

PostPosted: Sat Feb 27, 2010 3:44 pm    Post subject: Reply with quote

Earlier in the thread, I reported my problems with 2.6.33_rc4.
Back to top
View user's profile Send private message
Letharion
Veteran
Veteran


Joined: 13 Jun 2005
Posts: 1259
Location: Sweden

PostPosted: Sat Feb 27, 2010 3:51 pm    Post subject: Reply with quote

I started using 33-rc7, now on 33, no problems so far.
Back to top
View user's profile Send private message
Veldrin
Veteran
Veteran


Joined: 27 Jul 2004
Posts: 1942
Location: Zurich, Switzerland

PostPosted: Thu Mar 11, 2010 11:09 pm    Post subject: Reply with quote

Found the bugger - though I do not understand why...

This was my fstab entry whhich caused the problem.
Code:
/dev/sda3              /               btrfs           acl,user_xattr,defaults,subvol=gentoo   0 1       

removing acl,user_xattr solved to issue, and the root partition can be mounted correctly. (it seems that btrfs was ignoring those flags untill version 33)

cheers
V.
Back to top
View user's profile Send private message
Neo2
Apprentice
Apprentice


Joined: 25 Sep 2006
Posts: 224
Location: Italy

PostPosted: Sun Mar 14, 2010 7:53 pm    Post subject: Reply with quote

Hi all!
I'm not a user of btrfs (yet).
I'm bumping my liveCD and I've been asked to include btrfs-progs-9999 (usually I would have stuck with the latest ~arch).
The kernel which will be bundled is 2.6.33; while building the first stage of the discs I get this message from btrfs-progs:
Code:
* Messages for package sys-fs/btrfs-progs-9999:

 * GIT NEW clone -->
 *    repository:               git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs-unstable.git
 *    at the commit:            ab8fb4c99516c186641bda1dbc0e788f68b4dc77
 *    branch:                   master
 *    storage directory:        "/usr/portage/distfiles/git-src/btrfs-progs"
 * Note: btrfs-convert not built/installed (requires acl USE flag)
 * Note: btrfs-debug-tree not installed (requires debug-utils USE flag)
 * Note: btrfs-show-blocks not installed (requires debug-utils USE flag)
 * WARNING: This version of btrfs-progs uses the latest unstable code,
 *          and care should be taken that it is compatible with the
 *          version of btrfs in your kernel!

Now, what I'm concerned about is not the "WARNING" at the end, but rather the notes right after the git stats. Does anybody know how it would affect usability and functionality of the package?
Thanks :)

Cheers,
Neo2
_________________
Neo2
Unofficial minimal liveCD for x86/amd64 w/reiser4+truecrypt
Back to top
View user's profile Send private message
dufeu
l33t
l33t


Joined: 30 Aug 2002
Posts: 738
Location: US-FL-EST

PostPosted: Mon Mar 15, 2010 2:54 am    Post subject: Reply with quote

Neo2 wrote:
Hi all!
I'm not a user of btrfs (yet).
* Note: btrfs-convert not built/installed (requires acl USE flag)
* Note: btrfs-debug-tree not installed (requires debug-utils USE flag)
* Note: btrfs-show-blocks not installed (requires debug-utils USE flag)

I'm not a user yet either. I've just this last week gotten vanilla-sources-2.6.33 working to my satisfaction with all my other software.

You might find this of interest:
Code:
# emerge -pv btrfs-progs                                                                                                                                                                                           
These are the packages that would be merged, in order:                                                                                                                                                                                                                                         
Calculating dependencies... done!                                                                                                                                                         
[ebuild  N    ] sys-fs/btrfs-progs-0.19  USE="acl -debug-utils" 0 kB                                                                                                                                                                                                       
Total: 1 package (1 new), Size of downloads: 0 kB

The btrfs-convert utility converts existing ext4 disks to btrfs {with some limitations}. You need btrfs-tools compiled with USE="acl" in order to get a working btrfs-convert. The other two utilities only apply to people who can actually understand how to research disk block problems under btrfs. I most certainly would not be a member of that group. The use of btrfs-convert is documentated at the btrfs wiki {sorry, don't have link handy}.

Please note also this emerge message from btrfs-progs-0.19 which doesn't get printed with the version from the git repository:
Code:
 * WARNING: This version of btrfs-progs corresponds to and should only
 *          be used with the version of btrfs included in the
 *          Linux kernel (2.6.31 and above).
 *
 *          This version should NOT be used with earlier versions
 *          of the standalone btrfs module!

I don't have the knowledge base to let you know if the git repository version is specifically tied to the experimental code in the new 2.6.34_rc1 release candidate. It's probably something you should check for. Otherwise, you might be better sticking with btrfs-progs-0.19 rather than git version. i.e. Check with the person making the request if they are simply interested in the very latest or if they have an actual rationale.

If you look earlier in this thread, there are comments regarding a temporary hard limit of allowing btrfs partitions to get no more than 75% full. When this changes, I suspect btrfs-progs might be effected. Hence I would want confirmation that the git version of btrfs-progs that you end up pulling would still work with the 2.6.33 modules since possible future updates in 2.6.34_rc# may remove this {and possibly other limits}.

{edit} The last paragraph is old info. The percent full barrier has already been removed and doesn't apply.

Based on my readings both here and elsewhere, the version of btrfs-progs pulled from the git repository should work fine with 2.6.33. Read the posts in page 19 of this thread.
_________________
People whom think M$ is mediocre, don't know the half of it.


Last edited by dufeu on Mon Mar 15, 2010 12:56 pm; edited 1 time in total
Back to top
View user's profile Send private message
psdasilva
Apprentice
Apprentice


Joined: 03 Sep 2005
Posts: 236

PostPosted: Mon Mar 15, 2010 4:46 am    Post subject: Reply with quote

Sorry if this is already in this thread. It is too long to search for ...

Just 2 qs.:

I have just installed gentoo-sources 2.6.32-r7. I tried btrfs. It seems to work but I could not delete a snapshot.
I have btrfs-progs 0.19 and it seems that its btrfsctl does not know -D.

1. Does btrfs-progs-9999 work with this kernel (2.6.32-r7)?

2. If yes, how do I unmask it?

Thanks a lot for any answer/comment.
Back to top
View user's profile Send private message
Neo2
Apprentice
Apprentice


Joined: 25 Sep 2006
Posts: 224
Location: Italy

PostPosted: Mon Mar 15, 2010 1:10 pm    Post subject: Reply with quote

@dufeu:
Thanks for answering, I've looked further onto the btrfs wiki.
btrfs-progs-9999 pulls in these fixes over v0.19:
Quote:
2009-11-12 Chris Mason Add btrfs-map-logical program to map and read logical... master
2009-09-21 Yan, Zheng btrfsck: check root back/forward references
2009-09-21 Yan, Zheng btrfsctl: add snapshot/subvolume destroy ioctl
2009-06-12 Yan Zheng used space accounting fix for the converter

I think these are pretty important ones to have (especially for a liveCD) so I'll stick with the git version =)
The subvol branch from the git repo contains experimental/fresh code for subvolumes (in addition to those fixes above), but I'm unwilling to use it (due to its experimental nature).
I've also investigated about the version incompatibilities. Basically, everyone using >2.6.31-rc1 should stick with v0.19 (as stated in the btrfs changelog):
Quote:
v0.19 (Jun 2009)
v0.19 is a forward rolling format change, which means that it can read the v0.18 disk format but older kernels and older btrfs-progs code will not be able to read filesystems created with v0.19. The new code changes the way that extent back references are recorded, making them significantly more efficient. In general, v0.19 is a dramatic speed improvement over v0.18 in almost every workload.

The v0.19 utilities are meant for use with kernels 2.6.31-rc1 and higher. Git trees are available with the new format code for 2.6.30 kernels, please see the download section for details.

If you do not wish to roll forward to the new disk format, use the v0.18 utilities.

I do not wish to enable acl use flag: that would require other changes in other packages and I trust that most of the people out there using btrfs are doing it for fun or debugging, not for storing any valuable data or using it as the OS primary partition (and thus converting from ext4). From what I read, btrfs has still some major problems with free space checking and data allocation, so I assume it to be not stable nor usable.

@psdasilva:
1) Yes, btrfs-progs-9999 works with 2.6.32-r7
2) echo "sys-fs/btrfs-progs **" >> /etc/portage/package.keywords/btrfs-progs

Cheers,
Neo2
_________________
Neo2
Unofficial minimal liveCD for x86/amd64 w/reiser4+truecrypt
Back to top
View user's profile Send private message
dufeu
l33t
l33t


Joined: 30 Aug 2002
Posts: 738
Location: US-FL-EST

PostPosted: Mon Mar 15, 2010 1:34 pm    Post subject: Reply with quote

psdasilva wrote:
Sorry if this is already in this thread. It is too long to search for ...

...

2. If yes, how do I unmask it?

First, you would find it of interest to read the posts starting from page 19 in this thread.

Second, to answer your question regarding btrfs-progs-9999, you need to add a keyword. For the life of me, I can't recall what keyword to add. Someone else will have to answer that.

You may also want to have on hand Neo2's new minimal LiveCD which now includes support for btrfs. You should read his "Unofficial minimal 2008.0 for x86/amd64 w/reiser4+truecrypt" thread.

Other information can be had from the btrfs wiki.

Finally, you'll probably find the "Btrfs and Raid setup" thread of interest as well.

{edit}

Darn you Neo2! :D :D

You're too quick! And thanks for including the adding of the keyword. I couldn't find it in the relevant Gentoo Documentation.
_________________
People whom think M$ is mediocre, don't know the half of it.
Back to top
View user's profile Send private message
dufeu
l33t
l33t


Joined: 30 Aug 2002
Posts: 738
Location: US-FL-EST

PostPosted: Mon Mar 15, 2010 2:27 pm    Post subject: Reply with quote

Neo2 wrote:
I do not wish to enable acl use flag: that would require other changes in other packages and I trust that most of the people out there using btrfs are doing it for fun or debugging, not for storing any valuable data or using it as the OS primary partition (and thus converting from ext4). From what I read, btrfs has still some major problems with free space checking and data allocation, so I assume it to be not stable nor usable.

Thank you very much for checking into this. I agree that the git version is highly desirable! :D

Personally, I have USE='acl' set even though I'm not currently using it. As soon as I have funds for some new 1.5 TB drives, I'll be trying out btrfs. Basically, I'll be backing up my current 1.0 TB drives {to new EXT4 formatted 1.5 TB drives}. Then I'll convert in place my old 1.0 TB drives.

Out of curiosity, I played with the USE flags on my desktop system to see what would be impacted. The following is informational only:
Code:
USE="-acl" emerge -puNDv world

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] dev-libs/libisofs-0.6.28  USE="zlib -acl* -xattr" 0 kB [0]
[ebuild   R   ] net-misc/rsync-3.0.7  USE="iconv ipv6 -acl* -static -xattr" 0 kB [0]
[ebuild   R   ] sys-devel/gettext-0.17-r1  USE="nls openmp -acl* -doc -emacs -nocxx" 0 kB [0]
[ebuild   R   ] sys-apps/coreutils-8.4  USE="gmp nls unicode -acl* -caps (-selinux) -static -vanilla -xattr" 0 kB [0]
[ebuild   R   ] sys-apps/sed-4.2.1  USE="nls -acl* (-selinux) -static" 0 kB [0]
[ebuild   R   ] app-backup/dar-2.3.9  USE="nls ssl -acl* -dar32 -dar64 -doc" 0 kB [0]
[ebuild   R   ] app-arch/libarchive-2.8.1  USE="bzip2 lzma zlib -acl* -static -static-libs -xattr" 0 kB [0]
[ebuild   R   ] app-backup/rdiff-backup-1.3.3  USE="-acl* -xattr" 0 kB [1]
[ebuild   R   ] sys-fs/ntfs3g-2010.3.6  USE="external-fuse hal -acl* -debug -suid" 0 kB [0]
[ebuild   R   ] net-print/cups-1.4.2-r1  USE="X dbus gnutls java jpeg kerberos ldap pam perl php png python samba ssl tiff -acl* -debug -slp -static -xinetd" LINGUAS="-da -de -es -eu -fi -fr -it -ja -ko -nl -no -pl -pt -pt_BR -ru -sv -zh -zh_TW" 0 kB [0]                                                                                                                       
[ebuild   R   ] net-fs/samba-server-3.4.5  USE="aio avahi cups fam ldap pam swat syslog winbind zeroconf -acl* -ads -caps -cluster -debug -doc -examples -quota -samba4" 0 kB [0]
[ebuild   R   ] gnome-base/gnome-vfs-2.24.2  USE="avahi fam gnutls hal ipv6 kerberos samba ssl -acl* -debug -doc" 0 kB [0]
[ebuild   R   ] kde-base/kdelibs-4.4.1-r1  USE="3dnow alsa bzip2 fam handbook jpeg2k kerberos mmx nls openexr opengl policykit semantic-desktop spell sse sse2 ssl zeroconf -acl* (-altivec) (-aqua) -bindist -debug -doc (-kdeenablefinal) (-kdeprefix) -lzma -test" 0 kB [0]
[ebuild   R   ] sys-fs/btrfs-progs-9999  USE="-acl* -debug-utils" 0 kB [0]

Total: 14 packages (14 reinstalls), Size of downloads: 0 kB
Portage tree and overlays:
 [0] /usr/portage
 [1] /var/lib/layman/zugaina

Code:
# USE="debug-utils" emerge -puNDv world

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ] dev-python/pytz-2010e  174 kB
[ebuild  N    ] dev-python/pycxx-6.1.1  USE="-doc -examples" 146 kB
[ebuild  N    ] dev-texlive/texlive-genericrecommended-2009  USE="-doc -source" 196 kB
[ebuild  N    ] dev-texlive/texlive-fontsrecommended-2009  USE="-doc -source" 26,024 kB
[ebuild  N    ] dev-texlive/texlive-texinfo-2009  USE="-doc -source" 81 kB
[ebuild  N    ] virtual/texi2dvi-0  0 kB
[ebuild  N    ] app-text/dvipng-1.12-r1  USE="t1lib truetype -test" 165 kB
[ebuild  N    ] dev-python/matplotlib-0.99.1.1-r1  USE="cairo gtk latex qt4 tk -doc -examples -excel -fltk -traits -wxwidgets" 11,627 kB
[ebuild   R   ] sys-fs/btrfs-progs-9999  USE="acl debug-utils*" 0 kB

Total: 9 packages (8 new, 1 reinstall), Size of downloads: 38,410 kB

For anyone thinking of being involved in the debugging/testing of btrfs, the above should give you an idea of what packages may be impacted.
_________________
People whom think M$ is mediocre, don't know the half of it.
Back to top
View user's profile Send private message
psdasilva
Apprentice
Apprentice


Joined: 03 Sep 2005
Posts: 236

PostPosted: Mon Mar 15, 2010 6:29 pm    Post subject: Reply with quote

Thanks. I am running btrf-progs-9999 fine and everything runs fine except for free space reporting.
I'm using 2 parts raid1 and df shows what seems twice the freespace.

BTW, how do I add another 2 mirrored partitions to increase the total space?
I created
Quote:
mkfs.btrfs -m raid1 -d raid1 /dev/p11 /dev/p12

Now I want to add a new pair as follows
p11 p12
p21 p22
Back to top
View user's profile Send private message
dufeu
l33t
l33t


Joined: 30 Aug 2002
Posts: 738
Location: US-FL-EST

PostPosted: Mon Mar 15, 2010 9:24 pm    Post subject: Reply with quote

psdasilva wrote:
Thanks. I am running btrf-progs-9999 fine and everything runs fine except for free space reporting.
I'm using 2 parts raid1 and df shows what seems twice the freespace.

Just posted today in the btrfs mailing list by Chris Mason:
Quote:
Josef changed the math for df a little to better reflect space available
for data, and factors in duplication for raid and single spindle dup.
He also added a space info ioctl which shows how much space is tied up
in metadata, and shows the raid level used for metadata/data.

The subject of Chris' post was "[GIT PULL] Btrfs updates". If you wait a little bit, it should show up soon {overnight?} in the gmane archives {eventually available through the btrfs mailing list link}.

I'm not {yet} qualified to answer your question. :)

But did you read the btrfs wiki documentation on multiple devices under "Add New Devices"? That will at least be a place to start.
_________________
People whom think M$ is mediocre, don't know the half of it.
Back to top
View user's profile Send private message
psdasilva
Apprentice
Apprentice


Joined: 03 Sep 2005
Posts: 236

PostPosted: Tue Mar 16, 2010 6:06 pm    Post subject: Reply with quote

I'll wait for the better df.

dufeu wrote:

I'm not {yet} qualified to answer your question. :)

But did you read the btrfs wiki documentation on multiple devices under "Add New Devices"? That will at least be a place to start.


I think I full understood the wiki docs.
From what I have read, it seems that adding a new volume to a raid set the volume becomes part of the set!
There should be a way to distinguish between these two situations like "add" and "attach" in zfs for ex.

Thanks anyway.
Back to top
View user's profile Send private message
psdasilva
Apprentice
Apprentice


Joined: 03 Sep 2005
Posts: 236

PostPosted: Wed Mar 17, 2010 7:51 pm    Post subject: Reply with quote

Quote:
I think I full understood the wiki docs.
From what I have read, it seems that adding a new volume to a raid set the volume becomes part of the set!
There should be a way to distinguish between these two situations like "add" and "attach" in zfs for ex.


A correction ...
It seems that building a mirror P1/P2 and then add P3 and P4 causes
P1 P2 (mirror)
P3 p4 (mirror)

This seems to have worked fine until I tried to remove P2. btrfs crashed and the kernel somehow became unstable!
Anyway I am not sure about this yet ...
Back to top
View user's profile Send private message
dufeu
l33t
l33t


Joined: 30 Aug 2002
Posts: 738
Location: US-FL-EST

PostPosted: Fri Mar 19, 2010 2:05 am    Post subject: Reply with quote

psdasilva wrote:
Quote:
I think I full understood the wiki docs.
From what I have read, it seems that adding a new volume to a raid set the volume becomes part of the set!
There should be a way to distinguish between these two situations like "add" and "attach" in zfs for ex.


A correction ...
It seems that building a mirror P1/P2 and then add P3 and P4 causes
P1 P2 (mirror)
P3 p4 (mirror)

This seems to have worked fine until I tried to remove P2. btrfs crashed and the kernel somehow became unstable!
Anyway I am not sure about this yet ...

At a guess, and this is only a guess, I would suggest that this area of the kernel code is a lot more fragile. i.e. The most common uses are sure to be tested and debugged much sooner and more thoroughly than less common uses. What you're asking about is pretty advanced and I wouldn't trust some hardware people to get it right either. Speaking of hardware, I'm still not thrilled with the discontinuing of dual ported hard drives ...

My read of recent btrfs list postings is that the functionality you're looking for needs work simply because the testing resources have been limited. I can't point to a specific post, but that's the general feeling I get.

If you have the time and resources, you may want to consider joining the mailing list and working with the responsible people. They also seem to active on IRC.

This is something I would definitely do if I could. Unfortunately, while I have the time, I don't have the resources.

Take care and good luck!

And don't forget to let us know how it goes.
_________________
People whom think M$ is mediocre, don't know the half of it.
Back to top
View user's profile Send private message
BlueFusion
Apprentice
Apprentice


Joined: 08 Mar 2006
Posts: 274
Location: Cleveland, Ohio

PostPosted: Tue Apr 06, 2010 4:58 pm    Post subject: Reply with quote

FWIW, I did an emerge -e world on two two systems running btrfs on /usr/portage and /var/portage and they both went without error. That includes the compilation of openoffice.org. Amazingly, even my laptop finished in under 24 hours. This used to take two days, but I'm sure it's not all related to the use of btrfs if any at all.
_________________
Desktop: i7-940 @ 2.93GHz, ASUS P6T Deluxe, 6GB RAM, 2x 160GB, 2x 500GB, 1x 1TB Seagate Barracuda SATA, nVidia 8800GTS 512MB, Hauppage PVR-250
Back to top
View user's profile Send private message
Simba7
l33t
l33t


Joined: 22 Jan 2007
Posts: 685
Location: Billings, MT, USA

PostPosted: Thu Apr 15, 2010 6:59 am    Post subject: Reply with quote

I do have one wierd thing going on..

I have a pair of remote servers. I have them partitioned so I can "dd" sda3 to sda4 before I update a package just in case one breaks.

The problem is, when I mount sda3 and sda4, they show the EXACT same thing, which is really confusing. I'm suspecting the btrfs IDs on the partitions match so it screws something up. Not 100% sure, though.

Is there a way to change the ID of the btrfs partitions without toasting the data on them (ex. mirror the partitions using dd then change the ID on the current or secondary partition).
_________________
Router(Nokia IP390,2GB RAM,8GB SSD,4xGE/4xFE ports,OpenBSD) | MyDT(Xeon X3470@3.45GHz,16GB RAM,2TB+2TB+3x1.5TB HDDs,GFGTX560Ti,LG BD-RE,Win10TP)
MyLT(Asus G53SX,32GB RAM,2x2TB HDDs,BD-RE,Intel 6230,Win7) | Wife(PnmIIX6@2.9GHz,8GB RAM,1TB HDD,DVDRW,Win7)
Back to top
View user's profile Send private message
Neo2
Apprentice
Apprentice


Joined: 25 Sep 2006
Posts: 224
Location: Italy

PostPosted: Thu Apr 15, 2010 12:39 pm    Post subject: Reply with quote

They show the exact same thing because you used dd, which performs raw sector-by-sector copy. As far as I am aware, the only field you could try to change is the label of the filesystem (is that allowed with btrfs?).
You may also want to try out btrfs-image instead of copying manually the data. I haven't done tests with it, but it should be reliable (I guess it's used also by developers to avoid cp -a /foo /bar everytime).

Cheers,
Neo2
_________________
Neo2
Unofficial minimal liveCD for x86/amd64 w/reiser4+truecrypt
Back to top
View user's profile Send private message
Simba7
l33t
l33t


Joined: 22 Jan 2007
Posts: 685
Location: Billings, MT, USA

PostPosted: Thu Apr 15, 2010 3:05 pm    Post subject: Reply with quote

Neo2 wrote:
They show the exact same thing because you used dd, which performs raw sector-by-sector copy. As far as I am aware, the only field you could try to change is the label of the filesystem (is that allowed with btrfs?).
You may also want to try out btrfs-image instead of copying manually the data. I haven't done tests with it, but it should be reliable (I guess it's used also by developers to avoid cp -a /foo /bar everytime).

Cheers,
Neo2

Well, I tried btrfs-image and I got this:
Code:
dragon ~ # btrfs-image /dev/sda3 /dev/sda4
parent transid verify failed on 1502601216 wanted 34476 found 34478
parent transid verify failed on 1502601216 wanted 34476 found 34478
parent transid verify failed on 1502601216 wanted 34476 found 34478
Segmentation fault

Both partitions are EXACTLY the same size, so there shouldn't be an issue doing a quick mirror.
_________________
Router(Nokia IP390,2GB RAM,8GB SSD,4xGE/4xFE ports,OpenBSD) | MyDT(Xeon X3470@3.45GHz,16GB RAM,2TB+2TB+3x1.5TB HDDs,GFGTX560Ti,LG BD-RE,Win10TP)
MyLT(Asus G53SX,32GB RAM,2x2TB HDDs,BD-RE,Intel 6230,Win7) | Wife(PnmIIX6@2.9GHz,8GB RAM,1TB HDD,DVDRW,Win7)
Back to top
View user's profile Send private message
Neo2
Apprentice
Apprentice


Joined: 25 Sep 2006
Posts: 224
Location: Italy

PostPosted: Thu Apr 15, 2010 6:16 pm    Post subject: Reply with quote

Warning: I was mistaken into thinking btrfs-image would have worked out much like xfsdump, quoting btrfs-image man page:
Quote:
btrfs-image is used to create an image of a btrfs filesystem. All data will be zeroed, but metadata and the like is preserved. source is the special
file corresponding to the device containing a btrfs filesystem. (e.g /dev/sdXX). target is the image file that btrfs-image creates. When used with
-r option, btrfs-image restores the image file from source into target.

So it does just backup metadata, not the whole filesystem data.
Looking at that error makes me think that hot-imaging is not supported, seems like it tries to read the metadata but it errors out with a non-commited operation (usually indicating that something has not been merged from the filesystem's log yet). Man page says nothing about it.
At this point, I may suggest you an rsync between the two mountpoints or a backup-and-replace operation through tar. Both can be done online, but you lose the ability to "dd if=backup of=restore" without any further commands (some manual tuning over default options could/should be done for both tar and rsync).
If you want something easier, you may want to try app-backup/rdiff-backup.
If you feel more adventurous you may want to do some research, discover where the partition ID is kept, and manually hex-edit the corresponding disk sector.

Cheers,
Neo2
_________________
Neo2
Unofficial minimal liveCD for x86/amd64 w/reiser4+truecrypt
Back to top
View user's profile Send private message
StifflerStealth
l33t
l33t


Joined: 03 Jul 2002
Posts: 959

PostPosted: Thu Apr 15, 2010 8:07 pm    Post subject: Reply with quote

Simba7 wrote:
I do have one wierd thing going on..

I have a pair of remote servers. I have them partitioned so I can "dd" sda3 to sda4 before I update a package just in case one breaks.

The problem is, when I mount sda3 and sda4, they show the EXACT same thing, which is really confusing. I'm suspecting the btrfs IDs on the partitions match so it screws something up. Not 100% sure, though.

Is there a way to change the ID of the btrfs partitions without toasting the data on them (ex. mirror the partitions using dd then change the ID on the current or secondary partition).
BTRFS has built in snapshot'ing. You don't even need two partitions. Just use the btrfsctl program to make the snapshot of the subvol or if you don't have subvol's then the main volume. If something goes wrong, you can just revert to the snapshot. There's more info on how to do that in the Btrfs Wiki. This takes up less space since only the files changed are written in the snapshot, so you save HD space and make life a little more easier. :)
_________________
Nothing to read in this sig. Move along.
Back to top
View user's profile Send private message
regomodo
Guru
Guru


Joined: 25 Mar 2008
Posts: 445

PostPosted: Fri Apr 16, 2010 11:18 pm    Post subject: Reply with quote

devsk wrote:
Dont Panic wrote:
regomodo wrote:
The one you were talking about.

Dont Panic wrote:
Before a multidevice Btrfs arrangement can be properly recognized, you need to run 'btrfsctrl -a'.

So it pretty much requires an initramfs step in your boot procedure, that is modified with a step to run 'btrfsctrl -a' to properly mount a multidevice RAID Btrfs array identified from /etc/fstab.

Probably the only other option is to take the mounting of your multidevice btrfs array out of /etc/fstab, and manually insert the mount command into /etc/init.d/local.

The requirement to run 'btrfsctrl -a' is similar to the requirements for implementing regular software raid (mdadm) or lvm.

You'll probably never be able to boot directly to a btrfs multidevice array without a normal boot partition with an initramfs.

The solution most of us will wait for is for genkernel to provide support for btrfs multiple devices when it generates it's initramfs (similar to the support genkernel currently implements for lvm of mdadm).

Or you can go another route in rolling your own initramfs or using another initramfs tool.
I have uploaded a couple of patches to genkernel to BGO.

BTRFSCTL support:

http://bugs.gentoo.org/show_bug.cgi?id=303529

Multi-device support:

http://bugs.gentoo.org/show_bug.cgi?id=303531

All that you need after the patches (you need BOTH the patches) is to pass --initramfs-overlay=/tmp/initramfs-overlay and put a directory sbin in there with btrfsctl inside that sbin directory. Run genkernel to create the initrd. This is what I have in that overlay:

Code:

$ l -R /tmp/initramfs-overlay/
/tmp/initramfs-overlay/:
total 0
drwxr-xr-x 1 root root   14 Feb  3 12:20 ./
drwxrwxrwt 1 root root 8296 Feb 11 13:23 ../
drwxr-xr-x 1 root root   56 Feb  3 12:21 lib/
drwxr-xr-x 1 root root   28 Feb  3 12:22 sbin/

/tmp/initramfs-overlay/lib:
total 16
drwxr-xr-x 1 root root    56 Feb  3 12:21 ./
drwxr-xr-x 1 root root    14 Feb  3 12:20 ../
lrwxrwxrwx 1 root root    16 Feb  3 14:18 libuuid.so.1 -> libuuid.so.1.3.0*
-rwxr-xr-x 1 root root 14728 Nov 22 11:51 libuuid.so.1.3.0*

/tmp/initramfs-overlay/sbin:
total 2628
drwxr-xr-x 1 root root      28 Feb  3 12:22 ./
drwxr-xr-x 1 root root      14 Feb  3 12:20 ../
-rwxr-xr-x 1 root root  125240 Feb  3 12:22 btrfsctl*
-rwxr-xr-x 1 root root 2561904 Feb  3 12:19 resume*

Those are copied from my existint install of amd64.
This is what I do to generate the initrd that gets copied into /boot (make sure you mount before running this).
Code:

genkernel --disklabel --splash=livecd-2007.0 --splash-res=1024x768 --no-mountboot --no-ramdisk-modules --initramfs-overlay=/tmp/initramfs-overlay ramdisk
This is what I get in /boot after the above genkernel command:

Code:
# lt /boot/initramfs-genkernel-x86_64-2.6.33-rc6
-rw-r--r-- 1 root root 2652865 Feb  3 19:58 /boot/initramfs-genkernel-x86_64-2.6.33-rc6

Then, I just include that initramfs in /boot/grub/grub.conf. And DONE!.... :D


Cheers but i'm really at a loss here. I added those 2 lines from your patches into genkernel's "linuxrc" and used that initramfs-overlay layout (with the exception of /sbin/resume).

However, same old story and when I boot up and the ramdisk is loaded I get a message like "stopping module load, no modules found in ramdisk". Once logged into root then I do the btrfsctl -a to find the devices.

One thing I am confused about is the /linuxrc part in my grub

Quote:
linux /kernel-genkernel-x86_64-2.6.33.2 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/sdd7


Is that supposed be something in my hdd or is that in the ramdisk?

Using this guide i've inspected the initramfs and btrfsctl is in there and so is the correct linuxrc.
Back to top
View user's profile Send private message
rer
n00b
n00b


Joined: 26 Mar 2010
Posts: 33

PostPosted: Sat Apr 17, 2010 3:34 pm    Post subject: Reply with quote

as reiser4 (the only linux-fs with working compression) has some problems in recent kernels, I wanna try btrfs. What about compression here. Is it working now, does btrfs-progs support it? I don't see any compr-related options in mkfs.btrfs. I use some terabyte-mysql-db which are compressed to 20% size under reiser4 so compression is essential for me
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 5731
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Sat Apr 17, 2010 4:08 pm    Post subject: Reply with quote

rer wrote:
as reiser4 (the only linux-fs with working compression) has some problems in recent kernels, I wanna try btrfs. What about compression here. Is it working now, does btrfs-progs support it? I don't see any compr-related options in mkfs.btrfs. I use some terabyte-mysql-db which are compressed to 20% size under reiser4 so compression is essential for me


compression currently is enabled as a mount-option:

either

compress

or

compress-force

the algo is gzip (reiser4 provides the choice to choose between lzo and gzip during creation of the filesystem)


information about the filesystem and whether compression is used will later be added to the superblock
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.3.0-r2
2.6.37.2_plus_v1: BFS, CFS,THP,compaction, zcache or TOI
Hardcore Linux user since 2004 :D
Back to top
View user's profile Send private message
regomodo
Guru
Guru


Joined: 25 Mar 2008
Posts: 445

PostPosted: Sun Apr 18, 2010 2:33 am    Post subject: Reply with quote

Well, how embarrassing is that? Even Ubuntu has a guide that works properly.

I thought this kind of stuff is Gentoo territory? Oh well, maybe Gentoo is dying. Time for the eventual move I suppose.
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Goto page Previous  1, 2, 3 ... 22, 23, 24, 25, 26  Next
Page 23 of 26

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum