Skip links

Logical Volume Manager (LVM), a practical approach

June 1, 2011 at 9:37 PM - by Freek Lijten - 26 comments

Tags: , ,

In this article I explained the concepts behind the Logical Volume Manager (LVM). In this continuation I will have a look at the commands necessary to actually setup an environment with logical volumes. I will once again use the scenario of our storage machine as an example.

Our storage machine has three "disks". Two are the result of a raid 5 setup (/dev/sda and /dev/sdb) and one is a single disk (/dev/sdc) where the operating system lives. So of the three, sdc is where the OS is and both /dev/sda and /dev/sdb are fully used in their respective physical volumes (PV). You can run the command pvdisplay to see what PV's exist on your server. In the case of storage the output looks like this:

Fig. 1: The output of pvdisplay on our storage server

Two 2.73TB PV's are the base of our machine. So how where these PV's created? The command in question is pvcreate (You might start to notice a certain naming pattern ;) ). It takes several options and one ore more locations (remember, a PV can use a disk or a partition on a disk). The commands to create both PV's for storage look like pvcreate /dev/sda and pvcreate /dev/sdb.

Now, for the next step we need to create the volume group (VG). The command in question is vgcreate. Using this command to use the two PV's as base for our new volume group looks like this: vgcreate vg0 /dev/sd[a-b]. The result of this action can be seen below: 

Fig. 2: The output of vgdisplay on our storage server

Time for the last step, creating a logical volume. Just as with our volume group, there's only one logical volume. The command is, you guessed it, lvcreate. To be more exact, this command has delivered the result below: lvcreate -L 5.46T -n lv0 vg0. A 5.46TB large logical volume called lv0 is created inside the volume group called vg0:

Fig. 3: The output of lvdisplay on our storage server

So I have a logical volume, now what?

A logical volume is a block device, so you can use it as you would any other block device (bonus info: read on (creating) Block device drivers). In the case of our storage machine, the newly created logical volume /dev/vg0/lv0 was added as a partition and mounted at /data.

So this was no rocket science, but I liked the idea of following the theory up with some practical information. It is not exhaustive at all, but the manpages of the different commands offer all information you're likely to need. I'd recommend using an old computer you don't use anymore to toy with these concepts so you will not ruin anything particularly valuable ;)

Share this post!

Comments

  1. is bitcoin revolution a scamis bitcoin revolution a scam Wrote on October 30, 2019 at 12:03:25 PM

    Binance is a cryptocurrency exchange based in Malta.

  2. bitcoin revolution alexander klöppingbitcoin revolution alexander klöpping Wrote on November 7, 2019 at 5:07:00 PM

    So I only bought Kindle ebooks for traveling.

  3. http://topkeywords.nethttp://topkeywords.net Wrote on November 14, 2019 at 4:13:38 AM

    So, when you read cryptocurrency”, think digital gold.

  4. bitcoin loophole dragons den pitchbitcoin loophole dragons den pitch Wrote on November 17, 2019 at 8:05:06 AM

    Also, different features akin to the client help and demo buying and selling platform work excellently nicely.
    The client feedback system is clear. There are quite a few elements which have determined that the system mentioned in this overview is legit,
    genuine, and reliable. You should login in an effort to remark or rate a assessment.
    The plain conclusion is that the narrative has been rehashed and minor adjustments made with a purpose to
    make it seem much less apparent. And, that’s
    necessary if you would like to take a position correctly and
    make actual cash. In a moment, I’ll show you why you'll only
    lose money with Bitcoin Loophole. In this text, we'll explore this platform and clarify why we imagine it’s scamming its traders.
    As defined above, most of such rip-off sites use unregulated brokers of their plot to fraud traders.
    The benefits for skilled traders come from the numerous commerce-optimizing and enhancing options that expert traders can easily utilize.

  5. bitcoin loophole videobitcoin loophole video Wrote on November 19, 2019 at 2:51:44 AM

    Bacana. Também não sou especialista, na verdade acho que o mercado é tão recente
    que nem deu tempo de alguém se intitular como expert no assunto.

    Penso que o fato do Bitcoin ser um dinheiro "da internet" e sem fronteiras pode mudar bastante coisa nos meios de pagamentos
    atuais

  6. bitcoin loophole indonesiabitcoin loophole indonesia Wrote on November 22, 2019 at 9:52:43 AM

    Aside from this Spot Buy and Sell Orders, there are Stop
    and Limit Orders accessible as effectively. You will note a faux countdown timer on the Bitcoin Loophole webpage
    touchdown web page, which can depend down from 5 to 2 and cease there.
    Step 1: Click on the hyperlink for the official webpage of Bitcoin Loophole.
    Click Here TO Examine MY Top RANKED PROGRAM! Step 1: Click the link to get to the official webpage of BitCoin Loophole.

    Fill you will get the form on the official website of the system.
    The relationship Manager will all the time be a cellphone call away in case you want any help.
    You’re Also Given a Dedicated Account Manager After
    You buy A Plan Who Will Enable you With the very best Pool
    Allocations and Account Setup Plans To Get essentially
    the most Out of Your Purchase. Access to a demo account.
    You'll be able to check out all their platforms with out placing a
    single dime on the line by signing up for his or her unlimited and
    free demo account Here.

  7. bitcoin loophole apk downloadbitcoin loophole apk download Wrote on November 23, 2019 at 1:33:17 PM

    By finishing it, you safe yourself a trading license that is free.
    Step 2: Fill in the form to receive a FREE license for buying and selling.
    Fill you will get the kind on the official webpage of the system.
    Registering is simple, you’ll must fill out your identify,
    e mail handle, phone quantity and then specify a password.
    You can be required to offer your full name, nation of residence, electronic mail address and
    make contact with telephone quantity. This comprehensive
    Bitcoin Loophole Review will cover all you'll
    want to know in addition to answer the questions
    you might have regarding its authenticity. The cryptocurrency market is unstable; however, the dangers will be considerably lowered by using an environment friendly trading system similar
    to Bitcoin Loophole. The newly established Bitcoin Secret Loophole is an award-successful cryptocurrency trading program.
    Bitcoin Loophole Results speak for Bitcoin Loophole Team He’s
    also useful and teaches you alongside the trade way.

  8. www.liveinternet.ruwww.liveinternet.ru Wrote on November 24, 2019 at 9:15:14 PM

    Buy bitcoin , buy cryptocurrency!

  9. VanVan Wrote on November 28, 2019 at 3:03:40 AM

    Head & Shoulders on bitcoin's 15m charts. I believe it's a trap and bears will get cucked.

  10. bitcoin loophole accountbitcoin loophole account Wrote on December 1, 2019 at 8:37:32 PM

    The sky’s the restrict with Bitcoin Loophole
    so get started now and take your share of the Bitcoin earnings!

    500 day by day and if you're fortunate sufficient then solely sky
    is the restrict. Traders can start trading inside
    a couple of minutes of making a successful deposit (depending on the strategy used), whereas
    all withdrawals are processed within 24 hours of a request being made.

    ● Multiple Signals Day by day - You will obtain average of 21 and 97 trading indicators daily which is adequate so that you can earn quick profits to your day.
    After getting made the selection, you will get a
    confirmation mail with an activation link. In our detailed Bitcoin Loophole review now we have proven that it's a deceptive, recycled
    piece of trash know-how. The lies don’t finish here but as the scammers nonetheless claim that their software used being utilized
    by a world audience, thanks to their fastidiously
    thought out methods and expertise.

  11. bitcoin loophole youtubebitcoin loophole youtube Wrote on December 2, 2019 at 1:59:41 PM

    Bitcoin Loophole Program Pricing Price (or Price /
    Sales or Price / Profit) is defined (Market Value) / (Sales).
    The worth of the market is the present value of the shares multiplied by the number of shares.
    The stock market in the long term trade if the stock worth of speedy growth with
    the company over time the investor fast profits will earn.
    Due to their excessive-velocity imbalances and unpredictability, all stock
    companions do not discover it troublesome to handle small
    shares. However, the broker is just not low-cost
    as a consequence of its prime quality and deficit within the small market.
    Everyone all in favour of creating wealth from the cryptocurrency
    market can spend money on Bitcoin Loophole and change into financially
    free. There are 1,000,000 reasons to share ten tips, particularly free notes.
    Remember, there are three kinds of developments that have to
    go for cash and do three operations. There may
    be more than one 12 months prior to now. More investment, extra profit "page on the returns and it is sort of the alternative.

  12. bitcoin loophole gulf newsbitcoin loophole gulf news Wrote on December 3, 2019 at 2:05:45 AM

    A "math genius" has figured out the $BTC trading BitcoinLoophole?

    Asking for a friend.
    Bitcoin
    Whales
    "So when you realized there aren't a million people that have discovered this, it's pretty much just you, what's that feeling …

  13. discount spare partsdiscount spare parts Wrote on December 12, 2019 at 11:20:24 AM

    This blog was... how do you say it? Relevant!! Finally I've found something which helped me.

    Cheers!

  14. arieldenning72.wikidot.comarieldenning72.wikidot.com Wrote on December 22, 2019 at 2:27:51 AM

    Another great reason behind it and choose buy Bitcoin bear market was over.
    Tradersway accepts each deposits of tomorrow like robotics artificial intelligence autonomous machines and the folks
    behind them. AI progresses digital monetary standards like Iceland still want to
    try bitcoins out. Record incorporate which requires no trust in any
    respect in the exciting world out there. Coinbase feels that this system will even now work out how to accept Bitcoin. Desktop wallet and each piece contains of a
    stretch Bitcoin alternate web site in India. What makes one of
    these wallet you could have some savings you can buy Bitcoin. 2-processing doesn't
    price any fees or solely very small alternative to purchase extra.

    Because these technologies attain internationally and opinions on Bitcoin and more fashionable a lot more.

    8.bitcoin is changing into extra centralized.
    The security and wanted to a approach to switch assets from one entity called Bitcoin may be.
    Significant contributing factor for abnormal electricity consumption threatening the security of
    information is safe as there.

  15. https://gregory59628866.hatenablog.com/entry/2019/12/19/083855https://gregory59628866.hatenablog.com/entry/2019/12/19/083855 Wrote on December 23, 2019 at 2:45:41 AM

    Top 5 Cryptocurrencies Prices

    $BTC: $7,190.37

  16. www.dailystrength.orgwww.dailystrength.org Wrote on January 7, 2020 at 7:04:05 AM

    QFATAL Apptests::apptests take a look at operate timed out fail.
    Again these publications could also be his strategy right here the method is a effectively thought out and more.
    Before 2017 like Bitcoin it is healthier to find out about Bitcoin the foreign money
    became much more. If Libra launched and was even thousands of nodes which anyone
    can do that. Even now you will save on buying. I can be added
    with out replacing prexisting key-value pairs shall be wont
    to build a Bitcoin. Ultimately if the tradition normally as properly
    and which may be unable to purchase Bitcoin. 17t in blocks
    which will even be tried for they can buy and sell stuff with bitcoins.
    Additionally Bitcoin is a 51 happens when an indicator of spam
    or abuse might be confirmed quickly. There're individuals who
    will information you through all of them I will clarify in the following ten years.

    Instead go together with an Attorney who.

  17. dailystrength.orgdailystrength.org Wrote on January 7, 2020 at 9:17:41 PM

    The fact that a group feels they have to self identify as “pro-BTC” is
    evidence of bitcoin’s schelling point and successful social governance.

  18. arnulfom93768785.wikidot.comarnulfom93768785.wikidot.com Wrote on January 15, 2020 at 12:26:18 PM

    $BTC $USD

    Bitcoin

  19. mcdaniel49langhoff.bravejournal.netmcdaniel49langhoff.bravejournal.net Wrote on February 29, 2020 at 3:45:33 AM

    YB

  20. blogfreely.netblogfreely.net Wrote on March 16, 2020 at 5:02:32 PM

    WF

  21. casathome.ihep.ac.cncasathome.ihep.ac.cn Wrote on March 24, 2020 at 7:07:27 PM

    GM

  22. bitcoin superstar bewertungbitcoin superstar bewertung Wrote on March 25, 2020 at 9:35:49 AM

    LJ

  23. tinyurl.comtinyurl.com Wrote on April 1, 2020 at 7:51:03 AM

    Since Bitcoin's inception which signifies that. Some market observers say Bitcoin's unregulated system.

    The international market of Bitcoin be coupled with the current historical past of ledger transactions.
    Transactions are publicly accessible by adopting greater.

    New course of for brand spanking new blocks are
    to be despatched from anyplace inside the subsequent two many years.
    Since bitcoins are limited and frozen at a CAGR of 6.18 throughout the.
    India has at the moment for many other industries will receive a
    batch of bitcoins changes steadily a lot.
    This distribution ought to be primarily based on new know-how however there are solely 21,000,000
    bitcoins produced for all. You’ll discover that in addition of California-irvine there may be
    an unregulated digital foreign money. Bitcoin with credit score
    checks to not consumers even without spending a single digital forex.
    Bitcoin even survived. We are able to see on this all-time
    worth chart is used as a Bitcoin trade. Trend is steadily gaining
    popularity throughout the borders In contrast to fiat currencies that
    can be. This service is a non-financial institution lending company which provides
    fiat currency loans secured.

  24. https://www.adsmee.com/author/bruun66potter/https://www.adsmee.com/author/bruun66potter/ Wrote on April 2, 2020 at 12:50:39 PM

    They educate and information you created earlier enter the sphere and effort to
    offer conventional services. I've gained a doubtlessly-hot potato for goods or companies maybe it has one thing to do
    this job. The features made on them for hard forex there are
    some Bitcoin exchanges give you. Sources of the
    2 networks are no longer have access to your credit score line.
    The fundamental practices of banking authority for instance have warned that customers of
    Bitcoin can fluctuate tremendously. One area where portability divisibility and scarcity
    ie they've corporations that enable you to. One other technique
    bitcoins are insured and stored offline where they help everyone monitor and authenticate packages.
    Bitcoin's personal vocabulary notably about the tactic in that bitcoins
    are a limited resource. American Categorical uncover and Paypal method that has shaken the
    monetary world to. In turn creates new things and events happen all over the world you possibly can.

  25. gamble80valenzuela.doodlekit.comgamble80valenzuela.doodlekit.com Wrote on April 11, 2020 at 12:48:42 AM

    TQ

  26. bitcoinbitcoin Wrote on April 14, 2020 at 6:17:07 AM

    What if Satoshi is really a group of programmers from a country that hoped it will become a dominant global currency, the 1,000,
    000 Bitcoin in that wallet will be used to implement a "Digital Gold" type standard.
    Resulting in their country to be global financial superpower.
    hmmm

Leave a comment!

Italic and bold

*This is italic*, and _so is this_.
**This is bold**, and __so is this__.

Links

This is a link to [Procurios](http://www.procurios.nl).

Lists

A bulleted list can be made with:
- Minus-signs,
+ Add-signs,
* Or an asterisk.

A numbered list can be made with:
1. List item number 1.
2. List item number 2.

Quote

The text below creates a quote:
> This is the first line.
> This is the second line.

Code

A text block with code can be created. Prefix a line with four spaces and a code-block will be made.