Trying to understand and learn how to use btrfs

I have been the past days trying to get my head around how btrfs works
I have been trying tools like mkinitcpio-btrfs (very poorly documented) and now, if i list the subvolumes i have in certain volume (/) i see i have 4 subvolumes that have been created while playing around.
If i try to delete them with "sudo btrfs subvolume delete __active", for example, I get a "ERROR: Error accessing '__active'
What am I doing wrong?
Also, I cannot get the whole idea about the difference between snapshots and subvolumes, i mean, a snapshot should be a directory that saves the changes made on the fs, s, if you want to roll back those changes, you just have to make btrfs "forget" the changes stored in that directory and move along, but I cannot take the idea of the subvolume thing.....
As btrfs is quite experimental and the wikis are not noob-proof still, I'd appreciate if someone gave me a hand trying to understand these concept...
For the moment, I'm just using it on a test computer and on a personal laptop with no fear of data loss,.
Any help is welcome
Thanks!
Last edited by jasonwryan (2013-07-19 23:13:27)

I honestly think it is probably a better idea to not use mkinitpcio-btrfs.  As mentioned above, it is poorly documented, and for me it has never worked right (if at all).  It is an unofficial AUR package, and unfortunately our wiki still seems to give the false impression that using this package is the way to user btrfs with Arch.
The way I have my system set up is that in subvolid=0 (the root of the btrfs filesystem) I have a rootfs subvolume and a home subvolume (there are others, but these are what primarily make up my system).  So in my fstab, I basically have two nearly identical lines, but one has no subvol specified and is mounted at /, and the other has 'subvol=home' mounted at /home. 
So in order to make it so that I can change the root filesystem as I please, instead of having the / fstab entry specify the subvolume, I put it in the kernel command line.  That is, I have 'rootflags=subvol=rootfs' in the kernel command line.  So if I want to change it, I simply change the path to one of the snapshots. 
Just remember that if you are one who likes a custom kernel, it is likely that you will have to have an initamfs no matter what you compile into your kernel.  For one thing, the kernel has no mechanism for scanning for multiple device btrfs filesystems.  But also, I have read that the kernel itself cannot handle the rootflags kernel command line argument.
Oracle Linux does something interesting with their default setup.  They are not a rolling release, so this probably wouldn't work so well in Arch Linux, but they actually install the root filesystem (I think it is actually done to subvolid=0) and then after installation of the packages, a snapshot of the root filesystem is made, and the system is setup to boot off of that snapshot.  So it is almost like having an overlayfs on openwrt.  There is always a copy of the original system, and and changes that are being made are being done "on top" of the original.  So in the event of an emergency, yo can always get back to the original working state.
If you put your root filesystem on something other than the root of the btrfs filesystem (which you should, as it makes the whole setup much more flexible), then you should also set up a mountpoint somewhere to give administrator access to the filesystem from subvolid=0.  For example, I have an autofs mountpoint at /var/lib/btrfs-root.   chose that spot because /var/lib is where devtools puts the clean chroot.  So it seemed as reasonable a place as any.
You should go to the btrfs wiki, and peruse through the stuff there... not our wiki, but the actual btrfs one, as our wiki is pretty sparse.  There is not all that much content there (not like the Arch wiki), but it does cover the features pretty well.  I mean, there is certainly quite a lot for being information on only a single filesystem, but it shouldn't take you too long to get through it.  There are a few links to articles about midway down the front page.  What really gave me a better grasp of getting started with btrfs were the ones titled "How I Got Started with the Btrfs Filesystem for Oracle Linux" and "How I Use the Advanced Capabilities of Btrfs".

Similar Messages

  • I had no idea my iPhone and iPad were connected and I deleted "notes" I had on phone they also were removed from iPad. Can these notes be retrieved? After this mess I will go downtown to apple store and learn how to use these devices.

    I had no idea my iPhone and iPad were so connected. I deleted notes from iPhone as I had them on iPad.  Well was I surprised to see they were gone from iPad also. Can these be retrieved?

    Because it says it's incompatible when it can't be, I got hope. I get error messages all the time with my iPod and iPhone that it cannot sync and that 'this device is not capapble of connecting to iTunes' stuff. I literally forget that happened, plug it in again and it works, I later realize that iTunes made a mistake, they do that.

  • Get Windows 10 set up quickly and learn how to use it with Geek Squad

    Windows 10 has just been released and many people are saying this is the most important offering from Microsoft in many years. It is packed with amazing new features. Geek Squad has a range of services related to helping you get started with Windows 10, quickly and hassle free.

    All you need is wireless. If the DSL modem does not provide routing services or does not provide wireless, then you need to get a wireless/wired router. If the modem provides wireless, then that's all you need. Consult the user manual for the DSL modem or talk to your service provider.

  • HT4783 I'm trying to learn how to use Airdrop between my wife's Mac and mine. We both have it, but this article did not help us learn HOW to share files.  Yippeee that we can...but HOW?

    My wife and I are trying to learn how to use Air Drop.  The "tutorial" showed us where it is.  It came up.  I saw hers (Mac).  She saw mine (Mac). But where to go after that is, apparently, in the cloud somewhere.  The description says we can share files...which is nice...but nothing tells us HOW to share those files. 
    Thanks for your help out there...
    Dennis

    1. Open a new Finder window or use one that's already open
    2. Click on Airdrop, press Shift+Command+R, or find "Airdrop" in the "Go" menu
    3. Drag your file to the icon of the person you want to send the file to (if you have mountain lion, you can use the share button).
    4. The other person has to click "save"
    5. The file will send and appear in the receiver's downloads folder
    In Mountain Lion, a new feature was added: the share button. It's a button with a picture of a box and an arrow jumping out of it. Click on it and the third (and last) option is "Airdrop" and clicking on it will allow you to send files over Airdrop without opening it in Finder.

  • Learn how to use Powershell with AD, Exchange and Excel

    Hi.
    I want to learn how to script in Powershell to make my life easier at work.
    Now, I'm creating Distribution Lists with cmdlets, and other simple moves, but I'd like understand and use scripts with Excel to make it easier in AD and Exchange.
    Can anyone help me find out where I can learn Powershell with those tools? I've searched google and youtube, and bought books, but I'd like to learn especially about AD and Exchange through Excel.
    I also have another question, I'm trying to collect the telephonenumbers in one OU in AD, and found this cmdlet:
    Get-AdUser -Filter * -Properties OfficePhone | FT OfficePhone,UserPrincipalName
    I lined ut the OU path before -Filter, and used * -Properties Telephones Mobile to find the phonenumber in Properties-Telephones-Mobile in Active Directory. But I'm obviously doing something wrong.
    Could anyone please help me? 

    Hi Wezcomp,
    first of all, you can use Get-Help to learn how to use Cmdlets, by asking them what it is they do:
    Get-Help Get-ADUser -Detailed
    By Adding the -Detailed Parameter, it will explain each Parameter of Get-ADUser and what it does. Then it will show you examples on how to use the cmdlet. Very useful tool,
    Get-Help, learning to use it fully ought to be your first step, as this unlocks your access all other aspects of PowerShell. With that tool in hand, you could theoretically do the rest fully autodidactically (would be frustrating though, since you'd
    like to be able to do something specific right now. Don't worry, we'll gladly help anyone truly trying to learn.).
    There are lots of tutorials out there that can be useful in a general way (I added my own here). But regarding Excel:
    As Fausto said, CSVs are the simple most way to do this. I'd advice against delving too deep into Excel manipulation right now (lots of frustration, little immediate rewards), Csv is your friend. Notable Commands:
    Import-Csv
    Export-Csv
    For example, if you want to create a csv list with user data in it, using your previous example, you can do this:
    Get-ADUser -Filter "*" -Properties OfficePhone | Export-Csv "C:\example\users.csv" -NoTypeInformation
    By the way: FT (Format-Table) is a treacherous command: It displays objects to the console, but it is a dead end where data is concerned! Only use it when you want to check something quick on the console (like whether you got the right data), before
    continuing on without using a Format command.
    Cheers,
    Fred
    There's no place like 127.0.0.1

  • I'm trying to learn how to use Xcode. I've create a simple Hide App app from a youtube video tut, but I can't get it to export with the icon I've chosen. Any clues why?

    I'm trying to learn how to use Xcode. I've create a simple Hide App app from a youtube video tut, but I can't get it to export with the icon I've chosen. Any clues why?

    We didn't do that video. Why are you asking here?
    Those videos are usually outdated....
    Use the current tools etc., in the iOS Dev Center and iTunes/iTunes U ~ Stanford.

  • I have just started to use Muse for our design agency and learning how to build ourselves a new site, I have manged to create a basic lightbox which contains sliding images, what I need to do now is have a pop up window which goes into detail about the pr

    I have just started to use Muse for our design agency and learning how to build ourselves a new site, I have managed to create a basic lightbox which contains sliding images, what I need to do now is have a pop up window which goes into detail about the projects, what I would like is a piece of text  or icon that when you roll over it and then click a separate window pops up with additional information in, once finished reading the info you can then click to close the box, any advice on how to do this?

    The best way to do what you're asking is with the Composition widget. Start with the Tooltip preset, which, by default shows the info on rollover. You can change the option to show on click, which is what you're after. You can also add the close button or have the info disappear on rollout.
    David

  • I need to learn how to use Illustrator CS6

    I have tried to access both the help topics and the video tutorials for Illustrator CS6.  Help topics always have no listing for learning how to use the program.  And the video tutorials will not run.

    What does that mean "will not run?" Any error? Doesn't show? No sound?
    Which system? Which browser? Which page exactly?

  • Javascript error on - Help - Learn how to use Numbers with this online...

    I am trying to find out more about Numbers. I am using iTunes 9.1.1 on a Vista PC. I get a Javascript error in Internet Explorer 8 when I try to access:
    Help - Learn how to use Numbers with this online resource.
    http://help.apple.com/numbers/1.0
    The link redirects to the following page:
    http://help.apple.com/iwork/safari/interface/#tan727163ed
    The above page is blank except for boxes for Keynote Help, Pages Help, Numbers help, and a blank input field that seems to do nothing. Here is the Javascript error message from Internet Explorer 8:
    Webpage error details
    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729)
    Timestamp: Tue, 1 Jun 2010 20:55:54 UTC
    Message: This command is not supported.
    Line: 1
    Char: 41589
    Code: 0
    URI: http://help.apple.com/iwork/safari/interface/javascript.js

    Link also does not work for me in WIN 7 with IE8. However, it does work in Chrome in WIN 7. It also works in Safari on my G4. Suggest you try Chrome or it may work in another browser like FireFox or Safari in Vista.

  • Learning how to use Layout Managers

    The code that is included in this post is public code from the SUN tutorials. I am trying to learn how to use the layouts and add individual programs that were created to each component in the layouts.
    This is what I am exploring:
    I want to have a tabbed layout like the example TabbedPaneDemo located at http://java.sun.com/docs/books/tutorial/uiswing/examples/components/index.html#TabbedPaneDemo. Below is the code.
    In one of the tabs, I want to place a button and report in it. When the button is clicked, I want the report refreshed. Eventually I will be populating an array with data. The report I want to use the example SimpleTableDemo located at http://java.sun.com/docs/books/tutorial/uiswing/examples/components/SimpleTableDemoProject/src/components/SimpleTableDemo.java. Below is the code.
    From what I have learned, you can place a container inside a container. So I should be able to place the SimpleTableDemo inside the tab 4 of the TabbedPaneDemo.
    If this is indeed correct, then how do I put these two things together? I am getting a little lost in all the code.
    Any assistance in helping me learn how to create and use layout managers would be appreciated.
    package components;
    * TabbedPaneDemo.java requires one additional file:
    *   images/middle.gif.
    import javax.swing.JTabbedPane;
    import javax.swing.ImageIcon;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JFrame;
    import javax.swing.JComponent;
    import javax.swing.SwingUtilities;
    import javax.swing.UIManager;
    import java.awt.BorderLayout;
    import java.awt.Dimension;
    import java.awt.GridLayout;
    import java.awt.event.KeyEvent;
    public class TabbedPaneDemo extends JPanel {
        public TabbedPaneDemo() {
            super(new GridLayout(1, 1));
            JTabbedPane tabbedPane = new JTabbedPane();
            ImageIcon icon = createImageIcon("images/middle.gif");
            JComponent panel1 = makeTextPanel("Panel #1");
            tabbedPane.addTab("Tab 1", icon, panel1,
                    "Does nothing");
            tabbedPane.setMnemonicAt(0, KeyEvent.VK_1);
            JComponent panel2 = makeTextPanel("Panel #2");
            tabbedPane.addTab("Tab 2", icon, panel2,
                    "Does twice as much nothing");
            tabbedPane.setMnemonicAt(1, KeyEvent.VK_2);
            JComponent panel3 = makeTextPanel("Panel #3");
            tabbedPane.addTab("Tab 3", icon, panel3,
                    "Still does nothing");
            tabbedPane.setMnemonicAt(2, KeyEvent.VK_3);
            JComponent panel4 = makeTextPanel(
                    "Panel #4 (has a preferred size of 410 x 50).");
            panel4.setPreferredSize(new Dimension(410, 50));
            tabbedPane.addTab("Tab 4", icon, panel4,
                    "Does nothing at all");
            tabbedPane.setMnemonicAt(3, KeyEvent.VK_4);
            //Add the tabbed pane to this panel.
            add(tabbedPane);
            //The following line enables to use scrolling tabs.
            tabbedPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
        protected JComponent makeTextPanel(String text) {
            JPanel panel = new JPanel(false);
            JLabel filler = new JLabel(text);
            filler.setHorizontalAlignment(JLabel.CENTER);
            panel.setLayout(new GridLayout(1, 1));
            panel.add(filler);
            return panel;
        /** Returns an ImageIcon, or null if the path was invalid. */
        protected static ImageIcon createImageIcon(String path) {
            java.net.URL imgURL = TabbedPaneDemo.class.getResource(path);
            if (imgURL != null) {
                return new ImageIcon(imgURL);
            } else {
                System.err.println("Couldn't find file: " + path);
                return null;
         * Create the GUI and show it.  For thread safety,
         * this method should be invoked from
         * the event dispatch thread.
        private static void createAndShowGUI() {
            //Create and set up the window.
            JFrame frame = new JFrame("TabbedPaneDemo");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Add content to the window.
            frame.add(new TabbedPaneDemo(), BorderLayout.CENTER);
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args) {
            //Schedule a job for the event dispatch thread:
            //creating and showing this application's GUI.
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    //Turn off metal's use of bold fonts
              UIManager.put("swing.boldMetal", Boolean.FALSE);
              createAndShowGUI();
    package components;
    * SimpleTableDemo.java requires no other files.
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import java.awt.Dimension;
    import java.awt.GridLayout;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    public class SimpleTableDemo extends JPanel {
        private boolean DEBUG = false;
        public SimpleTableDemo() {
            super(new GridLayout(1,0));
            String[] columnNames = {"First Name",
                                    "Last Name",
                                    "Sport",
                                    "# of Years",
                                    "Vegetarian"};
            Object[][] data = {
                {"Mary", "Campione",
                 "Snowboarding", new Integer(5), new Boolean(false)},
                {"Alison", "Huml",
                 "Rowing", new Integer(3), new Boolean(true)},
                {"Kathy", "Walrath",
                 "Knitting", new Integer(2), new Boolean(false)},
                {"Sharon", "Zakhour",
                 "Speed reading", new Integer(20), new Boolean(true)},
                {"Philip", "Milne",
                 "Pool", new Integer(10), new Boolean(false)}
            final JTable table = new JTable(data, columnNames);
            table.setPreferredScrollableViewportSize(new Dimension(500, 70));
            table.setFillsViewportHeight(true);
            if (DEBUG) {
                table.addMouseListener(new MouseAdapter() {
                    public void mouseClicked(MouseEvent e) {
                        printDebugData(table);
            //Create the scroll pane and add the table to it.
            JScrollPane scrollPane = new JScrollPane(table);
            //Add the scroll pane to this panel.
            add(scrollPane);
        private void printDebugData(JTable table) {
            int numRows = table.getRowCount();
            int numCols = table.getColumnCount();
            javax.swing.table.TableModel model = table.getModel();
            System.out.println("Value of data: ");
            for (int i=0; i < numRows; i++) {
                System.out.print("    row " + i + ":");
                for (int j=0; j < numCols; j++) {
                    System.out.print("  " + model.getValueAt(i, j));
                System.out.println();
            System.out.println("--------------------------");
         * Create the GUI and show it.  For thread safety,
         * this method should be invoked from the
         * event-dispatching thread.
        private static void createAndShowGUI() {
            //Create and set up the window.
            JFrame frame = new JFrame("SimpleTableDemo");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Create and set up the content pane.
            SimpleTableDemo newContentPane = new SimpleTableDemo();
            newContentPane.setOpaque(true); //content panes must be opaque
            frame.setContentPane(newContentPane);
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }

    Before I did what you suggested, which I appreciate your input, I wanted to run the code first.
    I tried to run the SimpleTableDemo and received the following error:
    Exception in thread "main" java.lang.NoClassDefFoundError: SimpleTableDemo (wrong name: componets/SimpleTableDemo)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader...
    there are several more lines but as I was typing them out I thought that maybe the code is not written to run it in the command window. The errors seem to be around the ClassLoader. Is that correct? On the SUN example page when you launch the program a Java Web Start runs. So does this mean that the code is designed to only run in WebStart?

  • Does anyone know if apple's one-to-one program would be a good way to learn how to use logic pro or am I better off going to school to learn audio engineering or something?

    Of course going to school would be a good option, but I want to know if one-to-one is also a good way to learn how to use logic pro. Has anyone been through the one-to-one program for logic pro and can say that they learned how to use logic pro well because of it?

    For sure, one to one training, if given by a tutor who is capable, will hand you the means to build up self-confidence  and will therefore let you operate the hard/software in an intelligent manner, instead of going for the trial and error method which has its pro's and con's too. Once you've passed this beginners phase you will make your own decisions intelligently and then you will also start to get experience and learn even from your mistakes. Something like that in theory and the rest is up to you!
    Have a nice day

  • HT1688 I am trying to find answers about how to use the earphones that came with my new iPhone 4s. Does this work similarly as a Bluetooth or do I need to still buy one. The printing in the manual is SOOO small, it is too hard to read!

    Does anyone know how to use the earphones( plugs) that come with iPhones?
    Mine is still fairly new and I am just learning how to use certain things.

    They're pretty straightforward. You plug them into the headset jack (the hole on the top left of your phone). You put the buds in your ears. All sounds, except for the phone ringing will now come through the earbuds.

  • I need to learn how to use all about java & mysql...help me!

    I have a situation here, I need to learn how to use java with mysql
    . Can I connect to a MYSQL DB with servlets?
    how can I build an e-mail server with java (no matter how difficult)
    please, I need help, and I really apreciate your help.
    thank you very much!!

    I have a situation here, I need to learn how to use
    java with mysql
    . Can I connect to a MYSQL DB with servlets?Yes... documentation to help you connect to any database can be found at http://java.sun.com/products/jdbc. To connect to MySQL, you'll need drivers (sourceforge.net), and the specific connection URL for those drivers will be included in the documentation.
    how can I build an e-mail server with java (no matter
    how difficult)If you're fairly new to JSP/Servlets, you may be in over your head here, since an email server is no easy application to code. Here's a link to the source code for the JAMES project... Apache's Java email server... maybe you can find some useful information there...
    http://www.ibiblio.org/pub/packages/infosystems/WWW/servers/apache/jakarta/james/source/

  • I need to learn how to use jump lists.

    '''bold text'''I need to learn how to use jump lists. acording to all that I have muddled thru my ereader will only download books I have purchased and free ones if I use a jump list. I don't know how. If this is the correct method for ereaders downloads someone please explain it, simply to me. I have a reader I am totally unable to use. I have read the manual many times. That info doesn't work.

    How is that related to Firefox support?

  • Where do I go to learn how to use Terminal?

    I need to learn how to use Terminal. I learn best via video tutorials. Wondering if Apple has anything that will help?

    Thanks to you both TeenTitan and leroydouglas.
    As a web designer I decided to make the leap to HTML5 recently and have been collecting TONS of wonderful links to help me get up and running. HTML5 is a monumental leap compared to the transition I had to make from HTML 3.2 to 4 and then from 4 to XHTML 1.0. I was greatly encouraged to find the WebDev community embracing HTML5 Boilerplate and thought life would actually be simpler even when I heard Divya Manian encourage developers to be sure to use Paul Irish's Build Script which comes with HTML5 Boilerplate. As I watched his video, I realize as a Mac user that while there may be an alternative way to work with the Build Script I may not know how to do it properly so I'd best make peace at long last with Terminal. I don't want to run the script on a site and wonder if I didn't use Build Script properly.
    If interested you can learn about HTML5 Boilerplate here.
    Here is the YouTube video I mentioned about the demo for Build Script and its use in Terminal.
    I will definitely bookmark all your links and review them soon.

Maybe you are looking for

  • IMac no longer prints to network printer

    I am running OS 10.3.9 on our iMac G4 and it seems that we can no longer print to our networked Brother 1870N laser printer. We execute a print command and the queue opens, the printer wakes up like it normally does to start a job, but then the docum

  • My iPad 2 screen won't "lock" or "turn off" after being left unused since ios7 update

    Hi, I hope this hasn't already been covered I have had a look and on other sites but haven't come across nothing. Since I have updated to ios7 my iPad 2 screen now doesn't lock when left unused, I can manually lock it by pushing the lock button but i

  • How to populate TableView data on the other screen TextField

    Hi guru’s I am having problem in populating data from a table in one screen to a Text Field in the other screen. I have two classes FirstClass containing a textbox and a button. On pressing a button a second window is opened containing a Table of val

  • How to Manipulate XML message in BPM

    Hi, We are running an Async to Sync bridge for our SAP ORDERS ORDERS05 IDoc to CXML order request interface.  When we post the CXML order and get a response, we are trying to send a STATUS SYSTAT01 IDoc to SAP.  We need to pass in the IDoc number for

  • Flash Builder 4.7 Immediate Crash

    FYI Flash Builder 4.7 Mac + OSX 10.10 Yosemite + (any) File Dialogue Box = Immediate Crash :-( Flash Builder 4.7 + OSX 10.10 Yosemite + File Dialogue Box = CRASH :-( Problem Description: When attempting to use a Flash Builder File Dialogue Box under