From mboxrd@z Thu Jan 1 00:00:00 1970 From: Piavlo Subject: Re: [PATCH 0/2 V2] btrfs: a new tool to manage a btrfs filesystem Date: Thu, 18 Feb 2010 11:45:31 +0200 Message-ID: <4B7D0C3B.1090503@cs.bgu.ac.il> References: <201002172102.17816.kreijack@libero.it> <93cdabd21002171535w55ad862fpd5ea845117cdcb85@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: linux-btrfs@vger.kernel.org To: unlisted-recipients:; (no To-header on input) Return-path: In-Reply-To: <93cdabd21002171535w55ad862fpd5ea845117cdcb85@mail.gmail.com> List-ID: Hi, I agree with Mike, it's just much much more pleasant and intuitive to work with the hierarchyial cli he suggests. Alex =20 Mike Fedyk wrote: > I think he need some command hierarchy here. > > On Wed, Feb 17, 2010 at 12:02 PM, Goffredo Baroncelli > wrote: > =20 >> OPTIONS >> snapshot|-s [/] >> Create a writeble snapshot of the subvolume = with the >> name in the directory. If is n= ot a sub=E2=80=90 >> volume, btrfs returns an error. >> =20 > > This should be "btrfs subvolume snapshot [/]". > It only works on subvolumes. > > =20 >> delete|-D >> Delete the subvolume . If is not= a sub=E2=80=90 >> volume, btrfs returns an error. >> >> =20 > > This becomes: > > btrfs subvolume delete > > This works with snapshots as well. > > =20 >> subvolume|-c [/] >> Create a subvolume in (or in the current dir= ectory if >> is not passed). >> =20 > > btrfs subvolume create [/] > > =20 >> defrag|-f | [|...] >> Defragment files and/or directories. >> =20 > > This will defrag individual files? Does it defrag a directory tree? > Does it defrag a subvolume? Does it defrag a pool? > > =20 >> scan|-n [ [..]] >> Scan devices for a btrfs filesystem. If no devices are= passed, >> btrfs scans all the block devices. >> =20 > > btrfs pool scan [ [..]] > > =20 >> fssync|-y >> Force a sync for the filesystem identified by . >> >> =20 > > Does it sync a pool or subvolume? Assuming it works against > subvolumes, it would be: > > btrfs subvolume sync > > =20 >> resize|-z [+/-][gkm]|max >> Resize a file system identified by . The = parameter >> specifies the new size of the filesystem. If the prefi= x + or - >> is present the size is increased or decreased by the= quantity >> . If no units are specified, the unit of th= e >> parameter is the byte. Optionally, the size paramet= er may be >> suffixed by one of the following the units designato= rs: 'K', >> 'M', or 'G', kilobytes, megabytes, or gigabytes, respec= tively. >> >> If 'max' is passed, the filesystem will occupy all = available >> space on the volume(s). >> >> The resize command does not manipulate the size of u= nderlying >> partitions. If you wish to enlarge/reduce a filesy= stem, you >> must make sure you can expand/reduce the size of the = partition >> also. >> >> =20 > > 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 ma= x > 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]] > > =20 >> show|-l [|