LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (http://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   need a bit of help with lvm (http://www.linuxquestions.org/questions/linux-desktop-74/need-a-bit-of-help-with-lvm-4175442817/)

thelastblack 12-24-2012 03:59 PM

need a bit of help with lvm
 
i have ubuntu 12.10 and i am using an ext4 partition for /boot and 2 lvms for /home and / .
i wanted to install elementary os, but the problem is it doesnt have lvm support in installation.
and help is needed here. i searched a bit but i couldnt find anything useful (or at least i thought like that).
can i just convert my lvms to ext4? or i have to get lvm working under live session of elementary os?
thx in advance

syg00 12-24-2012 08:18 PM

Quote:

Originally Posted by thelastblack (Post 4856243)
can i just convert my lvms to ext4?

Nope - not in-place. You would need to back up everything (always a good idea anyway) and delete reallocate. Not for the faint-hearted.
Quote:

or i have to get lvm working under live session of elementary os?
Probably wouldn't help, merely add to the confusion. The installer will need to reboot, and the LVM support must be available early.
The LVM components (pv,vg,lv) as well as the filesystems themselves can be resized (smaller), but it isn't straightforward, and needs to be done in the correct order. Hopefully Ubuntu has a GUI that'll help - I've never used LVM on Ubuntu, so can't say for sure. If you can do that and free some space on the disk you should (might) be o.k. to install the other distro. Let's see the output of the following (use sudo)
Code:

fdisk -l
df -hT
pvdisplay


syg00 12-24-2012 10:05 PM

A quick google suggests system-config-lvm should be available via apt. Works well in RH/Fedora from whence it came.

thelastblack 12-25-2012 03:51 AM

here is what i did:
i installed lvm2 package in live session and used this command:
Code:

vgchange -a y
this way, my lvm partitions were correctly detected by installer, and i installed my linux.
i have a 500mb ext4 (not in lvm) for /boot and 2 lvms for /home and /.
but system does not boot. it says timeout waiting for root partition and just drops to a shell (probably grub, it is initframs or something like that)
i have read somewhere i have to chroot into my installation and install lvm2 and cryptsetup, then add crypdevice in kernel parameter.
i did above things but still the same issue.
i will try system-config-lvm and say results, asa i get to my computer.
thx for reply

thelastblack 12-25-2012 11:09 AM

here are the outputs:
Code:

# fdisk -l


Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x7a3cfdca

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *        2048    1026047      512000  83  Linux
/dev/sda2        1026048  488396799  243685376  8e  Linux LVM

next
Code:

#df -hT

Filesystem    Type      Size  Used Avail Use% Mounted on
/cow          overlayfs 1003M  63M  941M  7% /
udev          devtmpfs  993M  4.0K  993M  1% /dev
tmpfs          tmpfs      401M  836K  401M  1% /run
/dev/sdb      iso9660    621M  621M    0 100% /cdrom
/dev/loop0    squashfs  593M  593M    0 100% /rofs
tmpfs          tmpfs    1003M  24K 1003M  1% /tmp
none          tmpfs      5.0M    0  5.0M  0% /run/lock
none          tmpfs    1003M  76K 1003M  1% /run/shm

next
Code:

#pvdisplay

  --- Physical volume ---
  PV Name              /dev/sda2
  VG Name              vg_vahidjoon
  PV Size              232.40 GiB / not usable 22.00 MiB
  Allocatable          yes (but full)
  PE Size              32.00 MiB
  Total PE              7436
  Free PE              0
  Allocated PE          7436
  PV UUID              5tc0FU-iDi9-Q0X1-25Tk-mzBr-D16I-rRGBw8

and i installed system-config-lvm, what should i do with it? it has a gui which shows me my lvm partitions.

---------- Post added 12-25-12 at 11:09 AM ----------

here are the outputs:
Code:

# fdisk -l


Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x7a3cfdca

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *        2048    1026047      512000  83  Linux
/dev/sda2        1026048  488396799  243685376  8e  Linux LVM

next
Code:

#df -hT

Filesystem    Type      Size  Used Avail Use% Mounted on
/cow          overlayfs 1003M  63M  941M  7% /
udev          devtmpfs  993M  4.0K  993M  1% /dev
tmpfs          tmpfs      401M  836K  401M  1% /run
/dev/sdb      iso9660    621M  621M    0 100% /cdrom
/dev/loop0    squashfs  593M  593M    0 100% /rofs
tmpfs          tmpfs    1003M  24K 1003M  1% /tmp
none          tmpfs      5.0M    0  5.0M  0% /run/lock
none          tmpfs    1003M  76K 1003M  1% /run/shm

next
Code:

#pvdisplay

  --- Physical volume ---
  PV Name              /dev/sda2
  VG Name              vg_vahidjoon
  PV Size              232.40 GiB / not usable 22.00 MiB
  Allocatable          yes (but full)
  PE Size              32.00 MiB
  Total PE              7436
  Free PE              0
  Allocated PE          7436
  PV UUID              5tc0FU-iDi9-Q0X1-25Tk-mzBr-D16I-rRGBw8

and i installed system-config-lvm, what should i do with it? it has a gui which shows me my lvm partitions.

thelastblack 12-25-2012 11:35 AM

problem solved by my hands! good...
i had to change a line in grub.cfg
the line was
Code:

set root='(hd0,msdos1)'
and i changed it to
Code:

set root='vg_vahidjoon-lv_root'
and i am good.


All times are GMT -5. The time now is 07:50 PM.