LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 12-25-2010, 02:08 AM   #1
dtharmal
LQ Newbie
 
Registered: Dec 2010
Posts: 6

Rep: Reputation: 0
Possible to mount LV?


Alright, I'm a complete newbie when it comes to Linux. I've fooled around with some desktop distros before, but briefly. I set up a server a few months ago just as a first shot at this and it worked great, I had a full LAMP stack running, had vsftp running and everything was running smooth but I like poking so I poked in the wrong places and basically brought my setup to its knees and was forced to do a clean install. That being said, I'm a quick learner and am eager to learn more, but I've hid a roadblock as far as Google search help goes.

My goal: Give my old desktop new life as both a location for backing up with Time Machine, and a place to store, access (any maybe stream?) my files. (Streaming is obviously for media files, but I would like to be able to access it via FTP as well so I can just download the occasional file)

My setup: Pentium P4 3.2 GHz, 1GB RAM, 2 HDD (1x 160 GB, 1x 250GB)

My current issue: So I used the LVM to allocate 10GB of the 160GB HDD to actual install of Ubuntu Server 10.10, currently have a LAMP stack, OpenSSH, and Samba running.
I want to ideally use the rest of the 150 GB of the partition as the space for my Time Machine backups and the other HDD as my media storage. Here is my fdisk return:

Code:
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000382

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          32      248832   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              32       19458   156039169    5  Extended
/dev/sda5              32       19458   156039168   8e  Linux LVM

Disk /dev/sdb: 251.0 GB, 251000193024 bytes
179 heads, 63 sectors/track, 43472 cylinders
Units = cylinders of 11277 * 512 = 5773824 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       43473   245117344+  83  Linux

Disk /dev/dm-0: 9521 MB, 9521070080 bytes
255 heads, 63 sectors/track, 1157 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 473 MB, 473956352 bytes
255 heads, 63 sectors/track, 57 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-1 doesn't contain a valid partition table
When I try to mount the second part of the LVM as a physical volume, I'm getting an issue that I can't use lvcreate while the group is active. I'm not sure if this is possible or even a good idea to start off with. Any suggestion is welcome, please keep in mind that this is my first attempt at setting up a server where I'm not following a tutorial word for word so I am oblivious to the obvious.
 
Old 12-25-2010, 02:37 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Please give more detail on "So I used the LVM to allocate 10GB of the 160GB HDD to actual install of Ubuntu Server 10.10". What is the output of lvdisplay?
 
Old 12-25-2010, 10:54 AM   #3
dtharmal
LQ Newbie
 
Registered: Dec 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by catkin View Post
Please give more detail on "So I used the LVM to allocate 10GB of the 160GB HDD to actual install of Ubuntu Server 10.10". What is the output of lvdisplay?
Sorry - here it is:

Code:
  --- Logical volume ---
  LV Name                /dev/799cfb/root
  VG Name                799cfb
  LV UUID                NC5Mj4-pxdx-EOES-VgdW-F2ga-PCl8-CuF6QY
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                8.87 GiB
  Current LE             2270
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           251:0
   
  --- Logical volume ---
  LV Name                /dev/799cfb/swap_1
  VG Name                799cfb
  LV UUID                asHll1-06UN-Qk0d-KBLy-2JEj-EpF7-sbtWvJ
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                452.00 MiB
  Current LE             113
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           251:1
 
Old 12-25-2010, 11:22 AM   #4
dtharmal
LQ Newbie
 
Registered: Dec 2010
Posts: 6

Original Poster
Rep: Reputation: 0
So I did some more digging around and turns out I was just using the lvcreate command wrong (might have been the lack of sleep :S, who knows?) Anywho, I tried it this morning with the following:


Code:
sudo lvcreate -l 100%FREE -n timemachine 799cfb
(I was basically trying to allocate the remaining size of the PV to an LV to backup my time machine to). Now my lvdisplay returns:

Code:
  --- Logical volume ---
  LV Name                /dev/799cfb/root
  VG Name                799cfb
  LV UUID                NC5Mj4-pxdx-EOES-VgdW-F2ga-PCl8-CuF6QY
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                8.87 GiB
  Current LE             2270
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           251:0
   
  --- Logical volume ---
  LV Name                /dev/799cfb/swap_1
  VG Name                799cfb
  LV UUID                asHll1-06UN-Qk0d-KBLy-2JEj-EpF7-sbtWvJ
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                452.00 MiB
  Current LE             113
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           251:1
   
  --- Logical volume ---
  LV Name                /dev/799cfb/timemachine
  VG Name                799cfb
  LV UUID                kV13J1-t9X8-qVU2-01Ch-Vrk8-BQQ3-gw3RLn
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                139.50 GiB
  Current LE             35712
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           251:2
 
Old 12-25-2010, 11:27 AM   #5
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
So you've got the LVs OK. I don't understand the two fdisk output lines like "Disk /dev/dm-0 doesn't contain a valid partition table" and how it might relate to LVs. Somehow Ubuntu always manages to make things more complicated that I think they should be!
 
Old 12-25-2010, 11:31 AM   #6
dtharmal
LQ Newbie
 
Registered: Dec 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by catkin View Post
So you've got the LVs OK. I don't understand the two fdisk output lines like "Disk /dev/dm-0 doesn't contain a valid partition table" and how it might relate to LVs. Somehow Ubuntu always manages to make things more complicated that I think they should be!
Yeah, I have no clue what they might be to be honest. I'm hoping it goes away once I format & partition the second hard drive. But I do agree with you, Ubuntu does makes things extremely complicated but I hear its one of the easiest distros for a beginner to use especially when setting up a home server. Got any other suggestions? I'm pretty much still at the set up stage so I'm willing to start from scratch if it will make life easier.

Last edited by dtharmal; 12-25-2010 at 11:44 AM.
 
Old 12-25-2010, 11:45 AM   #7
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Having set up the LVs the next step is to format them with a file system. The question is "which devices are they"? What's the output of lvscan?
 
Old 12-25-2010, 11:48 AM   #8
dtharmal
LQ Newbie
 
Registered: Dec 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by catkin View Post
Having set up the LVs the next step is to format them with a file system. The question is "which devices are they"? What's the output of lvscan?
Code:
 ACTIVE            '/dev/799cfb/root' [8.87 GiB] inherit
  ACTIVE            '/dev/799cfb/swap_1' [452.00 MiB] inherit
  ACTIVE            '/dev/799cfb/timemachine' [139.50 GiB] inherit
Seems like what I want it to be right? (Ignoring the second drive which I haven't partitioned yet)
 
Old 12-25-2010, 01:17 PM   #9
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
LVs don't need partitioning -- they are in effect a single partition.

The swap partition does not need any further preparation (well -- I've never done so) -- it only needs adding to /etc/fstab as a swap partition, something like
Code:
/dev/799cfb/swap_1       swap           swap   defaults                   0 0
The timemachine you need to create file systems on with something like
Code:
mkfs.ext4 /dev/799cfb/timemachine
depending on which file system you want to use.

Is the /dev/799cfb/root LV already in use? df -hT would show.

All this with the caveat that I'm writing from ordinary Linux experience so it might fall foul of Ubuntu-isms.
 
Old 12-25-2010, 03:16 PM   #10
dtharmal
LQ Newbie
 
Registered: Dec 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks a lot for the help! I have it set up perfectly now (after a lot of struggles..but most of it was setting up with AFP and whatnot)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
manual mount cifs works but srcipt mount cifs has mount error (13): Permission denied CADIT Linux - Newbie 6 11-20-2009 03:48 PM
NFS mount of smb mount of windows share: permission denied problem :( Bagatur Linux - Networking 4 07-07-2009 12:34 PM


All times are GMT -5. The time now is 08:11 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration