Add space disk with hardware raid controller

mangeli

Renowned Member
May 2, 2013
5
0
66
Trento, Italy
Hello, i'm a newbie and I have a problem


I install proxmox VE 2.2 in my house server.
My hardware is:
CPU:Intel Xeon E5335 2.0Ghz


RAM: 4 GB (4 x 1gb)


Mainboard: Intel S5000PSL


controller raid:Intel(R) - controller RAID SROMBSAS18E


3 HD WD red 2TB in raid 5 (bay 0, 1, e 2)


so I have 3.5 TB space in sda disk


I add a new disk (WD red 2TB) and I expand my raid by hardware controller raid


now I have:
command: dmesg | grep "[h,s]d[a,b]" | grep " logical blocks: "
output: sd 2:2:0:0: [sda] 11712884736 512-byte logical blocks: (5.99 TB/5.45 TiB)




now I want expand my space in proxmox from 3.5TB to 5.45TB or 5.99TB but I don't understand how i can do it


This is the information that I have:


command: df -a -h -T
output:
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/pve-root
ext3 95G 777M 89G 1% /
tmpfs tmpfs 2.0G 0 2.0G 0% /lib/init/rw
proc proc 0 0 0 - /proc
sysfs sysfs 0 0 0 - /sys
udev tmpfs 2.0G 252K 2.0G 1% /dev
tmpfs tmpfs 2.0G 16M 2.0G 1% /dev/shm
devpts devpts 0 0 0 - /dev/pts
/dev/mapper/pve-data
ext3 3.5T 12G 3.5T 1% /var/lib/vz
/dev/sda2 ext3 494M 35M 435M 8% /boot
fusectl fusectl 0 0 0 - /sys/fs/fuse/connections
/dev/fuse fuse 30M 16K 30M 1% /etc/pve
beancounter cgroup 0 0 0 - /proc/vz/beancounter
container cgroup 0 0 0 - /proc/vz/container
fairsched cgroup 0 0 0 - /proc/vz/fairsched


I want expand:
/dev/mapper/pve-data ext3 3.5T 12G 3.5T 1% /var/lib/vz


Command: fdisk -l
output:
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sda: 5997.0 GB, 5996996984832 bytes
255 heads, 63 sectors/track, 729093 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
Device Boot Start End Blocks Id System
/dev/sda1 1 267350 2147483647+ ee GPT


Disk /dev/dm-0: 103.1 GB, 103079215104 bytes
255 heads, 63 sectors/track, 12532 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/dm-0 doesn't contain a valid partition table


Disk /dev/dm-1: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 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/dm-1 doesn't contain a valid partition table


Disk /dev/dm-2: 3872.9 GB, 3872907067392 bytes
255 heads, 63 sectors/track, 470854 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/dm-2 doesn't contain a valid partition table




command: cat /etc/mtab
output:
root@proxmox:~# cat /etc/mtab
/dev/mapper/pve-root / ext3 rw,errors=remount-ro 0 0
tmpfs /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
udev /dev tmpfs rw,mode=0755 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0
/dev/mapper/pve-data /var/lib/vz ext3 rw 0 0
/dev/sda2 /boot ext3 rw 0 0
fusectl /sys/fs/fuse/connections fusectl rw 0 0
/dev/fuse /etc/pve fuse rw,nosuid,nodev,default_permissions,allow_other 0 0
beancounter /proc/vz/beancounter cgroup rw,name=beancounter 0 0
container /proc/vz/container cgroup rw,name=container 0 0
fairsched /proc/vz/fairsched cgroup rw,name=fairsched 0 0




command: cat /etc/fstab
output:
root@proxmox:~# cat /etc/fstab
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/pve/root / ext3 errors=remount-ro 0 1
/dev/pve/data /var/lib/vz ext3 defaults 0 1
UUID=04ddbc67-82c5-4ab5-8d91-cee72256e39a /boot ext3 defaults 0 1
/dev/pve/swap none swap sw 0 0
proc /proc proc defaults 0 0




command: mount
output:
root@proxmox:~# mount
/dev/mapper/pve-root on / type ext3 (rw,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
/dev/mapper/pve-data on /var/lib/vz type ext3 (rw)
/dev/sda2 on /boot type ext3 (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
/dev/fuse on /etc/pve type fuse (rw,nosuid,nodev,default_permissions,allow_other)
beancounter on /proc/vz/beancounter type cgroup (rw,name=beancounter)
container on /proc/vz/container type cgroup (rw,name=container)
fairsched on /proc/vz/fairsched type cgroup (rw,name=fairsched)




command: df -k
output:
root@proxmox:~# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/pve-root 99083868 803352 93247352 1% /
tmpfs 2019024 0 2019024 0% /lib/init/rw
udev 2009216 252 2008964 1% /dev
tmpfs 2019024 15664 2003360 1% /dev/shm
/dev/mapper/pve-data 3722787896 11789728 3710998168 1% /var/lib/vz
/dev/sda2 505764 34953 444699 8% /boot
/dev/fuse 30720 16 30704 1% /etc/pve




command: pvdisplay
output:
root@proxmox:~# pvdisplay
--- Physical volume ---
PV Name /dev/sda3
VG Name pve
PV Size 3.64 TiB / not usable 3.98 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 953068
Free PE 4095
Allocated PE 948973
PV UUID 6nrOUr-fYyj-6k9i-jmMf-iOFQ-0C9Y-WHPBIs




command: vgdisplay
output:
root@proxmox:~# vgdisplay
--- Volume group ---
VG Name pve
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 3
Max PV 0
Cur PV 1
Act PV 1
VG Size 3.64 TiB
PE Size 4.00 MiB
Total PE 953068
Alloc PE / Size 948973 / 3.62 TiB
Free PE / Size 4095 / 16.00 GiB
VG UUID nd3Cr2-0vQ8-Qfl6-yLPc-18bz-G3eg-1LzhAF




command: lvdisplay
output:
root@proxmox:~# lvdisplay
--- Logical volume ---
LV Path /dev/pve/swap
LV Name swap
VG Name pve
LV UUID J3x31n-zxnb-5865-XGUn-uvkM-qkT9-zODYBl
LV Write Access read/write
LV Creation host, time proxmox, 2013-02-09 22:38:03 +0100
LV Status available
# open 1
LV Size 4.00 GiB
Current LE 1024
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1


--- Logical volume ---
LV Path /dev/pve/root
LV Name root
VG Name pve
LV UUID O6Gx69-loEu-msip-1Xql-wwpZ-7zha-kGLq89
LV Write Access read/write
LV Creation host, time proxmox, 2013-02-09 22:38:04 +0100
LV Status available
# open 1
LV Size 96.00 GiB
Current LE 24576
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0


--- Logical volume ---
LV Path /dev/pve/data
LV Name data
VG Name pve
LV UUID yqgJ1c-VsBf-k0rb-Ke9d-Z6Ht-qSZ2-vb2oG3
LV Write Access read/write
LV Creation host, time proxmox, 2013-02-09 22:38:04 +0100
LV Status available
# open 1
LV Size 3.52 TiB
Current LE 923373
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2




If I try to expand PVE, i need a new disk, but my new disk is inside my only disk create by hardware raid controller


I try this command: lvextend /dev/mapper/pve-data /dev/sda
output: Physical Volume "/dev/sda" not found in Volume Group "pve"


I read http://pve.proxmox.com/wiki/Extending_Local_Container_Storage but it work with a new disk that create sdb1. This isn't my situation, and I don't understand how I can do it.

I can reinstall proxmox, but I want learn how to increase disk space without reinstallation. My server have 16 bay and I want add disk when I finish the space without reinstall and erase my file.
I search a solution, but i don't find it...


Somebody can help me?
Thank you.
 
Hello, i'm a newbie and I have a problem


...


3 HD WD red 2TB in raid 5 (bay 0, 1, e 2)


so I have 3.5 TB space in sda disk


I add a new disk (WD red 2TB) and I expand my raid by hardware controller raid


now I have:
command: dmesg | grep "[h,s]d[a,b]" | grep " logical blocks: "
output: sd 2:2:0:0: [sda] 11712884736 512-byte logical blocks: (5.99 TB/5.45 TiB)




now I want expand my space in proxmox from 3.5TB to 5.45TB or 5.99TB but I don't understand how i can do it

...
Hi,
you have two possibilities.
First - expand your lvm-partition
Second (the safe way) - create an furter partion on the disk with parted (if I'm right it will be sda4). Normaly the changes are not visible from the kernel, because it's use the old table due to lvm - use kpartx or reboot. After that you can expand the volumegroup pve with the additional partion and than expand the lv pve-data and last expand the filesystem with resize2fs.
See
Code:
vgextend --help
lvextend --help
Udo
 
Thank you very much.
I need use it, for every time I end my space and I need to add another disk. And this can be, in a long time, for 10 hard disk.
I like try first possibility, so I don't have 10 partirion, but you write that the second possibility is the safe way.

Do you think, it's better use the second possibility, for 10 times?
 
Thank you very much.
I need use it, for every time I end my space and I need to add another disk. And this can be, in a long time, for 10 hard disk.
I like try first possibility, so I don't have 10 partirion, but you write that the second possibility is the safe way.

Do you think, it's better use the second possibility, for 10 times?
Hi,
depends on your raid-controller you can perhaps create an new volume - so you have an new disk which you can use for the vg-extension.

With the number of partions depends on the disk-label type. With msdos label you can only have 4 primary partions (and with an extended partition you must change two partions...) but gpt have no limit for partitions. For bigger disks it's must be an gpt-label.

But of course you can expand your lvm-partion - this mean you delete the partition and create an new one with the same start (use "unit s" to see the acurate start) and more space (you should have an valid backup of the data!).

Udo
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!