LinuxQuestions.org
Review your favorite Linux distribution.
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 01-29-2015, 11:53 AM   #1
Timmac
LQ Newbie
 
Registered: Jan 2015
Posts: 3

Rep: Reputation: Disabled
Virtual CentOS 6.4 Server Expand Disk for Splunk Instance


As I'm sure there are other posts for this, I'm terrified to mess with disks in Linux as I'm very green. I've looked at one other post which suggests to run the following so I'm going to do the same. The drive provisioned originally had 400 gb, but currently has 500 gb allocated in vmware. Thanks so much in advance!

Code:
fdisk -l
pvs
vgs
lvs
df -h

Code:
[root@uspk10splunk ~]# fdisk -l

Disk /dev/sda: 8589 MB, 8589934592 bytes
64 heads, 32 sectors/track, 8192 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c255c

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           2         501      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2             502        8192     7875584   8e  Linux LVM
Partition 2 does not end on cylinder boundary.

Disk /dev/sdb: 536.9 GB, 536870912000 bytes
255 heads, 63 sectors/track, 65270 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: 0x69437664

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       52216   419424988+  8e  Linux LVM

Disk /dev/mapper/vg_uspk10vsp03-lv_root: 3833 MB, 3833593856 bytes
255 heads, 63 sectors/track, 466 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/mapper/vg_uspk10vsp03-lv_swap: 4227 MB, 4227858432 bytes
255 heads, 63 sectors/track, 514 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/mapper/vg_opt-lv_opt: 429.5 GB, 429488340992 bytes
255 heads, 63 sectors/track, 52215 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
Code:
[root@uspk10splunk ~]# pvs
  PV         VG             Fmt  Attr PSize   PFree
  /dev/sda2  vg_uspk10vsp03 lvm2 a--    7.51g    0
  /dev/sdb1  vg_opt         lvm2 a--  399.99g    0
Code:
[root@uspk10splunk ~]# vgs
  VG             #PV #LV #SN Attr   VSize   VFree
  vg_opt           1   1   0 wz--n- 399.99g    0
  vg_uspk10vsp03   1   2   0 wz--n-   7.51g    0
Code:
[root@uspk10splunk ~]# lvs
  LV      VG             Attr      LSize   Pool Origin Data%  Move Log Cpy%Sync                     Convert
  lv_opt  vg_opt         -wi-ao--- 399.99g                                                          
  lv_root vg_uspk10vsp03 -wi-ao---   3.57g                                                          
  lv_swap vg_uspk10vsp03 -wi-ao---   3.94g
Code:
[root@uspk10splunk ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_uspk10vsp03-lv_root
                      3.6G  1.5G  1.9G  45% /
tmpfs                 1.9G     0  1.9G   0% /dev/shm
/dev/mapper/vg_opt-lv_opt
                      394G  374G  422M 100% /opt
/dev/sda1             485M   32M  428M   7% /boot
 
Old 01-29-2015, 11:58 AM   #2
Habitual
LQ Addict
 
Registered: Jan 2011
Posts: 7,674
Blog Entries: 10

Rep: Reputation: 2077Reputation: 2077Reputation: 2077Reputation: 2077Reputation: 2077Reputation: 2077Reputation: 2077Reputation: 2077Reputation: 2077Reputation: 2077Reputation: 2077
Welcome to LQ!

Is there a question?
 
Old 01-29-2015, 12:00 PM   #3
Timmac
LQ Newbie
 
Registered: Jan 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
Oh I'm sorry, I'm not quite sure how to actually do the expansion from this point. All I pretty much know is the allocation portion from the VMware side.
 
Old 01-29-2015, 12:44 PM   #4
sudowtf
Member
 
Registered: Nov 2013
Posts: 187

Rep: Reputation: 45
yes, it's very scary but i've done it once without issue.
http://www.rootusers.com/how-to-incr...-machine-disk/ (notice he links another lvm method before the content)
best if luck, make backups or snapshot based backups (i like trilead.com free verson)
 
1 members found this post helpful.
Old 01-29-2015, 02:58 PM   #5
Timmac
LQ Newbie
 
Registered: Jan 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thanks for the help. I've also found this article which is very helpful from the VMware side, in case anyone searches and stumbles on this later.

http://kb.vmware.com/selfservice/mic...rnalId=1006371

Sometimes Windows makes things like this way easier

Right click, extend, enter all the way... done

Last edited by Timmac; 01-29-2015 at 02:59 PM.
 
Old 01-29-2015, 03:23 PM   #6
sudowtf
Member
 
Registered: Nov 2013
Posts: 187

Rep: Reputation: 45
yes, basically exact same instructions in your link. fyi, a plain ext4 would be just as simple as the windows (use gparted to do the same drag-and-drop expansion).
 
  


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
cannot detect additional virtual disk on centos pedenski Linux - Newbie 1 05-22-2013 04:21 PM
how to easily expand a virtual disk pedenski Linux - Newbie 3 05-15-2013 09:27 PM
[SOLVED] Expand disk size on centos VM? jbennett Linux - Newbie 37 07-17-2012 12:43 PM
Extend Disk of a virtual CentOS Server Steve_Aug Linux - General 3 01-12-2012 01:53 PM


All times are GMT -5. The time now is 01:43 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration