LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 04-24-2016, 04:01 AM   #1
and1_hotsauce
LQ Newbie
 
Registered: Feb 2012
Posts: 7

Rep: Reputation: Disabled
studying for rhcsa - help with logical volume theory and extending lv size required


Hi all,
When I try to resize my partition, I keep getting the following:
Code:
open: Is a directory while opening /mnt/mymount/
These are my steps:
Code:
   1  pvcreate /dev/xvdf1
   2  vgcreate battlestar /dev/xvdf1
   3 lvcreate -L 192M -n galactica battlestar
   4  mkdir /mnt/mymount
   5  mount /dev/battlestar/galactica /mnt/mymount
   6  mkfs.ext4 /dev/battlestar/galactica
   7  mount /dev/battlestar/galactica /mnt/mymount
   8  lvextend -L +60 /dev/battlestar/galactica
   9  resize2fs /mnt/mymount/
   10 resize2fs /dev/mapper/battlestar-galactica
line 9 does not work but line 10 does. Why?
Why doesn't the size of mymount increase after line 8? Why do I need to type resize2fs


Also, could someone please verify my understanding of pv,lg,lv (diagram is found here: http://imgur.com/qVtTcrE)

At first, I partitioned xvdf (1GB).
Next, I created a physical volume, and then a volume group. This volume group may have multiple physical volumes, but at the moment, we only have 1(xvdf1). After that, I created a logical volume, essentially, carving out 200MB of memory from PV.

Once the LV is created, this "storage device" needs a filesystem. I used the mkfs.ext4 command to do this. Once this was created, I now need to mount this storage device using the mount command.
 
Old 04-24-2016, 04:54 AM   #2
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,627

Rep: Reputation: 471Reputation: 471Reputation: 471Reputation: 471Reputation: 471
Quote:
line 9 does not work but line 10 does. Why?
Because you don't resize a mount point. You may resize a file system in a partition.

You may extend the size of a logical volume too, but this you cannot resize a mount point because mount point is merely a pointer, node or a file.

Read the manual:
Code:
man resize2fs
man lvextend
Hope that helps.

m.m.
 
1 members found this post helpful.
Old 04-24-2016, 08:04 AM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 8,148
Blog Entries: 4

Rep: Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716
Be sure that you clearly understand the intent and purpose of "logical volumes." The concept is simply to extend what Linux sees as "a single [logical ...] volume" across multiple "physical" storage devices, with the ability to change the physical volume layout ... as it were ... "right under Linux's nose."

For instance, when a drive begins to make ominous clicking noises . . .

Some things don't change: the volume, be it an LVM or a single drive, is still "mounted" at some location in the filesystem, and that mount-point is still represented by a directory.
 
1 members found this post helpful.
  


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
[SOLVED] How to increase logical volume to match physical volume, after increasing size of virtualbox virtual drive mjl3434 Linux - General 4 02-10-2016 08:29 AM
Need assistence in logical volume extending. cj_cheema Linux - Server 2 07-04-2009 12:10 AM
Extending logical volume LogVol01 Insufficient allocatable logical exte swap space umeshsharma Linux - Newbie 4 06-22-2009 12:26 PM
Extending a logical volume in a reconfigured RAID 5 array set cswebb Linux - Hardware 3 12-19-2008 02:16 AM
LVM - Extending logical volume - Insufficient free space deim Linux - Newbie 0 04-07-2007 09:47 PM


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