Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [btrfs-progs] testing btrfs hierarchical quotas
@ 2013-02-15 13:05 Hemanth Kumar
  2013-02-15 13:48 ` shilong wang
  2013-02-15 20:59 ` Hugo Mills
  0 siblings, 2 replies; 6+ messages in thread
From: Hemanth Kumar @ 2013-02-15 13:05 UTC (permalink / raw)
  To: linux-btrfs, xfs
  Cc: skjmca51, ganeshkumar14, kirantpatil, praneethu.u, chethan.casey,
	sensille, bo.li.liu, hugo, sandeen, Hemanth Kumar


Signed-off-by: Hemanth Kumar <hemanthkumar51@gmail.com>
---
 hq.sh | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 hq.sh

diff --git a/hq.sh b/hq.sh
new file mode 100644
index 0000000..6a0a820
--- /dev/null
+++ b/hq.sh
@@ -0,0 +1,33 @@
+#! /bin/bash
+# Btrfs quotas test case
+# Hi all,
+# This is shell script to test the hierarchical quotas feature of Btrfs
+# I created Btrfs filesystem on a new
+# partition, then activated quota management ('btrfs quota enable'), and
+# created a few subvolumes of multiple levels.
+
+
+cleanup()
+{
+    btrfs subvolume delete $TEST_DIR/vol1/vol2/vol3
+    btrfs subvolume delete $TEST_DIR/vol1/vol2
+    btrfs subvolume delete $TEST_DIR/vol1
+    btrfs subvolume disable $TEST_DIR
+}
+
+#trap "_cleanup ; exit \$status" 0 1 2 3 15
+
+btrfs quota enable $TEST_DIR
+echo "quota enabled on $TEST_DEV"
+btrfs subvolume create $TEST_DIR/vol1
+btrfs subvolume create $TEST_DIR/vol1/vol2
+btrfs subvolume create $TEST_DIR/vol1/vol2/vol3
+btrfs qgroup limit 5m $TEST_DIR/vol1
+btrfs qgroup limit 3m $TEST_DIR/vol1/vol2
+btrfs qgroup limit 2m $TEST_DIR/vol1/vol2/vol3
+dd if=$TEST_DEV of=$TEST_DIR/vol1/vol2/vol3/file1 bs=3M count=1
+dd if=$TEST_DEV of=$TEST_DIR/vol1/vol2/file1 bs=2M count=1
+dd if=$TEST_DEV of=$TEST_DIR/vol1/file1 bs=5M count=1
+
+cleanup
+exit
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-02-18 11:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-15 13:05 [btrfs-progs] testing btrfs hierarchical quotas Hemanth Kumar
2013-02-15 13:48 ` shilong wang
2013-02-15 20:59 ` Hugo Mills
2013-02-16  7:55   ` Dave Chinner
2013-02-16 17:45     ` Hugo Mills
     [not found]   ` <CAG_LFoCRWaKHe2_AYspN3qUUFw4iWgdB56fWeSGP5C0iKAaX8w@mail.gmail.com>
2013-02-18 11:20     ` Hugo Mills

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox