From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Fedyk Subject: Re: [PATCH 0/2 V2] btrfs: a new tool to manage a btrfs filesystem Date: Wed, 17 Feb 2010 15:35:26 -0800 Message-ID: <93cdabd21002171535w55ad862fpd5ea845117cdcb85@mail.gmail.com> References: <201002172102.17816.kreijack@libero.it> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: Chris Mason , linux-btrfs@vger.kernel.org, Thomas Kupper , "Dipl.-Ing. Michael Niederle" , rk To: Goffredo Baroncelli Return-path: In-Reply-To: <201002172102.17816.kreijack@libero.it> List-ID: I think he need some command hierarchy here. On Wed, Feb 17, 2010 at 12:02 PM, Goffredo Baroncelli wrote: > OPTIONS > =C2=A0 =C2=A0 =C2=A0 snapshot|-s [/] > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Create a writeble sna= pshot of the subvolume =C2=A0 =C2=A0with =C2=A0the > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0name =C2=A0 =C2= =A0in the directory. If is not a sub=E2=80=90 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0volume, btrfs returns= an error. This should be "btrfs subvolume snapshot [/]". It only works on subvolumes. > > > =C2=A0 =C2=A0 =C2=A0 delete|-D > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Delete the subvolume = . If is not =C2=A0a =C2=A0sub=E2=80=90 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0volume, btrfs returns= an error. > This becomes: btrfs subvolume delete This works with snapshots as well. > > =C2=A0 =C2=A0 =C2=A0 subvolume|-c [/] > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Create =C2=A0a =C2=A0= subvolume =C2=A0in =C2=A0 (or in the current directory if > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 is not passed)= =2E btrfs subvolume create [/] > > > =C2=A0 =C2=A0 =C2=A0 defrag|-f | [|...] > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Defragment files and/= or directories. This will defrag individual files? Does it defrag a directory tree? Does it defrag a subvolume? Does it defrag a pool? > > > =C2=A0 =C2=A0 =C2=A0 scan|-n [ [..]] > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Scan devices for a bt= rfs filesystem. If no devices =C2=A0are =C2=A0passed, > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0btrfs scans all the b= lock devices. btrfs pool scan [ [..]] > > > =C2=A0 =C2=A0 =C2=A0 fssync|-y > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Force a sync for the = filesystem identified by . > Does it sync a pool or subvolume? Assuming it works against subvolumes, it would be: btrfs subvolume sync > > > =C2=A0 =C2=A0 =C2=A0 resize|-z [+/-][gkm]|max > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Resize a file system = identified by . =C2=A0The parameter > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0specifies the new siz= e of the filesystem. =C2=A0If the prefix + or =C2=A0- > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0is =C2=A0present =C2=A0= the =C2=A0size is increased or decreased by the quantity > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0. =C2=A0If no u= nits are =C2=A0specified, =C2=A0the =C2=A0unit =C2=A0of =C2=A0the =C2=A0= > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0parameter =C2=A0is =C2= =A0the =C2=A0byte. =C2=A0Optionally, the size parameter may be > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0suffixed by one of th= e following =C2=A0the =C2=A0units =C2=A0designators: =C2=A0'K', > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0'M', or 'G', kilobyte= s, megabytes, or gigabytes, respectively. > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0If =C2=A0'max' =C2=A0= is =C2=A0passed, =C2=A0the filesystem will occupy all available > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0space on the volume(s= ). > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0The resize command do= es not manipulate the =C2=A0size =C2=A0of =C2=A0underlying > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0partitions. =C2=A0 If= =C2=A0you =C2=A0wish =C2=A0to enlarge/reduce a filesystem, you > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0must make sure you ca= n expand/reduce the size of =C2=A0the =C2=A0partition > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0also. > This works with physical devices, not a pool or subvolume. I get the name "physical volume" from lvm. Also I think it should resize to max without arguments, in order to do that, the size argument would need to be the last argument. It becomes: btrfs pvolume resize [+/-][gkm]|max Or: btrfs pvolume resize [[+/-][gkm]] > > =C2=A0 =C2=A0 =C2=A0 show|-l [|