Re: [PATCH][btrfs progs] Update/clean up btrfs help and man page
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I tried the patch and found a few more things one might to update/clean up. Regarding the INSTALL file: - - There are three example lines for snapshot creation while two can show the same things. Regarding the help of the btrfs command: - - The line breaks in the source code for the help lines about the btrfs scan command were different from all other commands. - - The optional argument of the "scan" command was written in a strange way. - - Mixed usage of and . I changed it to . - - The "filesystem show" command accepts also the argument type . - - Sometimes there were just two dots instead of three. Regarding the btrfs command man page: - - Changed the example for ambiguous commands since "btrfs device show" no longer exists. - - The optional argument of the "scan" command was written in a strange way. - - Mixed usage of and . I changed it to . - - The "filesystem show" command accepts also the argument type . - - Sometimes there were just two dots instead of three. - - In the summary, there was "filesystem defrag" instead of "filesystem defragment". My patch applies on top of the changes from Goffredo Baroncelli. Kind Regards, Andreas Philipp diff --git a/INSTALL b/INSTALL index 2c9cf1c..3840148 100644 - --- a/INSTALL +++ b/INSTALL @@ -35,9 +35,7 @@ btrfs: control program to create snapshots and subvolumes: # snapshot of a subvolume btrfs subvolume snapshot /mnt/default /mnt/snapshot_of_default - -btrfs subvolume snapshot /mnt/new_subvol_name \ - -/mnt/snapshot_of_new_subvol - -btrfs subvolume snapshot /mnt/snapshot_of_new_subvol \ +btrfs subvolume snapshot /mnt/snapshot_of_default \ /mnt/snapshot_of_a_snapshot # list of the subvolumes diff --git a/btrfs.c b/btrfs.c index a607786..1b1adb7 100644 - --- a/btrfs.c +++ b/btrfs.c @@ -84,7 +84,7 @@ static struct Command commands[] = { "the id of the device which grown or will shrink." }, { do_show_filesystem, 999, - - "filesystem show", "[|]\n" + "filesystem show", "[||]\n" "Show the info of a btrfs filesystem. If no or \n" "is passed, info of all the btrfs filesystem are shown." }, @@ -96,17 +96,17 @@ static struct Command commands[] = { "filesystem balance", "\n" "Balance the chunks across the device." }, - -{ do_scan, - - 999, "device scan", "[ [..]\n" +{ do_scan, 999, + "device scan", "[...]\n" "Scan all device for or the passed device for a btrfs\n" "filesystem." }, { do_add_volume, -2, - - "device add", " [..] \n" + "device add", " [...] \n" "Add a device to a filesystem." }, { do_remove_volume, -2, - - "device delete", " [..] \n" + "device delete", " [...] \n" "Remove a device from a filesystem." }, /* coming soon diff --git a/man/btrfs.8.in b/man/btrfs.8.in index 1997aa8..6caee8b 100644 - --- a/man/btrfs.8.in +++ b/man/btrfs.8.in @@ -19,19 +19,19 @@ btrfs \- control a btrfs filesystem .PP \fBbtrfs\fP \fBfilesystem balance\fP\fI \fP .PP - -\fBbtrfs\fP \fBfilesystem defrag\fP\fI [-vcf] [-s start] [-l len] [-t size] | [|...]\fP +\fBbtrfs\fP \fBfilesystem defragment\fP\fI [-vcf] [-s start] [-l len] [-t size] | [|...]\fP .PP \fBbtrfs\fP \fBfilesystem sync\fP\fI \fP .PP \fBbtrfs\fP \fBfilesystem resize\fP\fI [:][+/\-][gkm]|max \fP .PP - -\fBbtrfs\fP \fBdevice scan\fP\fI [ [..]]\fP +\fBbtrfs\fP \fBdevice scan\fP\fI [...]\fP .PP - -\fBbtrfs\fP \fBdevice show\fP\fI | [|...]\fP +\fBbtrfs\fP \fBdevice show\fP\fI [||]\fP .PP - -\fBbtrfs\fP \fBdevice add\fP\fI [..] \fP +\fBbtrfs\fP \fBdevice add\fP\fI [...] \fP .PP - -\fBbtrfs\fP \fBdevice delete\fP\fI [..] \fP] +\fBbtrfs\fP \fBdevice delete\fP\fI [...] \fP] .PP \fBbtrfs\fP \fBhelp|\-\-help|\-h \fP\fI\fP @@ -49,11 +49,11 @@ For example: it is possible to run instead of .I btrfs subvolume snapshot. But - -.I btrfs dev s +.I btrfs dev a is not allowed, because - -.I dev s +.I dev a may be interpreted both as - -.I device show +.I device add and as .I device scan. In this case @@ -119,7 +119,7 @@ If the switch \fB-t\fR is passed, any extent bigger than \fB\fR is considered already defragged. .TP - -\fBdevice scan\fR \fI[ [..]]\fR +\fBdevice scan\fR \fI[...]\fR Scan devices for a btrfs filesystem. If no devices are passed, \fBbtrfs\fR scans all the block devices. .TP @@ -154,9 +154,9 @@ partition after reducing the size of the filesystem. To know the ID of a device use the command \fBbtrfs filesystem show\fR. .TP - -\fBfilesystem show\fR [|]\fR +\fBfilesystem show\fR [||]\fR Show the btrfs filesystem with some additional info. If no UUID or label is - -passed, \fBbtrfs\fR show info of all the btrfs filesystem. +passed, \fBbtrfs\fR shows info of all the btrfs filesystems. .TP \fBfilesystem balance\fR \fI\fR @@ -164,11 +164,11 @@ Balance the chunks of the filesystem identified by \fI\fR
Re: "Some devices missing" behaviour
Hi Hugo, I can reproduce this behavior, and the solution is quite simple: do a sync after the removing the device. Let me explain what (I think) happen. The command "btrfs filesystem show" reads every block device and shows the relevant information. This is performed without passing for the btrfs kernel code. Instead the command "btrfs device del..." performs the command doing an ioctl. In this case the btrfs kernel code is involved. I am saying that there is a delay between the time of "btrfs device del" command execution and when the data are available with a reading of the involved block device. The same is true for every other commands: the data returned by the "btrfs filesystem show command" are the ones evaluated on the basis of reading the block devices. And these data may be not in sync with the "kernel data". An umount and/or a sync may solve. Your email suggest me to renew a request to Josef Bacik: he is working on an interface in order to get the list of the device of a btrfs filesystem. I think that this interface should report not only a list of devices, but also other information like the ones reported by the btrfs filesystem show. The Hugo email shows that we cannot really trust of the data returned by the command "btrfs filesystem show" as implemented now. Regards G.Baroncelli On Saturday, 09 October, 2010, Hugo Mills wrote: >I've just encountered some odd behaviour with regard to removed > devices. Brief summary: > > - It's hard (in some sense) to tell a btrfs filesystem that a device >has been removed permanently, and seems to require an >unmount/remount, or resize to do so. > > - Removed devices break btrfs dev scan > >Details follow: > > # mkfs.btrfs -d raid10 -m raid10 -L btest /dev/primary/btrtest{1,2,3,4,5} > # mount /dev/primary/btrtest1 /mnt > # sudo btrfs fi show btest > failed to read /dev/sr0 > Label: 'btest' uuid: 908f87d7-23d8-453e-ab04-ae1426306e0f > Total devices 5 FS bytes used 28.00KB > devid1 size 1.00GB used 276.00MB path /dev/dm-21 > devid2 size 1.00GB used 136.00MB path /dev/dm-22 > devid3 size 1.00GB used 136.00MB path /dev/dm-23 > devid4 size 1.00GB used 264.00MB path /dev/dm-24 > devid5 size 1.00GB used 264.00MB path /dev/dm-25 > > Btrfs v0.19-35-g1b444cd > >All well and good so far. > > # btrfs dev del /dev/primary/btrtest4 /mnt > # btrfs fi show btest > failed to read /dev/sr0 > Label: 'btest' uuid: 908f87d7-23d8-453e-ab04-ae1426306e0f > Total devices 5 FS bytes used 100.13MB > devid1 size 1.00GB used 190.38MB path /dev/dm-21 > devid2 size 1.00GB used 170.38MB path /dev/dm-22 > devid3 size 1.00GB used 170.38MB path /dev/dm-23 > devid5 size 1.00GB used 170.38MB path /dev/dm-25 > *** Some devices missing > > Btrfs v0.19-35-g1b444cd > >Now, it's claiming that some devices are missing, but what if I > wanted to make this a permanent change? Say, the additional device was > one added temporarily to the array as part of a migration to new > hardware? > >On IRC, it was suggested that a rescan would fix it: > > # btrfs dev scan > Scanning for Btrfs filesystems > failed to read /dev/sr0 > # btrfs fi show btest > failed to read /dev/sr0 > Label: 'btest' uuid: 908f87d7-23d8-453e-ab04-ae1426306e0f > Total devices 5 FS bytes used 100.13MB > devid1 size 1.00GB used 190.38MB path /dev/dm-21 > devid2 size 1.00GB used 170.38MB path /dev/dm-22 > devid3 size 1.00GB used 170.38MB path /dev/dm-23 > devid5 size 1.00GB used 170.38MB path /dev/dm-25 > *** Some devices missing > > Btrfs v0.19-35-g1b444cd > >Nope. What about explicitly scanning the devices? > > # btrfs dev scan /dev/primary/btrtest* > Scanning for Btrfs filesystems in '/dev/primary/btrtest1' > Scanning for Btrfs filesystems in '/dev/primary/btrtest2' > Scanning for Btrfs filesystems in '/dev/primary/btrtest3' > Scanning for Btrfs filesystems in '/dev/primary/btrtest4' > ERROR: unable to scan the device '/dev/primary/btrtest4' > >Note that it's stopped the scan immediately on encountering the > removed device, so btrtest5 hasn't been picked up. Maybe it's > something left in the device? > > # dd if=/dev/zero of=/dev/primary/btrtest4 > # btrfs dev scan /dev/primary/btrtest* > Scanning for Btrfs filesystems in '/dev/primary/btrtest1' > Scanning for Btrfs filesystems in '/dev/primary/btrtest2' > Scanning for Btrfs filesystems in '/dev/primary/btrtest3' > Scanning for Btrfs filesystems in '/dev/primary/btrtest4' > ERROR: unable to scan the device '/dev/primary/btrtest4' > # btrfs fi show btest > failed to read /dev/sr0 > Label: 'btest' uuid: 908f87d7-23d8-453e-ab04-ae1426306e0f > Total devices 5 FS bytes used 100.13MB > devid1 size 1.00GB used 190.38MB path /dev/dm-21 > devid2 size 1.00GB used 170.38MB path /dev/dm-22 > devid3 size 1.00GB used 170.38MB pa
Re: [PATCH][btrfs progs] Update/clean up btrfs help and man page
Hi all, enclose you can find a patch which improves the help of the btrfs commands, updates the INSTALL file and the btrfs (command) man page. Regarding the help of the btrfs command: - moved the "subvolume set-default" command in the "subvolume" commands group - removed a wrong new line Regarding the btrfs command man page: - renaming the command "device balance" in "filesystem balance" (thanks to Andrea Phillipp to highlight that) - adding the entry "subvolume find-new" - document the switches of the command "filesystem defrag" - document the facility of the command "filesystem resize" Regarding the INSTALL file, which was very old, I removed the reference of the old btrfsctl utility and changed the examples using the btrfs command. I removed the old (and now wrong) statement about the inability to delete a subvolume/snapshot Chris, you can pull the patch from the branch "help_cleanup" of the following repository. http://cassiopea.homelinux.net/git/btrfs-progs-unstable-all.git The patch is very simple: only updates the man page, the INSTALL file and moves some lines in the qhelp of btrfs command. Comments are welcome. Regards G.Baroncelli INSTALL| 31 ++- btrfs.c| 17 + man/btrfs.8.in | 36 +--- 3 files changed, 60 insertions(+), 24 deletions(-) diff --git a/INSTALL b/INSTALL index 16b45a5..2c9cf1c 100644 --- a/INSTALL +++ b/INSTALL @@ -22,23 +22,34 @@ in the e2fsprogs sources, and is usually available as libuuid or e2fsprogs-devel from various distros. Building the utilities is just make ; make install. The programs go -into /usr/local/bin. The commands available are: +into /usr/local/bin. The mains commands available are: mkfs.btrfs: create a filesystem -btrfsctl: control program to create snapshots and subvolumes: - +btrfs: control program to create snapshots and subvolumes: + # mount a btrfs filesystem mount /dev/sda2 /mnt - btrfsctl -s new_subvol_name /mnt - btrfsctl -s snapshot_of_default /mnt/default - btrfsctl -s snapshot_of_new_subvol /mnt/new_subvol_name - btrfsctl -s snapshot_of_a_snapshot /mnt/snapshot_of_new_subvol + + # create a subvolume + btrfs subvolume create /mnt/new_subvol_name + + # snapshot of a subvolume + btrfs subvolume snapshot /mnt/default /mnt/snapshot_of_default + btrfs subvolume snapshot /mnt/new_subvol_name \ + /mnt/snapshot_of_new_subvol + btrfs subvolume snapshot /mnt/snapshot_of_new_subvol \ + /mnt/snapshot_of_a_snapshot + + # list of the subvolumes ls /mnt default snapshot_of_a_snapshot snapshot_of_new_subvol new_subvol_name snapshot_of_default - Snapshots and subvolumes cannot be deleted right now, but you can - rm -rf all the files and directories inside them. + # removal of a subvolume or a snapshot + btrfs subvolume delete /mn/snapshot_of_a_snapshot + + # look a the btrfs man page for further information + man btrfs btrfsck: do a limited check of the FS extent trees. @@ -46,3 +57,5 @@ debug-tree: print all of the FS metadata in text form. Example: debug-tree /dev/sda2 >& big_output_file + + diff --git a/btrfs.c b/btrfs.c index 46314cf..a607786 100644 --- a/btrfs.c +++ b/btrfs.c @@ -61,6 +61,11 @@ static struct Command commands[] = { { do_subvol_list, 1, "subvolume list", "\n" "List the snapshot/subvolume of a filesystem." }, + { do_set_default_subvol, 2, + "subvolume set-default", " \n" + "Set the subvolume of the filesystem which will be mounted\n" + "as default." + }, { do_find_newer, 2, "subvolume find-new", " \n" "List the recently modified files in a filesystem." }, @@ -68,19 +73,15 @@ static struct Command commands[] = { "filesystem defragment", "[-vcf] [-s start] [-l len] [-t size] | [|...]\n" "Defragment a file or a directory." }, - { do_set_default_subvol, 2, - "subvolume set-default", " \n" - "Set the subvolume of the filesystem which will be mounted\n" - "as default." - }, { do_fssync, 1, "filesystem sync", "\n" "Force a sync on the filesystem ." }, { do_resize, 2, - "filesystem resize", "[+/-][gkm]|max \n" + "filesystem resize", "[:][+/-][gkm]|max \n" "Resize the file system. If 'max' is passed, the filesystem\n" - "will occupe all available space on the device." + "will occupe all available space on the device. is\n" + "the id of the device which grown or will shrink." }, { do_show_filesystem, 999, "filesystem show", "[|]\n" @@ -89,7 +90,7 @@ static struct Command commands[] = { },
Re: revisiting "Hard link across subvolumes"
when i have some time to work on this I will figure out a way to pull inodes from a larger pool or include the subvolume id at creation time in them or something so that the collisions go away. Surely it must be possible to prefix or suffix the inode number with a few bits that are per-subvolume unique. On Sat, Oct 9, 2010 at 8:44 AM, Goffredo Baroncelli wrote: > > In case of a snapshot make sense to preserve the inode number. -- l'égalité des droits pour les ambidextres -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH][btrfs progs] Update/clean up btrfs help and man page
On 13.09.2010 21:23, Goffredo Baroncelli wrote: > Hi all, > > enclose you can find a patch which improve the help of the btrfs > commands and its man page. Regarding the help of the btrfs > command: - moved the "subvolume set-default" command in the > "subvolume" commands group - removed a wrong new line > > Regarding the btrfs command man page: - renaming the command > "device balance" in "filesystem balance" (thanks to Andrea Phillipp > to highlight that) - adding the entry "subvolume find-new" > Could you also document the defragment switches? At the moment, they are only documented in the code, -c to compress, -f to force and -v for verbose (even if verbose does not add any output other than the version). -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
"Some devices missing" behaviour
I've just encountered some odd behaviour with regard to removed devices. Brief summary: - It's hard (in some sense) to tell a btrfs filesystem that a device has been removed permanently, and seems to require an unmount/remount, or resize to do so. - Removed devices break btrfs dev scan Details follow: # mkfs.btrfs -d raid10 -m raid10 -L btest /dev/primary/btrtest{1,2,3,4,5} # mount /dev/primary/btrtest1 /mnt # sudo btrfs fi show btest failed to read /dev/sr0 Label: 'btest' uuid: 908f87d7-23d8-453e-ab04-ae1426306e0f Total devices 5 FS bytes used 28.00KB devid1 size 1.00GB used 276.00MB path /dev/dm-21 devid2 size 1.00GB used 136.00MB path /dev/dm-22 devid3 size 1.00GB used 136.00MB path /dev/dm-23 devid4 size 1.00GB used 264.00MB path /dev/dm-24 devid5 size 1.00GB used 264.00MB path /dev/dm-25 Btrfs v0.19-35-g1b444cd All well and good so far. # btrfs dev del /dev/primary/btrtest4 /mnt # btrfs fi show btest failed to read /dev/sr0 Label: 'btest' uuid: 908f87d7-23d8-453e-ab04-ae1426306e0f Total devices 5 FS bytes used 100.13MB devid1 size 1.00GB used 190.38MB path /dev/dm-21 devid2 size 1.00GB used 170.38MB path /dev/dm-22 devid3 size 1.00GB used 170.38MB path /dev/dm-23 devid5 size 1.00GB used 170.38MB path /dev/dm-25 *** Some devices missing Btrfs v0.19-35-g1b444cd Now, it's claiming that some devices are missing, but what if I wanted to make this a permanent change? Say, the additional device was one added temporarily to the array as part of a migration to new hardware? On IRC, it was suggested that a rescan would fix it: # btrfs dev scan Scanning for Btrfs filesystems failed to read /dev/sr0 # btrfs fi show btest failed to read /dev/sr0 Label: 'btest' uuid: 908f87d7-23d8-453e-ab04-ae1426306e0f Total devices 5 FS bytes used 100.13MB devid1 size 1.00GB used 190.38MB path /dev/dm-21 devid2 size 1.00GB used 170.38MB path /dev/dm-22 devid3 size 1.00GB used 170.38MB path /dev/dm-23 devid5 size 1.00GB used 170.38MB path /dev/dm-25 *** Some devices missing Btrfs v0.19-35-g1b444cd Nope. What about explicitly scanning the devices? # btrfs dev scan /dev/primary/btrtest* Scanning for Btrfs filesystems in '/dev/primary/btrtest1' Scanning for Btrfs filesystems in '/dev/primary/btrtest2' Scanning for Btrfs filesystems in '/dev/primary/btrtest3' Scanning for Btrfs filesystems in '/dev/primary/btrtest4' ERROR: unable to scan the device '/dev/primary/btrtest4' Note that it's stopped the scan immediately on encountering the removed device, so btrtest5 hasn't been picked up. Maybe it's something left in the device? # dd if=/dev/zero of=/dev/primary/btrtest4 # btrfs dev scan /dev/primary/btrtest* Scanning for Btrfs filesystems in '/dev/primary/btrtest1' Scanning for Btrfs filesystems in '/dev/primary/btrtest2' Scanning for Btrfs filesystems in '/dev/primary/btrtest3' Scanning for Btrfs filesystems in '/dev/primary/btrtest4' ERROR: unable to scan the device '/dev/primary/btrtest4' # btrfs fi show btest failed to read /dev/sr0 Label: 'btest' uuid: 908f87d7-23d8-453e-ab04-ae1426306e0f Total devices 5 FS bytes used 100.13MB devid1 size 1.00GB used 190.38MB path /dev/dm-21 devid2 size 1.00GB used 170.38MB path /dev/dm-22 devid3 size 1.00GB used 170.38MB path /dev/dm-23 devid5 size 1.00GB used 170.38MB path /dev/dm-25 *** Some devices missing Btrfs v0.19-35-g1b444cd Zeroing the device has no effect. However, unmounting it does work, partially: # umount /mnt # btrfs dev scan Scanning for Btrfs filesystems failed to read /dev/sr0 # btrfs dev scan /dev/primary/btrtest* Scanning for Btrfs filesystems in '/dev/primary/btrtest1' Scanning for Btrfs filesystems in '/dev/primary/btrtest2' Scanning for Btrfs filesystems in '/dev/primary/btrtest3' Scanning for Btrfs filesystems in '/dev/primary/btrtest4' ERROR: unable to scan the device '/dev/primary/btrtest4' # btrfs fi show btest failed to read /dev/sr0 Label: 'btest' uuid: 908f87d7-23d8-453e-ab04-ae1426306e0f Total devices 4 FS bytes used 100.13MB devid1 size 1.00GB used 190.38MB path /dev/dm-21 devid2 size 1.00GB used 170.38MB path /dev/dm-22 devid3 size 1.00GB used 170.38MB path /dev/dm-23 devid5 size 1.00GB used 170.38MB path /dev/dm-25 Btrfs v0.19-35-g1b444cd So, you need to unmount/remount the FS to make it believe that the device removal is permanent. (As an aside, I also found that resizing down by 1M then back to max has the same effect, if you don't want to unmount). However, the explicit scan of the block devices is still broken by the removed device, even after all data on it has been zeroed. Hugo. -- === Hugo Mills: h...@... carfax.org.uk | darksatanic.net | lug.org.uk === PGP key: 515C238D from wwwk
Re: Can you please define "snapshot" and "subvolume"?
On Saturday, 09 October, 2010, you (Mike Hommey) wrote: > On Thu, Oct 07, 2010 at 11:13:18PM +0200, Goffredo Baroncelli wrote: > > On Thursday, 07 October, 2010, David Nicol wrote: > > > On Thu, Oct 7, 2010 at 8:18 AM, Mike Hommey wrote: > > > > BTW, it would be very useful to be able to turn existing directories > > > > into subvolumes. > > > > > > does a (link,unlink) move work across subvolumes? > > > > The link across subvolumes is not allowable. In the beginning it was > > possible, but that was source of bugs. See the thread "Hard link across > > subvolumes" > > > > http://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg03286.html > > But couldn't cp --reflink be made to work? > I don't know why, but I can confirm that in the btrfs kernel source it is checked the case that the "reflink" is preformed between two subvolume. And in this case this action is denied. http://git.kernel.org/?p=linux/kernel/git/mason/btrfs- unstable.git;a=blob;f=fs/btrfs/ioctl.c;h=9254b3d58dbef22974af3c7c61dbc9a4af7a33b6;hb=HEAD#l1489 -- gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) Key fingerprint = 4769 7E51 5293 D36C 814E C054 BF04 F161 3DC5 0512 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH][btrfs progs] Update/clean up btrfs help and man page
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, Today I pulled btrfs-progs-unstable from git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs-unstable.git and I found the patch from below still not applied. Is there a reason for this? Regards, Andreas Philipp On 13.09.2010 21:23, Goffredo Baroncelli wrote: > Hi all, > > enclose you can find a patch which improve the help of the btrfs > commands and its man page. Regarding the help of the btrfs > command: - moved the "subvolume set-default" command in the > "subvolume" commands group - removed a wrong new line > > Regarding the btrfs command man page: - renaming the command > "device balance" in "filesystem balance" (thanks to Andrea Phillipp > to highlight that) - adding the entry "subvolume find-new" > > Chris, you can pull the patch from the branch "help_cleanup" of the > following repository. > > http://cassiopea.homelinux.net/git/btrfs-progs-unstable-all.git > > The patch is very simple: only update the man page and move some > lines in the help of btrfs command. Comments are welcome. > > Regards G.Baroncelli > > > diff --git a/btrfs.c b/btrfs.c index ab5e57f..1816597 100644 --- > a/btrfs.c +++ b/btrfs.c @@ -61,6 +61,11 @@ static struct Command > commands[] = { { do_subvol_list, 1, "subvolume list", "\n" > "List the snapshot/subvolume of a filesystem." }, + { > do_set_default_subvol, 2, + "subvolume set-default", " > \n" + "Set the subvolume of the filesystem which will > be mounted\n" + "as default." + }, { do_find_newer, 2, "subvolume > find-new", " \n" "List the recently modified files > in a filesystem." }, @@ -68,11 +73,6 @@ static struct Command > commands[] = { "filesystem defragment", "[-vcf] [-s start] [-l len] > [-t size] | [|...]\n" "Defragment a file or a > directory." }, - { do_set_default_subvol, 2, - "subvolume > set-default", " \n" - "Set the subvolume of the > filesystem which will be mounted\n" - "as default." - }, { > do_fssync, 1, "filesystem sync", "\n" "Force a sync on the > filesystem ." @@ -89,7 +89,7 @@ static struct Command > commands[] = { }, { do_df_filesystem, 1, "filesystem df", > "\n" - "Show space usage information for a mount point\n." + > "Show space usage information for a mount point." }, { do_balance, > 1, "filesystem balance", "\n" diff --git a/man/btrfs.8.in > b/man/btrfs.8.in index 26ef982..249426c 100644 --- > a/man/btrfs.8.in +++ b/man/btrfs.8.in @@ -15,6 +15,10 @@ btrfs \- > control a btrfs filesystem .PP \fBbtrfs\fP \fBsubvolume > set-default\fP\fI \fP .PP +\fBbtrfs\fP \fBsubvolume > find-new\fP\fI \fP +.PP +\fBbtrfs\fP > \fBfilesystem balance\fP\fI \fP +.PP \fBbtrfs\fP > \fBfilesystem defrag\fP\fI | [|...]\fP .PP > \fBbtrfs\fP \fBfilesystem sync\fP\fI \fP @@ -25,8 +29,6 @@ > btrfs \- control a btrfs filesystem .PP \fBbtrfs\fP \fBdevice > show\fP\fI | [|...]\fP .PP -\fBbtrfs\fP > \fBdevice balance\fP\fI \fP -.PP \fBbtrfs\fP \fBdevice > add\fP\fI [..] \fP .PP \fBbtrfs\fP \fBdevice > delete\fP\fI [..] \fP] @@ -102,6 +104,10 @@ Set > the subvolume of the filesystem \fI\fR which is mounted as is > returned by the \fBsubvolume list\fR command. .TP > > +\fBsubvolume find-new\fR\fI \fR +List the > recently modified files in a subvolume, after \fI\fR ID. > +.TP + \fBfilesystem defragment\fP\fI | > [|...]\fR Defragment files and/or directories. .TP @@ > -143,7 +149,7 @@ Show the btrfs filesystem with some additional > info. If no UUID or label is passed, \fBbtrfs\fR show info of all > the btrfs filesystem. .TP > > -\fBdevice balance\fR \fI\fR +\fBfilesystem balance\fR > \fI\fR Balance the chunks of the filesystem identified by > \fI\fR across the devices. .TP > > > > -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJMsHIyAAoJEJIcBJ3+XkgiF5kQAIg4h4g6Nbo41zFo1VRxFmbA Ba2894xl+UOQ1u+4w3D0mIzqRq55aJ0XsC1s7hMXAPO73N18epmG//I/im29h0Pj 0tOKWlVaGq+2k9zNp2nvdnD4/FCTjdrLngRVj/QRbfnADHPqMz2vXRl1pPUNY19E Z/WHKwRmgz/ZX1xeT2A2633sR61yYjA09XOS6Zmnh4PL6KRFZzVoDo6ciOtmdJRD faHkLbLsxkpyA/0KPAOibDSV/uRRCMqJlBmGhbv8/QIYRvRpSiTuxT6a5B+WuFLm 1nfUsZC/NupDA1iG7T3o8gPnXCClh2Z689qq/MRHXM9N9uRhY4XDaf2GzwDMCL6q A6ciYc1SQBHR9t/ZbUbZda8/6DAviqxIjTg4+/2G9hD8EZEqxd27B27U3Jc4AJTa HYRxvZIeZBwrGj68RAJadU6OnkgMLvPhZ+lIODEZmEeSKlyrQQOE4gIT5YELw2+J xz51nmfgSgMpccb8vo1edZcqA8jAuO3oJPL2h9NT78D0tCYjJWzp57HTCV8v2mBR +fmxl0fiE82NBnCbQXeqnDkAkJPAvWBIGplCk3ScoerPFeW70QbiaQiSyrH8iOaI 9GIJFT5vt9FNyclp734nWvC9AdojS4w+lGoqIVoIehpcQfBbVa4abr2BjSvTmz/h gzep5nPQpPH7i7btDaw1 =zs3e -END PGP SIGNATURE- -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: revisiting "Hard link across subvolumes"
On Saturday, 09 October, 2010, you (David Nicol) wrote: > could i-node numbers be made unique on a whole device, or somehow > adjusted to avoid collisions, instead of simply disallowing this > useful operation? In case of a snapshot make sense to preserve the inode number. > On Thu, Oct 7, 2010 at 4:13 PM, Goffredo Baroncelli wrote: > > > The link across subvolumes is not allowable. In the beginning it was > > possible, but that was source of bugs. See the thread "Hard link across > > subvolumes" > > > > http://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg03286.html > -- gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) Key fingerprint = 4769 7E51 5293 D36C 814E C054 BF04 F161 3DC5 0512 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: system crash at mounting of btrfs
Gerhard Kulzer kulzer.net> writes: > > Chris Mason oracle.com> writes: > > > > [7.881078] Btrfs detected SSD devices, enabling SSD mode > > > [7.923553] [ cut here ] > > > [7.923556] kernel BUG at /build/buildd/linux-2.6.35/fs/btrfs > /tree-log.c:813! > > > [7.923558] invalid opcode: [#1] SMP > > ^^^ > > > > Once you see kernel BUG() that's the crash ;) > > > > This isn't from the btrfs scan, this is from mounting the FS. Could you > > please mount the filesystems one at a time and see if they all fail or > > of it is just this one. > > > > -chris > > -- > Ahh big surprise, I can mount my other btrfs partitions (4 on 2 HDD) all of a > sudden. > I wonder why, because I tried before and I got a crash with all of them. > The only difference now is that I took the SSD with the 5th partition out. > I have a boot partition as ext4 on that same SSD drive which I can mount > w/o problems. So I think it's not the SSD itself that is buggy. > Ok, I understand a bit more now. a) when I boot my system from CD and the faulty SSD btrfs is physically present, then there's a little hick-up during boot resulting in my first trace and the system crashes if I subsequently mount ANY other btrfs partition. b) If I boot w/o the SSD, then there is no hick-up and I can mount all remaining btrfs partitions w/o crash and the data is there. Gerhard -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Btrfs Wiki: Debugging Btrfs with GDB
Hi, this is my first post and contribution to Btrfs. I wrote a documentation on how to debug Btrfs with GDB on UML(User Mode Linux). https://btrfs.wiki.kernel.org/index.php/Debugging_Btrfs_with_GDB This document might be little bit boring for Btrfs hackers, but for beginners who want to join Btrfs development, it is worth reading, I think. (BTW, I'm a beginner, too :D) Thank you. -- Yoshinori Sano -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Slow link/Capacity changed + Kernel OOPS... possible hardware issues, ideas?
On Fri, Oct 8, 2010 at 11:00 PM, Evert Vorster wrote: > Hi there... > > I'm not an expert. however, since you don't care about the data on > the SSD anymore, reformat it, and fill it up, then verify what you > have written. > > However, if the capacity has changed, would that not be enough reason > to have ASUS replace it? yeah, i suppose i could :-) so i tried throwing ubuntu 10.10 on it (had archlinux previously), as i made a live USB disk so my fiancé could use it to write a paper today/tomorrow, and sure enough it worked, no problems whatsoever. been running several hours now after install... so i'm fairly convinced the SSD is still good enough, and i have no idea at this point what went wrong. oh well. C Anthony -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Can you please define "snapshot" and "subvolume"?
On Thu, Oct 07, 2010 at 11:13:18PM +0200, Goffredo Baroncelli wrote: > On Thursday, 07 October, 2010, David Nicol wrote: > > On Thu, Oct 7, 2010 at 8:18 AM, Mike Hommey wrote: > > > BTW, it would be very useful to be able to turn existing directories > > > into subvolumes. > > > > does a (link,unlink) move work across subvolumes? > > The link across subvolumes is not allowable. In the beginning it was > possible, but that was source of bugs. See the thread "Hard link across > subvolumes" > > http://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg03286.html But couldn't cp --reflink be made to work? Mike -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
revisiting "Hard link across subvolumes"
could i-node numbers be made unique on a whole device, or somehow adjusted to avoid collisions, instead of simply disallowing this useful operation? On Thu, Oct 7, 2010 at 4:13 PM, Goffredo Baroncelli wrote: > The link across subvolumes is not allowable. In the beginning it was > possible, but that was source of bugs. See the thread "Hard link across > subvolumes" > > http://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg03286.html -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html