Skip to contentSkip to conversation

can't snapshot

DISCUSSION Jim 3 participants 3 messages Oct 10, 2011 Btrfs file system

lore
Share & tools
lore

Jim

author
#0 lore raw

Good morning Btrfs list,
I am trying to create a subvolume of a directory tree (approximately 1.1 million subvolumes under nfs1). The following error is thrown and without the wiki I don't know what argument is needed. I am running kernel 3.1.0-rc4.

[root@btrfs ~]# btrfs sub snapshot /btrfs/nfs1/ /btrfs/snaps/ Invalid arguments for subvolume snapshot [root@btrfs ~]# btrfs sub list /btrfs | head
ID 256 top level 5 path nfs1
ID 257 top level 5 path nfs2
ID 258 top level 5 path nfs2/data
ID 259 top level 5 path nfs1/data
ID 260 top level 5 path nfs1/data/sites
ID 261 top level 5 path nfs2/data/sites
ID 262 top level 5 path nfs2/data/sites/0420
ID 263 top level 5 path nfs2/data/sites/0421
ID 264 top level 5 path nfs2/data/sites/0422
ID 265 top level 5 path nfs2/data/sites/0423

Any help is appreciated
Thanks
Jim

#1 lore raw
Quoted 6 lines · Jim

Good morning Btrfs list,
I am trying to create a subvolume of a directory tree (approximately 1.1 million subvolumes under nfs1). The following error is thrown and without the wiki I don't know what argument is needed. I am running kernel 3.1.0-rc4.

Quoted 14 lines

[root@btrfs ~]# btrfs sub snapshot /btrfs/nfs1/ /btrfs/snaps/ Invalid arguments for subvolume snapshot [root@btrfs ~]# btrfs sub list /btrfs | head
ID 256 top level 5 path nfs1
ID 257 top level 5 path nfs2
ID 258 top level 5 path nfs2/data
ID 259 top level 5 path nfs1/data
ID 260 top level 5 path nfs1/data/sites
ID 261 top level 5 path nfs2/data/sites
ID 262 top level 5 path nfs2/data/sites/0420
ID 263 top level 5 path nfs2/data/sites/0421
ID 264 top level 5 path nfs2/data/sites/0422
ID 265 top level 5 path nfs2/data/sites/0423

I think you have to do

btrfs sub snapshot /btrfs/nfs1 /btrfs/nfs1/snaps

Thanks,

Josef

#2 lore raw
In reply to Jim
Quoted 2 lines · Jim

Good morning Btrfs list,
I am trying to create a subvolume of a directory tree (approximately =

1.1

Quoted 1 line

million subvolumes under nfs1). =A0The following error is thrown and =

without

Quoted 17 lines

the wiki I don't know what argument is needed. =A0I am running kernel 3.1.0-rc4.

[root@btrfs ~]# btrfs sub snapshot /btrfs/nfs1/ /btrfs/snaps/ Invalid arguments for subvolume snapshot [root@btrfs ~]# btrfs sub list /btrfs | head
ID 256 top level 5 path nfs1
ID 257 top level 5 path nfs2
ID 258 top level 5 path nfs2/data
ID 259 top level 5 path nfs1/data
ID 260 top level 5 path nfs1/data/sites
ID 261 top level 5 path nfs2/data/sites
ID 262 top level 5 path nfs2/data/sites/0420
ID 263 top level 5 path nfs2/data/sites/0421
ID 264 top level 5 path nfs2/data/sites/0422
ID 265 top level 5 path nfs2/data/sites/0423

Quoted 3 lines

Any help is appreciated
Thanks
Jim

Aha! You're using Hugo Mills btrfs-progs repository I assume.

I've found it necessary to apply the following patch to Hugo Mills btrfs-progs repo to get snapshots working:

btrfs_cmds.c +1 -1
index 699dfc2..26a4e6f 100644
@@ -372,7 +372,7 @@ int do_clone(int argc, char **argv)
 			return 1;
 		}
 	}
-	if (argc - optind !=3D 2) {
+	if (argc - optind !=3D 3) {
 		fprintf(stderr, "Invalid arguments for subvolume snapshot\n");
 		free(argv);
 		return 1;

--=20

Hugo has indicated to me that he anticipates further modification to parameter checking that would address this issue, but I'm not sure where that stands.

Hugo: Let me know if you want me to send this patch to the list. --
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" = in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html