Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Adding another drive to a VLM

  • 03-03-2010 11:07pm
    #1
    Moderators, Education Moderators, Technology & Internet Moderators Posts: 35,125 Mod ✭✭✭✭


    I've set up my own file server and before I have one partition spanned across two disks using VLM. If I choose to add another drive to the VLM and then increase the partition to incorporate that drive will I lose any of the existing data saved on the hard drives in the VLM. I'm pretty confident I won't (well there is always that risk when you start screwing around with partitions) but I'd like to be sure before I start transferring data across.


Comments

  • Registered Users, Registered Users 2 Posts: 545 ✭✭✭ravydavygravy


    I assume you mean LVM - if so, you should be able to do this without losing data - but as you said - messing with such things is also like playing with fire, so backup first.

    Without having docs to hand, you'd need to do something like this:

    1) Add the physical drive to the machine
    2) Add the drive to a new LVM physical group (pvcreate?)
    3) Add the new PV to the existing Volume Group (vgextend?)
    4) Use the new space to increase an existing logical volume (lvextend?)
    5) Resize the filesystem to fit the new LV size (resize2fs - does this do ext3?)

    Dave


  • Registered Users, Registered Users 2 Posts: 37,485 ✭✭✭✭Khannie


    Yeah, it's LVM and this kind of thing is well documented. It's the main value of an LVM over a standard partition (IMO anyway). I've done this before and (Not being smart but) google is your friend there. There are lots of guides.

    edit: You might consider using gparted for that actual partition messing (once you've extended the logical volume). It's actually a really good piece of kit these days and much nicer than arsing around on the command line.


  • Moderators, Education Moderators, Technology & Internet Moderators Posts: 35,125 Mod ✭✭✭✭AlmightyCushion


    Yeah it is LVM I'm talking about. I was trying to remember what three letter acronym it was and all I kept thinking was mkv, kvm, vlc etc. which are obviously all wrong. I got pretty close though which is all good.

    @Khannie - I've used gparted to create the current partition on the LVM and I've used it before a few times as well. It seems to work very well so I'll definitely be using it especially seeing as I'm new to linux and not familiar with the CLI. I'm pretty comfortable with the process of doing it I was just worried about the data.
    Thanks a million for the help guys.


  • Registered Users, Registered Users 2 Posts: 354 ✭✭AndrewMc


    5) Resize the filesystem to fit the new LV size (resize2fs - does this do ext3?)

    Yes, resize2fs does ext3. If it's recent enough, it can usually do the resize even while the filesystem is in use. If you don't specify the new filesystem's size it will just expand to fill the logical volume.


Advertisement