Hands-On with Btrfs
Total Page:16
File Type:pdf, Size:1020Kb
Hands-on with Btrfs Course ATT1800 Lecture Manual Version 1.0.0 September 6,2012 Proprietary Statement Disclaimer Copyright © 2012 Novell, Inc. All rights reserved. Novell, Inc., makes no representations or warranties with respect to the contents or use of this documentation, and Novell, Inc., has intellectual property rights relating to specifically disclaims any express or implied warranties technology embodied in the product that is described in of merchantability or fitness for any particular purpose. this document. In particular, and without limitation, these intellectual property rights may include one or more of Further, Novell, Inc., reserves the right to revise this the U.S. patents listed on the Novell Legal Patents Web publication and to make changes to its content, at any page (http://www.novell.com/company/legal/patents/) time, without obligation to notify any person or entity of and one or more additional patents or pending patent such revisions or changes. Further, Novell, Inc., makes applications in the U.S. and in other countries. no representations or warranties with respect to any software, and specifically disclaims any express or No part of this publication may be reproduced, implied warranties of merchantability or fitness for any photocopied, stored on a retrieval system, or transmitted particular purpose. Further, Novell, Inc., reserves the without the express written consent of the publisher. right to make changes to any and all parts of Novell software, at any time, without any obligation to notify any Novell, Inc. person or entity of such changes. 404 Wyman Street, Suite 500 Waltham, MA 02451 Any products or technical information provided under this U.S.A. Agreement may be www.novell.com subject to U.S. export controls and the trade laws of Novell Trademarks other countries. You agree to comply with all export For Novell trademarks, see the Novell Trademark and control regulations and to obtain any required licenses or Service Mark list classification to export, re-export or import deliverables. (http://www.novell.com/company/legal/trademarks/tmlist. You agree not to export or re-export to entities on the html). current U.S. export exclusion lists or to any embargoed Third-Party Materials or terrorist countries as specified in the U.S. export laws. All third-party trademarks are the property of their You agree to not use deliverables for prohibited nuclear, respective owners. missile, or chemical biological weaponry end uses. See Software Piracy the Novell International Trade Services Web page Throughout the world, unauthorized duplication of (http://www.novell.com/info/exports/) for more software is subject to both information on exporting Novell software. Novell criminal and civil penalties. assumes no responsibility for your failure to obtain any necessary export approvals. If you know of illegal copying of software, contact your local Software Antipiracy Hotline. For the Hotline This Novell Training Manual is published solely to number for your area, access Novell’s World Wide Web instruct students in the use of Novell networking page (http://www.novell.com) and look for the piracy software. Although third-party application software page under “Programs.” packages are used in Novell training courses, this is for Or, contact Novell’s anti-piracy headquarters in the U.S. demonstration purposes only and shall not constitute an at 800-PIRATES (747-2837) or 801-861-7101. endorsement of any of these software applications. Further, Novell, Inc. does not represent itself as having any particular expertise in these application software packages and any use by students of the same shall be done at the student’s own risk. Proprietary Statement Disclaimer Copyright © 2011 Novell, Inc. All rights reserved. Novell, Inc., makes no representations or warranties with respect to the contents or use of this documentation, Novell, Inc., has intellectual property rights relating to and specifically disclaims any express or implied technology embodied in the product that is described in warranties of merchantability or fitness for any particular this document. In particular, and without limitation, these purpose. intellectual property rights may include one or more of the U.S. patents listedFront on the Novell Legal Patents Web MatterFurther, Novell, Inc., reserves the right to revise this page (http://www.novell.com/company/legal/patents/) publication and to make changes to its content, at any and one or more additional patents or pending patent time, without obligation to notify any person or entity of applications in the U.S. and in other countries. such revisions or changes. Further, Novell, Inc., makes no representations or warranties with respect to any No part of this publication may be reproduced, software, and specifically disclaims any express or photocopied, stored on a retrieval system, or transmitted implied warranties of merchantability or fitness for any without the express written consent of the publisher. particular purpose. Further, Novell, Inc., reserves the right to make changes to any and all parts of Novell Novell, Inc. software, at any time, without any obligation to notify any 404 Wyman Street, Suite 500 person or entity of such changes. Waltham, MA 02451 U.S.A. Any products or technical information provided under www.novell.com this Agreement may be Novell Trademarks subject to U.S. export controls and the trade laws of For Novell trademarks, see the Novell Trademark and other countries. You agree to comply with all export Service Mark list control regulations and to obtain any required licenses or (http://www.novell.com/company/legal/trademarks/tmlist. classification to export, re-export or import deliverables. html). You agree not to export or re-export to entities on the Third-Party Materials current U.S. export exclusion lists or to any embargoed All third-party trademarks are the property of their or terrorist countries as specified in the U.S. export laws. respective owners. You agree to not use deliverables for prohibited nuclear, Software Piracy missile, or chemical biological weaponry end uses. See Throughout the world, unauthorized duplication of the Novell International Trade Services Web page software is subject to both (http://www.novell.com/info/exports/) for more criminal and civil penalties. information on exporting Novell software. Novell assumes no responsibility for your failure to obtain any If you know of illegal copying of software, contact your necessary export approvals. local Software Antipiracy Hotline. For the Hotline number for your area, access Novell’s World Wide Web This Novell Training Manual is published solely to page (http://www.novell.com) and look for the piracy instruct students in the use of Novell networking page under “Programs.” software. Although third-party application software Or, contact Novell’s anti-piracy headquarters in the U.S. packages are used in Novell training courses, this is for at 800-PIRATES (747-2837) or 801-861-7101. demonstration purposes only and shall not constitute an endorsement of any of these software applications. Further, Novell, Inc. does not represent itself as having any particular expertise in these application software packages and any use by students of the same shall be done at the student’s own risk. Contents SECTION 1: Hands-on with Btrfs 4 Objective 1: Introduction to Btrfs 6 Objective 2: Btrfs Architecture 12 Objective 3: Btrfs Copy on Write 18 Objective 4: Btrfs Subvolunes 23 Objective 5: Btrfs Migration 36 Objective 6: Snapper 39 Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES Table of Contents Hands-on with Btrfs ATT1800: Hands-on with Btrfs Section 1: Introduction to Btrfs Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES 4 Hands-on with Btrfs Objectives • Configure Disk Partitions and File Systems • Traditional Linux File Systems • Logical Volume Manager • Introduction to Btrfs • Snapper • Filesystem Quota Support • Introduction to iSCSI Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES 5 Hands-on with Btrfs Introduction to Btrfs Copying all or part of this manual, or distributing such copies, is strictly prohibited. To report suspected copying, please call 1-800-PIRATES 6 Hands-on with Btrfs What is Btrfs? • Rising star in the open source filesystem universe • Linux correspondent for ZFS • Btrfs Solves a number of storage challenges: ‒ Massive Scalability ‒ Data Integrity ‒ Dynamic Expand and Shrink ‒ Built-in Volume Management ‒ Ubiquitous use: Server, Cloud-thru-Desktop, Even Mobile ‒ Cloud ready Btrfs is the 'rising star' in the open source file system universe. It builds the foundation for the Ceph distributed filesystem and its RADOS object store layer for "cloud" technologies. Btrfs encompasses ideas from the ext series of file systems (*ext2, ext3, ext4) as well as the Reiser file system, the XFS file system and the HP aufs file system. Btrfs implements most of the same concepts as the Sun/Oracle ZFS but does so in a much more open ended manner that will allow much more headroom for development. Its architecture is much more scalable than ZFS. Btrfs was built with scalability and extensibility in mind. ZFS was developed in 2006 by Sun but its license was incompatible to Linux. Btrfs is very actively developed and