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 02-03-2015, 06:39 AM   #1
geekslinux
Member
 
Registered: Jun 2013
Posts: 63

Rep: Reputation: Disabled
LVM related query


I have added a new 278GB disk in my server. In fdisk I have created 278GB partition as /dev/sdb1. I did pvcreate and added the disk then created a volume group then created logical volume lv_dbfs, then formatted with mkfs.ext4.
Now I am adding another disk and it is /dev/sdc1, Do i need to format the disk with mkfs.ext4 before extending the volume group or is it not required to format the drive and simply be added to volume group and extending logical volume. I cannot format the drive after extending logical volume. Any help in this will be highly appreciated. Thanks in advance.
 
Old 02-03-2015, 06:55 AM   #2
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
You initialize sdc1 with pvcreate. Add it to Volume Group. Then extend logical volume then resize the ext4 fs with resize2fs to use all space.
 
Old 02-03-2015, 07:12 AM   #3
geekslinux
Member
 
Registered: Jun 2013
Posts: 63

Original Poster
Rep: Reputation: Disabled
Precisely to say I have to do these steps
vgextend vg_ora /dev/sdc1
lvextend -L +277G /dev/mapper/vg_ora-lv_dbfs
resize2fs /dev/mapper/vg_ora-lv_dbfs

As the first disk is formatted with ext4,by extending the LV and using resize2fs will be sufficient so there is no need to format as all the remaining space will be in the format ext4 by default. Am I getting it correct? Thanks for the reply
 
Old 02-03-2015, 10:24 PM   #4
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
You missed first step of pvcreate with sdc1.
 
Old 02-04-2015, 10:02 AM   #5
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by veerain View Post
You missed first step of pvcreate with sdc1.
Not necessary unless some non-default PV options are needed. From the vgextend manpage:
"If PhysicalDevicePath was not previously configured for LVM with pvcreate(8), the device will be initialized with the same default values used with pvcreate(8)."
 
  


Reply

Tags
lvm



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
Kthread related query amitk.gupta09 Linux - Software 0 04-02-2012 11:20 PM
An Apache related query saagar Linux - Newbie 1 03-25-2011 02:23 AM
Xterm related query mr.blacklisted Linux - Server 1 11-17-2010 09:36 AM
Query related to syslog? your_shadow03 Linux - Newbie 5 05-15-2009 10:32 AM
A Query related to Git? your_shadow03 Linux - Newbie 10 04-23-2009 11:35 PM

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

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