How to mount disk on centos 6.4 KVM server

0

I have Centos 6.4 on KVM server already up running with couple of sites, now i am almost run out with space so i decide buy from the server provider more gb in order to increase the HDD. I contact the server provider and they told me I have to mount it by myself but to be honest even if I google around it doesn't seems to be really clear what I have to do ...or to better say what is the best and easy way to do it . From the server provider there is a guide on the website , but I think it doesn't apply in my case , I start to follow the guideline but from the first command seems not matching the result , this is what I did : From server provider example : fdisk -ul /dev/vdb outcome should be info about if Disk is extended From my sever : fdisk -ul /dev/vdb outcome is blank no data

SO at this point I did df -l and output is :

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/vg_SERVER-lv_root 16070076 4696580 10557164 31% / tmpfs 961212 0 961212 0% /dev/shm /dev/vda1 495844 73767 396477 16% /boot

After I did fdisk -l and the output is :

Disk /dev/vda: 214.7 GB, 214748364800 bytes
16 heads, 63 sectors/track, 416101 cylinders Units = cylinders of 1008 * 512 = 516096 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000a608e

Device Boot Start End Blocks Id System /dev/vda1 * 3 1018 512000 83 Linux Partition 1 does not end on cylinder boundary. /dev/vda2 1018 41611 20458496 8e Linux LVM Partition 2 does not end on cylinder boundary.

Disk /dev/mapper/vg_SERVER-lv_root: 16.7 GB, 16718495744 bytes 255 heads, 63 sectors/track, 2032 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_SERVER-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

Ok so the command should be fdisk -ul /dev/vda and the outcome is :

 Disk /dev/vda: 214.7 GB, 214748364800 bytes
    16 heads, 63 sectors/track, 416101 cylinders, total 419430400 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: 0x000a608e

    Device Boot Start End Blocks Id System /dev/vda1 * 2048 1026047 512000 83 Linux Partition 1 does not end on cylinder boundary. /dev/vda2 1026048 41943039 20458496 8e Linux LVM Partition 2 does not end on cylinder boundary.

Now at this point I am bit confuse , now what will be the easiest way how should I proceed?

Ty


Hi GioMac ty for your help , please find below the output of the requested .

Output moved to Pastebin on account of excessive length

Before to post the request on the serverfault , I contact the server provider and they point me to this guide ( http://guide.onamae-server.com/vpskvm/1_15_16_81_1/) as the server is KVM they don't give support so they couldn't tell me more about it .

 lsblk
NAME                              MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0                                11:0    1 1024M  0 rom
vda                               252:0    0  200G  0 disk
ââvda1                            252:1    0  500M  0 part /boot
ââvda2                            252:2    0 19.5G  0 part
  ââvg_v1577145116-lv_root (dm-0) 253:0    0 15.6G  0 lvm  /
  ââvg_v1577145116-lv_swap (dm-1) 253:1    0    4G  0 lvm  [SWAP]

 partprobe
Warning: WARNING: the kernel failed to re-read the partition table on /dev/vda (              Device or resource busy).  As a result, it may not reflect all of your changes u              ntil after reboot.
linux
centos
vps
kvm-virtualization
asked on Server Fault Sep 2, 2013 by user2482756 • edited Sep 4, 2013 by user2482756

2 Answers

0

I don't see that filesystem is full. But OK.

Good news is that you are using LVM, so, you can easily expand and move anything.

There are two ways to expand your space:

A. Provided expanded vda

You must expand LVM physical volume, volume group, add it to the logical volume and then expand linux filesystem

B. Provider attached new disk, (like vdb)

You must create LVM pv, add it to the vg, add space to the lv and then expand linux filesystem

Both can be done on the live system.

If you have graphical server running, you can do it system-config-lvm GUI.

For complete answer, please provide more details like:

partprobe
df -h
fdisk -l
dmesg
pvs
vgs
lvs
mount

and tell from which OS you connect to the server.

answered on Server Fault Sep 3, 2013 by GioMac • edited Sep 3, 2013 by GioMac
-1

I didn't noticed the filesystems of the new partition. You sholud use "mount" command. Please check the documentation related to this command [1]. Mount command will mount the partition, but it won't be permanent. On the next boot you will need to mount it again. To make it permanent you should edit the /etc/fstab file. Please refer to [2] to learn how to mount partitions in a permanent way.

Regards

[1] http://linux.die.net/man/8/mount
[2] http://linuxexpresso.wordpress.com/2010/03/14/mount-partitions-in-terminal-fstab/


User contributions licensed under CC BY-SA 3.0