From patchwork Sat May 18 21:40:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artem Ikonnikov X-Patchwork-Id: 13667730 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2109.outbound.protection.outlook.com [40.107.241.109]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 602A74501B; Sat, 18 May 2024 21:41:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.241.109 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716068462; cv=fail; b=CrDWKZzGaF6HAeScOfdmYeU+YK4/yh8E20lbvZ7ERqdxe7iIzRYSSVQW+AONY5mgyhiF7JCVqcbA2fnYStBPIFk3pRIgJx3AHOWSAxsyoOcsxMG6b9YZ8tVks6uz/WvXeYSUcLVacJ9PvNSs/1oEvge941ma6oIwRh1lAmy0Y78= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716068462; c=relaxed/simple; bh=QHE1hJDCKgbWrC6uPWsuLr7chLroSn+n+jYZ+4U/350=; h=Date:From:To:Cc:Subject:Message-ID:Content-Type: Content-Disposition:MIME-Version; b=o0tJ/gxPnDbYfFzQJpiJt+fDACuZMhC9vqcXnl4HO4c3l5in/i+G4VWT/glhfvw4L9xwvqHYGQA0BHmW6OMUj91iItwZrGeoqmeESPNYlZKEXT0MleLJBkQsP1LWrY9rJdGQDZ2GacEec3C1i53DacEO1qBC1EyqcBcNT5krwbY= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=datacrunch.io; spf=pass smtp.mailfrom=datacrunch.io; dkim=pass (2048-bit key) header.d=datacrunch.io header.i=@datacrunch.io header.b=aoFMi9TH; arc=fail smtp.client-ip=40.107.241.109 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=datacrunch.io Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=datacrunch.io Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=datacrunch.io header.i=@datacrunch.io header.b="aoFMi9TH" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i4pawzQ+klmj87rx2aRnyaAf0mM5rqGuquXQawzV2AL1kM3aY1FRRf6UWSiE37rWYnbxQ6HtuYp3ANRjBKVilQgHSpKD5AQ3A3xhbW9Ze7KMh47Sz4MgyVN9UBvJYC6rbnimPjT7dUk9dSQQhtnhOrqowRYtdUOxNfIEJhuvEYW26b3nwPCF4V2RcnPOpNIOhsJO9UCdD20zgSfqnVbfNSvxcXuMJvKXboVXZjRGK4YjSQR9UQE+/Co+oMwzhcaz9mgdbbZUb2vV2J9j/rvukL7TVFC5KjmZsIqRyH1f+hygB28oWtd1ZE0rc7VA+0LT7Z+yptKJoFNPHYzOioHv2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GphDNIl1IP8S4OrpO60umbWx54FAamJ5fNtqF3aoAIA=; b=YhJfn/G6X747wZxDDPzPp2bosXZUIKu4T2Fvqi7jbwj2/kDF2DGRmMXlYtaQhRfez3sda2aH+IIRRoFqSztDhTFkYa/DCFekdQhLNtmj/eT00lEI4gVxeVm6UVpEU38YOijI4lMNYyppVj9yx+DJQfM66PdfY3CFy3ogrQBT+fRqlpHOb5gz0hmAWtCtIH47aho8lDswJPMOzeMGxjJslskbYZMKnZ4Cqrn9pdHfHPb/W9xg18EeMH571DZ1JtBYzUV1io1XtKlfdI3WtGH9Ni+/Yb+muOPP8HoSPN+ySIGjRz56Vr49iOzqyQRS27pqh7OPKkzewtyeY8zhDnfdIQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=datacrunch.io; dmarc=pass action=none header.from=datacrunch.io; dkim=pass header.d=datacrunch.io; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=datacrunch.io; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GphDNIl1IP8S4OrpO60umbWx54FAamJ5fNtqF3aoAIA=; b=aoFMi9THgdpWJU5X2ZNJiAA1p6iM9cdZodcv0u1JDjkpkEunuHQoEONFXY8J3ujQNLUfOj6BymDRZRIdrtkINOtXhhiuiqznbsHPKP4lj7YzJSwzZSxLLmW2c/XNfFH2Nst2gCUx0st+okgDF/ixrb+0DEv9FodEGEuOzWTmEIDuOSv3XzMV/0E5Xtn7pYnOqqNPY56M2z4nXQFnzRa40GnWrnLB3O/qMi+yckYd7KE7oLaTw8uUA1vN3CiyA79zl2YGccKT9CTlgss85UyXaoKxSPIXL4cXHnr7zH2N6VXPYCt6mLNu+O3WRRo/xqWcpeM3MdWsEenkRb7Y4PEwzw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=datacrunch.io; Received: from AS4P192MB1838.EURP192.PROD.OUTLOOK.COM (2603:10a6:20b:51a::18) by PR3P192MB0825.EURP192.PROD.OUTLOOK.COM (2603:10a6:102:4c::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.34; Sat, 18 May 2024 21:40:57 +0000 Received: from AS4P192MB1838.EURP192.PROD.OUTLOOK.COM ([fe80::543:a45e:d527:3bf9]) by AS4P192MB1838.EURP192.PROD.OUTLOOK.COM ([fe80::543:a45e:d527:3bf9%4]) with mapi id 15.20.7587.030; Sat, 18 May 2024 21:40:56 +0000 Date: Sun, 19 May 2024 00:40:54 +0300 From: Artem Ikonnikov To: linux-doc@vger.kernel.org Cc: Xiubo Li , Ilya Dryomov , Jonathan Corbet , ceph-devel@vger.kernel.org Subject: [PATCH] doc: ceph: update userspace command to get CephFS metadata Message-ID: Content-Disposition: inline X-ClientProxiedBy: FR4P281CA0037.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:c7::10) To AS4P192MB1838.EURP192.PROD.OUTLOOK.COM (2603:10a6:20b:51a::18) Precedence: bulk X-Mailing-List: ceph-devel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS4P192MB1838:EE_|PR3P192MB0825:EE_ X-MS-Office365-Filtering-Correlation-Id: 307af5fe-f640-41e0-2a5b-08dc77833350 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|1800799015|376005; X-Microsoft-Antispam-Message-Info: =?utf-8?q?bgElkzgbdYHH+NrFHqFOFtkB4UIDkmD?= =?utf-8?q?rOKhfIn4tWBuD0e+N6ajohDOOoOUdhB4KQ0zYacfSGf5AW1yAHOM2XIipvYnds451?= =?utf-8?q?jEeCUkC78iXUU7mGOQVbugIxkH5er3ay8LNJha3vheoEF/mWmnD7QtJ2KvrzvKRv2?= =?utf-8?q?C0NHubk1Ra2o6g2JZA7Ewno1lW/YgspHroxfLf4RgqXeBqdvR57PfsGa4eR26oVfV?= =?utf-8?q?Ll5Udmh2iv8GE7uQBbvKBvx1ygRwh2mL3bIgbk6OSvGjdwfMT+4r30CH2RRY93vBO?= =?utf-8?q?HYgfA/nCbMiPryWQQr1Sk/ZQmWMc58Uf/I0Y5Gij+9IGiUcMApQBC2WC+Bs1k9cMS?= =?utf-8?q?FcIegUCF+0tdxJKVDNAbIWsfVX8LBVk1yrsI342jEzG85axZeFIM79K0lKIi6s8oG?= =?utf-8?q?GhbyYLsaXity51UpxohtUz/Td5OlhTGocrU4BbFN+SWHxTWO9/SvPnHIagm13S5Bq?= =?utf-8?q?ntyhGaad6yFrrclDvWu+7qbKIJ/zycBXrkrxEQq13wRe9rnQA78rIQBlgHiJAhIGe?= =?utf-8?q?U9UYdw1/tQbf9GszXSYOYEjZiZnp8sQjF5yylqwCpK6fsOdeSZ9k4bvCxIe3qdunc?= =?utf-8?q?hMlF/toTk7n0dQHRCzwjURETJDyCCxk9eay0HLuYSKjMdqK0pHHFdn9NseQ4G5UeH?= =?utf-8?q?AEYEzGM4DsIvarHUHFRMv560IUx8mm3/MMVjmfiMkN6uMk0ui/YH4zke0jM6a9P80?= =?utf-8?q?qu7BbFRdyDF4vCyFUZ2roFqe6vT+IjiTI31tOg5AFuIx5EXZ/h7ifnb27aQt/ohv5?= =?utf-8?q?VmjYN/wN/fMbqlpN9dRBeRrrMRxaQPJrBPsX83CqQwrwk8KOELMDYopa6pONj4aVg?= =?utf-8?q?RFqdHQz0Q7p9Q2IUrE9dVvutSCYw1/DZhVy9cARw6GId7i+WKfofJ0CXA2Y81HbEo?= =?utf-8?q?gFz4DLCDWlXQywqixPyg5BUHvGX+EpJQ11lJpObPvX3VKCID65SQCey7MJrL4Be6L?= =?utf-8?q?mKVbqQ8vSZyBAqnciHG+xejxZRqyXUnHpdRCCW4Ipr7st4tGr1jmqBUaDJ4ABriy9?= =?utf-8?q?MSbAMBe1brF70UTma7mb1uKC87l8NwOVlVckMteePHDIl1F6CJ6SbbxXLHvTxrmen?= =?utf-8?q?L1thqdibGntXtArZOtRYCKT3BmIUszb8SIj5UYf9/zR8XyyLzK4MRYoBZdCbit2sw?= =?utf-8?q?tgm6zO6XuvkOCCFP9lWoTctqOaEy3xtRAI1SBxt1FuC3TcK2a2/89ZSX+Y=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS4P192MB1838.EURP192.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230031)(366007)(1800799015)(376005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?wnzku+f55O7vkUfyPBhW2P/FTfLK?= =?utf-8?q?6jvEsIgUtz6TMTa6oDi7RiLpHJMhBMlkz1Iymk1iOSWwBpz2BN6vZCurXcTYMXGCf?= =?utf-8?q?0EBl9R+ZqiW/j5Pa1auQlM97RSZGLGoFb034aawNTZzDd+ta2Gw4dL54xQh4W7l6s?= =?utf-8?q?fm4LmoCewh0PweA2qoHPuDzQ2RBy8MrGn5Rxnb/Gf8wzQCDAFbZwXQoWmr890FOF4?= =?utf-8?q?m1fWI07ogOt1H7s47fjYFLbHzJa27cUjf4NM3/ALLilZ+gJiYT0vNOX7GifI5A4tl?= =?utf-8?q?6Ir/rwYNUY+PpcVoiis7ziAJLtZnX+dGnclwMOiAQ0bZOcSr5DerNb43wQd+jHNdR?= =?utf-8?q?uDTrwncgJWs/41JuARrfNXSs2DGBX0+LE8MDJt8ii3auCMXHWFFmeS7m5NTEifPh4?= =?utf-8?q?3X4U/b4nI1n0a77ub3nS5m7A9Amgysry3LsB2NYoZWB+olMoxPnB+lt6LCOGACiAC?= =?utf-8?q?qa+A9WlhUZ5j1dXZSqxbrFU3C0VphvvvzEY+7KVQtmwrgk318ML/lyURi82UzH34n?= =?utf-8?q?2SPSgEoXXLB1CgW9dgBEDN+W6Y+/S7Z5e9EUS3fSOTULBzo93d4KPEYqVNMEdMrCJ?= =?utf-8?q?bgJZnxaqA09/Gvl4HWVQgrxQjumG46xfKTglmm1e4+DSzndfjz82jnogXpwOOmbdE?= =?utf-8?q?TCYXOKFE0BvJT1hwOGVh8d2rHGX4flukGhG+O0AKC/mOjIXSmtAJ+mbXFhw8zwHps?= =?utf-8?q?Id1ECttnC8m8JSIFh8w0FPbQSI+316KN3VlsK13cB1+ErGaSv8XY4KduvVA3bWTGC?= =?utf-8?q?sH8XJPJHGi6ertW0U74BMs66PDFzij0SjpNfOWE3Se+laDv8tyyBN2prvOcKuccRN?= =?utf-8?q?luefwfADhiMPi5TTSCpHPRBI2Ku/DGuaLJiGulfCnfIhZmOfPkIZNe2jsuS5LYfU+?= =?utf-8?q?NBdoNzN4ou/H3cJvXnfeS9pl1JdKXdDOkkqCSP57y29RahHmGLIFkwV0H6DZALlo+?= =?utf-8?q?EPUphpDzCAg1oOjLxOGZ9TDOM17pWGSl8HpyzzouCCdCWja2cj4fV37aCP30CIrFt?= =?utf-8?q?12vpWCqCMYjO2oEmR8Ce9srYV2W5SmgRO6I5SiPySyfu4vtVSCKsVasR0ENdPim5o?= =?utf-8?q?mnZzS+4H1ImfHIXiNju/Ds3TNx70HsMHPKsr2Gw7tHmvjvakivazlPRMWfsQLpj3R?= =?utf-8?q?BysPZOax9tVwO5e9r9NZWZlw7U8cFfM8c8GbG4I2ctX/qQNZ1UBZ+mGca4kIIL+R/?= =?utf-8?q?xWWJpJMpb24fw7gwkzIhvD/grd2XmE9oQnp4BtzVUjAOYUaDVXWpED/NoW5UsRO6n?= =?utf-8?q?8MNsmdEEER8GSLEXeoEX3fTRgnQz7tVpkaD1jzI6pyoh9nQ9ZFuY/DE+WP7qfmXwg?= =?utf-8?q?GZuifzCXwd6mFqy6J8qlP7PeCdkl4emMrxccoV1GaTKbF1mWGIZB4RDRXeZCMju0I?= =?utf-8?q?aC+0iTRuc0dcd8ejDbPEfIXH/zoGFTXeUFNpMdeu6rWSXSWd0ziAVAJ26GSb6c6Me?= =?utf-8?q?wq+nL8qZb139mQwmc5M7oZIdtPCUZcsYALQZ5VEUseCRjpCKYYtq7DEHalo1b7A6Z?= =?utf-8?q?P2SbWtNeuXBh?= X-OriginatorOrg: datacrunch.io X-MS-Exchange-CrossTenant-Network-Message-Id: 307af5fe-f640-41e0-2a5b-08dc77833350 X-MS-Exchange-CrossTenant-AuthSource: AS4P192MB1838.EURP192.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2024 21:40:56.6652 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46cbde63-6d87-4d48-ba2e-486da29923d2 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: o0byHB9zo3YCtOwu0leqpa3SyIKKlXDR3FnTuwEEnIzZO/EdmyZlXTYI2nriNeO7utgpxMd41cfrG4uXy7UScw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3P192MB0825 According to ceph documentation "getfattr -d /some/dir" no longer displays the list of all extended attributes. Both CephFS kernel and FUSE clients hide this information. To retrieve the information you have to specify the particular attribute name e.g. "getfattr -n ceph.dir.rbytes /some/dir" Link: https://docs.ceph.com/en/latest/cephfs/quota/ Signed-off-by: Artem Ikonnikov Reviewed-by: Xiubo Li --- Documentation/filesystems/ceph.rst | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Documentation/filesystems/ceph.rst b/Documentation/filesystems/ceph.rst index 085f309ece60..6d2276a87a5a 100644 --- a/Documentation/filesystems/ceph.rst +++ b/Documentation/filesystems/ceph.rst @@ -67,12 +67,15 @@ Snapshot names have two limitations: more than 255 characters, and `` takes 13 characters, the long snapshot names can take as much as 255 - 1 - 1 - 13 = 240. -Ceph also provides some recursive accounting on directories for nested -files and bytes. That is, a 'getfattr -d foo' on any directory in the -system will reveal the total number of nested regular files and -subdirectories, and a summation of all nested file sizes. This makes -the identification of large disk space consumers relatively quick, as -no 'du' or similar recursive scan of the file system is required. +Ceph also provides some recursive accounting on directories for nested files +and bytes. You can run the commands:: + + getfattr -n ceph.dir.rfiles /some/dir + getfattr -n ceph.dir.rbytes /some/dir + +to get the total number of nested files and their combined size, respectively. +This makes the identification of large disk space consumers relatively quick, +as no 'du' or similar recursive scan of the file system is required. Finally, Ceph also allows quotas to be set on any directory in the system. The quota can restrict the number of bytes or the number of files stored