Skip to contentSkip to conversation

command to get quota limit

DISCUSSION ST 3 participants 5 messages Dec 4, 2017 Btrfs file system

lore
Share & tools
lore

ST

author
#0 lore raw

Hello,

what is the command to get btrfs quota limit on certain subvolume?

Thank you!

#1 lore raw
Quoted 3 lines · ST

Hello,

what is the command to get btrfs quota limit on certain subvolume?

btrfs qgroup show -re

The result is for all subvolumes, then just find the subvolume you need.

Thanks,
Qu

Quoted 8 lines

Thank you!

--
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

author
#2 lore raw
Quoted 8 lines
Quoted 3 lines

Hello,

what is the command to get btrfs quota limit on certain subvolume?

btrfs qgroup show -re

The result is for all subvolumes, then just find the subvolume you need.

I need to use the quota number in a script... is there a more specific command, otherwise I need to get the groupID first and then to parse the output...

Thank you!

#3 lore raw
Quoted 4 lines · ST
Quoted 4 lines
Quoted 3 lines

Hello,

what is the command to get btrfs quota limit on certain subvolume?

Quoted 8 lines
Quoted 4 lines

btrfs qgroup show -re

The result is for all subvolumes, then just find the subvolume you need.

I need to use the quota number in a script... is there a more specific command, otherwise I need to get the groupID first and then to parse the output...

IIRC "btrfs qgroup show -re <mnt>" is specific enough.

Just try it, and read btrfs-qgroup(8).

As long as you're using it in a script, the you will need subvolume id anyway.

Thanks,
Qu

Quoted 8 lines

Thank you!

--
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

#4 lore raw
In reply to ST

AFAIK you don't need subvolume id, btrfs qgroup show -ref /path/to/subvolume shows necessary qgroup for me. Separating value you need is more involved:

Quoted 1 line

btrfs qgroup show -ref --raw /path/to/subvolume | tail -n +3 | tr -s ' ' | cut -d ' ' -f 4

Not sure how robust is this though.

--

With Best Regards,
Marat Khalili