SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#26 2012-05-17 13:49:36

jelloir
#! CrunchBanger
From: Outside the garden wall
Registered: 2009-08-21
Posts: 210

Re: The monumental #! LVM guide

The features el_koraco outlines show the obvious benefits, it's up to you how you utilise them.  So let me re-phrase...  "Nor should yours if you need the flexibility it provides".

Being able to extend volumes over different hard drives is also pretty cool.

Offline

Be excellent to each other!

#27 2012-05-17 13:52:10

oylenshpeegul
Member
From: Maryland, USA
Registered: 2012-01-01
Posts: 37
Website

Re: The monumental #! LVM guide

SabreWolfy wrote:

It's possible to encrypt a LVM partition? I used this guide to encrypt my /home partition, but if I reinstall and use LVM, I would encrypt during install?

Yup! I just finished doing this on my waldorf netbook.  As el_koraco said, the installer itself offers encryption...it says something like

  • use whole disk

  • use whole disk with LVM

  • use whole disk with LVM and encryption

  • manual

My statler laptop is the whole disk, so I used the third option when I installed that (worked great!). My waldorf netbook still has the OS it came with on another partition, so I used manual and did the LVM and encryption stuff by hand. It was still pretty easy. I have an unencrypted /boot partition, but everything else for #! (including swap) is inside the encrypted LVM. At the end of the install, I told it to write grub to /boot instead of the MBR.

Offline

#28 2012-05-17 16:28:38

SabreWolfy
#! Die Hard
Registered: 2009-03-09
Posts: 1,269

Re: The monumental #! LVM guide

^ That's awesome. I wanna do that on my next install for sure.

Why did you put grub on /boot?


Support #!Waldorf • Debian sid • Xubuntu • siduction • Peppermint • OpenBox • Xfce • LXDE •

Offline

#29 2012-05-17 18:37:21

PackRat
#! Die Hard
From: USA
Registered: 2011-03-03
Posts: 734

Re: The monumental #! LVM guide

^ It's (in part) a legacy issue; grub originally did not work from LVM. I don't know if it will work from an encrypted partition.


"It does not require many words to speak the truth." - Chief Joseph, Nez Perce tribe

Offline

#30 2012-05-17 23:45:15

oylenshpeegul
Member
From: Maryland, USA
Registered: 2012-01-01
Posts: 37
Website

Re: The monumental #! LVM guide

SabreWolfy wrote:

Why did you put grub on /boot?

I have the TrueCrypt bootloader on the MBR, so I have it choose between booting Windows from the TrueCrypt volume or grub from  the plain /boot partition. When I choose the latter, grub is booting the encrypted LVM for me (TrueCrypt is no longer involved). I don't know if I could have done it all with grub on the MBR, but I knew this would work (as PackRat implied, this even works with grub 1) and it was already half done (I created the LVM as part of the waldorf install...the rest of the partitions were already laid out this way).

Offline

#31 2012-08-05 20:57:06

apprentice
#! Member
From: 43°42′N - 79°23′W
Registered: 2012-02-04
Posts: 75

Re: The monumental #! LVM guide

can i access (mount) lvm partitions from the #! live disc

i ran out of space on /usr and now i have an unusable machine
cant open terminal or anything

so i figured i'd just grow it a couple GB with a live disc and away i go

sound workable?


So come up to the lab...
And see what's on the slab

Offline

#32 2012-08-05 21:57:38

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,644

Re: The monumental #! LVM guide

Sure, just make sure you install lvm2 (I'm not sure how the #! live CD is set up, the Debian live CD loads the lvm module if the kernel detects logical volumes. A quick Google on "mount lvm volume" will give you results like these:

http://linuxers.org/howto/how-mount-lin … ions-linux

system-config-lvm is a tool which can help you with a GUI.

Offline

#33 2012-08-19 11:29:33

VDP76
#! Junkie
From: Bayreuth, Germany
Registered: 2012-04-12
Posts: 433

Re: The monumental #! LVM guide

el_koraco, thanks for this LVMonument.. big_smile
I have decided to give LVM a shot for a fresh Waldorf install. Following your instruction, everything was setup just fine. My only doubt is related to the fact that fdisk -l outputs something like

Disk /dev/mapper/debian-home doesn't contain a valid partition table

for each one of the LV...have I missed some important setting?


We are a nice, friendly community here and I hope we stay that way.. smile

Offline

#34 2012-10-13 10:04:15

donkeyotay
#! CrunchBanger
From: Everywhere
Registered: 2011-01-28
Posts: 163

Re: The monumental #! LVM guide

Morning All,
After borking my system I reinstalled using LVM and this magnificent guide.
I am now trying to syncronise Dropbox to /home but am told that Dropbox cannot sync because of lack of space.
So I have done

lvextend -L75GB /dev/debian/home

to give me a 75GB /home which is ample room for Dropbox. Lvdisplay gives

--- Logical volume ---
  LV Path                /dev/debian/home
  LV Name                home
  VG Name                debian
  LV UUID                pBz8df-AEAw-6Sha-QxWg-IvBV-mfNP-DqzR7M
  LV Write Access        read/write
  LV Creation host, time daddy, 2012-10-09 14:37:05 +0100
  LV Status              available
  # open                 1
  LV Size                75.00 GiB
  Current LE             19200
  Segments               3
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:1

  To show that I'm at 75 GB for /home. However Dropbox still won't sync.
What am I missing?
All help gratefully received.
Simon


I didn't say it was your fault... I said I was going to blame you.

Offline

#35 2012-10-13 10:06:29

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,644

Re: The monumental #! LVM guide

You need to extend the filesystem on the partition. As root:

resize2fs -p /dev/debian/home

Offline

#36 2012-10-13 10:29:07

dura
Bloated Gimp
From: interzone
Registered: 2012-09-15
Posts: 2,066

Re: The monumental #! LVM guide

I don't even use LVM currently, but this thread is seriously monumental. Real knowledge!

Offline

#37 2012-10-13 10:48:48

donkeyotay
#! CrunchBanger
From: Everywhere
Registered: 2011-01-28
Posts: 163

Re: The monumental #! LVM guide

You need to extend the filesystem on the partition. As root:

resize2fs -p /dev/debian/home

Was exactly what I was missing...Thank you smile


I didn't say it was your fault... I said I was going to blame you.

Offline

#38 2012-11-08 00:12:09

Conflict
New Member
From: New England, US
Registered: 2012-11-07
Posts: 2
Website

Re: The monumental #! LVM guide

Thank you so much for the yummy, informative, well-written LVMery.


-C0nf

Offline

#39 2012-11-08 08:38:26

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,644

Re: The monumental #! LVM guide

No prob. Welcome to the forums.

Offline

#40 2012-11-13 16:31:56

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,644

Re: The monumental #! LVM guide

Flexible installing of new distros (a personal example)

So, a few weeks ago I decided to switch to Sid. I had a 50 GB /home LV in Squeeze, most of which was used for music. Since I wanted as little fuss as possible with Sid, and wasn't sure if I would keep Sid, I decided to move things around a little. First I made a new LV for hosting my music files and formated it to ext4:

root@mrdeb: lvcreate -L40G -n music /dev/debian     
root@mrdeb: mkfs.ext4 /dev/debian/music    

Then I used Thunar to copy all my music on the new logical volume. Next, I made a snapshot and backup of my Squeeze root partition, as per lesson nr 4 on page one, and a new LV for sid, with ext4: 

root@mrdeb: lvcreate -L10G -n sid /dev/debian 
root@mrdeb: mkfs.ext4 /dev/debian/sid    

I booted the installer, installed everything under a single root partition. I transferred all my settings from my Squeeze /home LV to my new install. Then I made two directories in my new home and gave permission to my user:

root@mrdeb: mkdir -p /home/elkoraco/music /home/elkoraco/videos
root@mrdeb: chown elkoraco:elkoraco /home/elkoraco/music
root@mrdeb: chown elkoraco:elkoraco /home/elkoraco/videos
 

I added these two lines to my fstab, so the system would mount the video and music LVs in /home/elkoraco:

/dev/mapper/debian-video /home/elkoraco/videos           xfs    relatime         0       2
/dev/mapper/debian-music /home/elkoraco/music           ext4    noatime         0       2

Some days later, after deciding to stick with Sid, I wanted to nuke my Squeeze partitions. I do have a backup, so in case I want to go back, it will be a piece of joke:

root@mrdeb: lvremove /dev/debian/root 
root@mrdeb: lvremove /dev/debian/home

This kind of migration can be done regardless of distro, as long as it has LVM support in the installer, and it makes our lives a million times easier.

Last edited by el_koraco (2012-11-13 16:32:12)

Offline

#41 2012-11-17 09:37:38

MrPink
#! CrunchBanger
From: .dk
Registered: 2011-06-28
Posts: 210

Re: The monumental #! LVM guide

This is a very nice guide, especially the backup thing. I have a question.

My partition table looks something like this:

GRUB is installed on the MBR
70 GB ntfs Windows 7
100 GB ntfs data
250 MB /boot
~250 GB extended partition containing
        1 encrypted lvm partition containing
                1 vg with root/swap/home pv's

If I decide to install a second linux distro in a new vg, will there be any problems, if it shares my current /boot partition, or should there be one /boot for each OS within the encrypted lvm partition?

Offline

#42 2012-11-17 10:25:42

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,644

Re: The monumental #! LVM guide

Shouldn't be a problem. Though I'd rather install Grub to the new distro's root, and chainload from the Debian Grub (it's a simple update-grub) to avoid any potential problems.

Offline

#43 2012-11-17 13:20:34

MrPink
#! CrunchBanger
From: .dk
Registered: 2011-06-28
Posts: 210

Re: The monumental #! LVM guide

I'm no sure I understand why I should install grub on the second distro's root. I have grub on the MBR, and I have a /boot outside the LVM, because I was told I had to, due to the encryption. This makes me a bit confused..

I think the easy way to do it is to install the second distro on a separate ext4 partition outside the lvm, but inside the extended partition.. That way, I can leave it as it is, and grub will be able to finde it. It would just be for hopping anyways..

Offline

#44 2012-11-17 14:12:18

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,644

Re: The monumental #! LVM guide

Ah, you mean encrypted. No idea about that one. It may be you need to have the distros share the boot partition in that case.

Offline

#45 2012-11-25 12:28:36

iMBeCil
#! Member
From: Zgb, Croatia
Registered: 2012-03-22
Posts: 78

Re: The monumental #! LVM guide

El_koraco, here I report yet another extremely satisfied 'customer' of your MONUMENTAL LVM guide. It is so clearly written that even I, iMBeCil, was able to get it in the first attempt.

I vote for 'sticky'!

BTW, LMV is not only handy, it is even FUN to play with: want to resize/enlarge? No problem: see this guide. Want the new partition? No problem: see this guide. Want to destroy your data? No problem: see this guide wink

(Just installed new Waldorf on 'production' laptop, ext4 / and /home, two large XFS for photo pictures and VBox HDD ...)


Postopone your duties; if you die, you won't have to do them ..

Offline

#46 2012-11-25 13:33:43

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,644

Re: The monumental #! LVM guide

Oho, ti si još i domaći.

Offline

#47 2012-11-25 16:02:14

iMBeCil
#! Member
From: Zgb, Croatia
Registered: 2012-03-22
Posts: 78

Re: The monumental #! LVM guide

^ Dakle, ako se sad nisam šlagir'o ... nikad se neću. big_smile big_smile big_smile

But, let's not be rude ... and let's not talk in langauge other don't understand ...  smile


Postopone your duties; if you die, you won't have to do them ..

Offline

#48 2012-11-30 06:02:23

tbritton
New Member
Registered: 2012-11-29
Posts: 2

Re: The monumental #! LVM guide

Using either the #! or the GRML live sessions from DVD or CD, upon attempting the restore process, it fails at the point of mounting.

mount /dev/debian/backup /mnt/restore

... giving me the error "mount: special device /dev/debian/backup does not exist".

How do I make it available? Using lvdisplay shows all the lvm partitions, but they are not shown as being "available".

Knoppix actually did not give me that error and mounted the lvm partitions, but it could not find the fsarchiver file to install, and I wasn't certain at all how to add a repository to its list. (Still feeling a little 'duh' in there...)

I succeeded in creating the backup after enlarging my backup volume to 6GB, but now am failing in the trial restoration step.

Everything else is working beautifully! Thanks for this excellent tutorial!

Terry


#! Lover

Offline

#49 2012-11-30 08:57:25

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,644

Re: The monumental #! LVM guide

There seems to be some kind of problem with the current version of Grml. I think the daily releases should work properly.

Offline

Help fund CrunchBang, donate to the project!

#50 2012-11-30 17:36:48

tbritton
New Member
Registered: 2012-11-29
Posts: 2

Re: The monumental #! LVM guide

I just tried a daily build and it didn't work yet.

Not sure how to add a repository to Knoppix so I can install fsarchiver, but I'll figure that out - seems it will be my best bet right now.

Terry


#! Lover

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo