LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-07-2010, 03:11 PM   #1
prollocks
LQ Newbie
 
Registered: May 2006
Distribution: Arch 64
Posts: 27

Rep: Reputation: 0
Question Splitting LVM partition and then mounting


Hi all,

I need to split a logical volume ( only have /boot and lvm partitions on drive)

This new logical volume needs to take up most of the existing space.

I'm just wondering about the sequence of steps to take before I do this.

How do I resize the new/old LVM partitions - and would I need to re-size the underlying fs?

Cheers
 
Old 04-07-2010, 09:03 PM   #2
mweed
Member
 
Registered: Mar 2006
Posts: 33

Rep: Reputation: 17
Not sure what you mean by split, but it sounds like you need to resize the existing LVs and then create a new LV?

become familiar with lvresize, lvcreate, vgdisplay and lvdisplay. Additionally you may need to use fsck and resize2fs (or other filesystem resizing tool)

lvresize will resize the filesystem when resizing the LV by using the -r flag. But it only works under optimal conditions. You will likely need to fsck before resizing.

It is possible to live grow a ext2/3 fs, but not shrink. You can grow and shrink offline.
 
Old 04-08-2010, 05:06 AM   #3
prollocks
LQ Newbie
 
Registered: May 2006
Distribution: Arch 64
Posts: 27

Original Poster
Rep: Reputation: 0
There is only one LV taking up all the space - would the vgsplit command not be applicable here?
 
Old 04-08-2010, 06:13 AM   #4
prollocks
LQ Newbie
 
Registered: May 2006
Distribution: Arch 64
Posts: 27

Original Poster
Rep: Reputation: 0
OK looking further into this and you are correct -

I am trying to reclaim space from an existing Logical Volume,

this appears to be a bog standard RH ES install BUT the / is on the LogVol00

How on earth can I resize this (I'm reading I need to unmount Logical volumes and run file-system checks before resizing)??
 
Old 04-08-2010, 06:22 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
You've not explained your setup at all. I'll assume one pv, one vg, and one lv.
Get a liveCD or install CD and work from the inside out - shrink the filesystem, then the lv, then the vg if needed. IMHO LVM was designed to add space easily, and shrinking was conveniently ignored. Tools have subsequently been added, but it's all too complicated. I think this is why btrfs will take over - all the tools (will) exist in the filesystem, not yet another psuedo block layer.
 
  


Reply



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
Splitting a mirror with LVM jcaplette Linux - Server 1 03-09-2010 03:14 AM
Splitting partition - need help skn Linux - Newbie 4 08-17-2009 06:25 PM
Mounting an LVM on partition hrishikesh_am Linux - General 1 03-12-2007 11:54 AM
Problems mounting LVM-partition RacerDude Fedora 1 11-22-2005 11:04 AM
Help! Splitting 1 large partition into 3! sh1ft Linux - Hardware 2 06-30-2004 09:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:22 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