LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-28-2009, 07:16 AM   #1
simplified
Member
 
Registered: May 2007
Location: London, UK
Distribution: Kubuntu 9.04 x64 / Ubuntu Server 9.04 x64
Posts: 50

Rep: Reputation: 15
Mounting a newly created LVM Group


Hi All

I've been banging my head against the wall with this one...

I've recently rebuilt my server with three HDD's, 1x250GB and 2x1TB drives. What I'm trying to achieve is to have /boot, swap, /var and / mounted on the first drive (no problems there) and then have /home mounted on an LVM of the two 1TB drives, giving me a 2TB /home directory. Herein lies the problem...

I've created a LVM group via system-config-lvm and it all looks good. I've given it the name "DSLVM01" and I can see it through the system-config-lvm GUI no problem at all.

I then run "# fdisk -l" which looks good, here's the output:

Code:
Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000af342

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          24      192748+  83  Linux
/dev/sda2           29916       30401     3903795   82  Linux swap / Solaris
/dev/sda3           17758       29915    97659135   83  Linux
/dev/sda4              25       17757   142440322+   5  Extended
/dev/sda5              25       17757   142440291   83  Linux

Partition table entries are not in disk order

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00088ea9

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      121601   976760001   8e  Linux LVM

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000632cb

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1      121601   976760001   8e  Linux LVM
...so I can see that my LVM is created. Now, when I run '# pvs' I get this output:

Code:
  PV         VG      Fmt  Attr PSize   PFree
  /dev/sdb1  DSLVM01 lvm2 a-   931.51G 931.51G
  /dev/sdc1  DSLVM01 lvm2 a-   931.51G 931.51G
Great! I can see my volume group DSLVM01! Now (according to the instructions I've found on the web) I can mount the LVM using the command:

Code:
# mount /dev/DSLVM01 /home
... and here's the problem. I can't seem to find any reference to DSLVM01 at all. So I thought I'd search the filesystem, so I tried:

Code:
# find / -name DSLVM01
/etc/lvm/backup/DSLVM01
#
Now looking in the file /etc/lvm/backup/DSLVM01 in vi I get the following:

Code:
# Generated by LVM2 version 2.02.39 (2008-06-27): Tue Jul 28 13:02:14 2009

contents = "Text Format Volume Group"
version = 1

description = "Created *after* executing '/sbin/vgextend DSLVM01 /dev/sdc1'"

creation_host = "dunzserver01"  # Linux dunzserver01 2.6.28-13-server #45-Ubuntu SMP Tue Jun 30 22:56:18 UTC 2009 x86_64
creation_time = 1248782534      # Tue Jul 28 13:02:14 2009

DSLVM01 {
        id = "UNT7xX-SHMe-KpBQ-M6NA-H1o1-u6Kg-v0hovo"
        seqno = 2
        status = ["RESIZEABLE", "READ", "WRITE"]
        extent_size = 8192              # 4 Megabytes
        max_lv = 256
        max_pv = 256

        physical_volumes {

                pv0 {
                        id = "nNbbs8-9pxH-5WTm-7A9N-6HlS-GRNH-6SejoR"
                        device = "/dev/sdb1"    # Hint only

                        status = ["ALLOCATABLE"]
                        dev_size = 1953520002   # 931.511 Gigabytes
                        pe_start = 384
                        pe_count = 238466       # 931.508 Gigabytes
                }

                pv1 {
                        id = "rq6Lci-49KZ-i76E-zdsA-6l0J-PbaL-2AO7fq"
                        device = "/dev/sdc1"    # Hint only

                        status = ["ALLOCATABLE"]
                        dev_size = 1953520002   # 931.511 Gigabytes
                        pe_start = 384
                        pe_count = 238466       # 931.508 Gigabytes
                }
        }

}
...but there are no other references to DSLVM01. Can anyone point me in the right direction please?

TIA, Simplified
 
Old 07-28-2009, 07:25 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Hello simplified

You need to create a logical volume and then a file system on the LVM volume before you can mount it.

See lvcreate and mkfs.ext3 (assuming you do want ext3).

Good guides: http://tldp.org/HOWTO/LVM-HOWTO/ and http://dev.riseup.net/grimoire/storage/lvm2/. Physical volumes added to volume group out of which make logical volumes and then make file systems in the logical volumes.

Best

Charles
 
Old 07-28-2009, 07:29 AM   #3
simplified
Member
 
Registered: May 2007
Location: London, UK
Distribution: Kubuntu 9.04 x64 / Ubuntu Server 9.04 x64
Posts: 50

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by catkin View Post
Hello simplified

You need to create a logical volume and then a file system on the LVM volume before you can mount it.

See lvcreate and mkfs.ext3 (assuming you do want ext3).

Good guides: http://tldp.org/HOWTO/LVM-HOWTO/ and http://dev.riseup.net/grimoire/storage/lvm2/. Physical volumes added to volume group out of which make logical volumes and then make file systems in the logical volumes.

Best

Charles
Hey Charles - Thanks, I'll check that one out and let you know how I get on. I appreciate the help!
 
Old 07-28-2009, 10:04 AM   #4
simplified
Member
 
Registered: May 2007
Location: London, UK
Distribution: Kubuntu 9.04 x64 / Ubuntu Server 9.04 x64
Posts: 50

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by catkin View Post
Hello simplified

You need to create a logical volume and then a file system on the LVM volume before you can mount it.

See lvcreate and mkfs.ext3 (assuming you do want ext3).

Good guides: http://tldp.org/HOWTO/LVM-HOWTO/ and http://dev.riseup.net/grimoire/storage/lvm2/. Physical volumes added to volume group out of which make logical volumes and then make file systems in the logical volumes.

Best

Charles
Hi Charles

I just wanted to say *big* thanks! Although I ended up doing all of this via the shell I did find that this was possible via system-config-lvm once you understood the terminology, so reading the howto on tldp was a *great* help!

Cheers buddy! I only wish I could return the favour
 
Old 07-28-2009, 10:21 AM   #5
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

Rep: Reputation: 135Reputation: 135
After creating physical volumes you should create volume groups and then create the logical volumes then format with any filesystem(ext2,ext3,vfat) and then only u can mount it to /home mount point after which it'll work properly..

Last edited by divyashree; 07-28-2009 at 10:25 AM.
 
Old 07-28-2009, 10:39 AM   #6
simplified
Member
 
Registered: May 2007
Location: London, UK
Distribution: Kubuntu 9.04 x64 / Ubuntu Server 9.04 x64
Posts: 50

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by divyashree View Post
After creating physical volumes you should create volume groups and then create the logical volumes then format with any filesystem(ext2,ext3,vfat) and then only u can mount it to /home mount point after which it'll work properly..
Yep! Done that, all working, thanks!
 
  


Reply

Tags
drive, hard, harddrive, hdd, lvm, lvm2, mount



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
lvm2 Newly created Volume Group lost after reboot seanikins Linux - Newbie 5 04-11-2010 12:55 PM
Group write access for newly created files/directories without changing umask fhd Linux - Security 3 04-05-2009 05:28 AM
ID created with assigned group is not display in /etc/group file dwarf007 Linux - Security 2 08-21-2007 10:39 PM
Trying to Add Users to Newly Created Group (Red Hat version) Linux_Enabled Red Hat 1 07-31-2007 10:13 PM
trouble mounting a newly created partition tauceti38 Linux - Hardware 6 03-16-2005 03:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration