I have a web server and I’m confused about how the disk space has been allocated by the company I’m renting it, a dedicated one with a simple RAID mirror at 500Gb. Here is the output of df-h
Filesystem Size Used Avail Use% Mounted on /dev/md1 3.7G 355M 3.4G 10% / /dev/mapper/vg00-usr 4.0G 1.2G 2.9G 28% /usr /dev/mapper/vg00-var 4.0G 374M 3.7G 10% /var /dev/mapper/vg00-home 4.0G 4.2M 4.0G 1% /home none 2.0G 9.6M 2.0G 1% /tmp tmpfs 2.0G 0 2.0G 0% /usr/local/psa/handlers/before-local tmpfs 2.0G 0 2.0G 0% /usr/local/psa/handlers/before-queue tmpfs 2.0G 0 2.0G 0% /usr/local/psa/handlers/before-remote tmpfs 2.0G 0 2.0G 0% /usr/local/psa/handlers/info tmpfs 2.0G 0 2.0G 0% /usr/local/psa/handlers/spool
And here is a print from parted
Model: ATA Hitachi HDS5C105 (scsi) Disk /dev/sda: 500GB Sector size (logical/physical): 512B/512B Partition Table: msdosNumber Start End Size Type File system Flags 1 32.3kB 4006MB 4006MB primary ext3 raid 2 4006MB 6013MB 2007MB primary linux-swap 3 6013MB 500GB 494GB primary raid
To me it looks like I’m not using much of my available disk space? How would I could about creating a new mount, say 150Gb in the root, something like /data?
Many thanks in advance, and thanks for reading this question.
As requested, here is the output of pvdisplay
--- Physical volume --- PV Name /dev/md3 VG Name vg00 PV Size 460.16 GB / not usable 3.31 MB Allocatable yes PE Size (KByte) 4096 Total PE 117800 Free PE 114728 Allocated PE 3072 PV UUID vHgUON-kzqN-TcDt-yhto-fxTW-3nsK-O92Kgx
and here is vgdisplay -v
Finding all volume groups Finding volume group "vg00" --- Volume group --- VG Name vg00 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 460.16 GB PE Size 4.00 MB Total PE 117800 Alloc PE / Size 3072 / 12.00 GB Free PE / Size 114728 / 448.16 GB VG UUID 4F29RY-NWx6-fzQ3-19tB-pT6Q-G6wg-rHDOkS --- Logical volume --- LV Name /dev/vg00/usr VG Name vg00 LV UUID up8Dud-Zwcd-hmdt-fcLi-3uca-S8gZ-JtpHPt LV Write Access read/write LV Status available # open 1 LV Size 4.00 GB Current LE 1024 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:0 --- Logical volume --- LV Name /dev/vg00/var VG Name vg00 LV UUID Vrjpic-byLm-M7cc-ZTo4-yWoo-zZsL-1DoHpq LV Write Access read/write LV Status available # open 1 LV Size 4.00 GB Current LE 1024 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:1 --- Logical volume --- LV Name /dev/vg00/home VG Name vg00 LV UUID 3rJ3o7-M9KU-ml9J-0E8Q-OJEC-ER2F-KwBxVc LV Write Access read/write LV Status available # open 1 LV Size 4.00 GB Current LE 1024 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:2 --- Physical volumes --- PV Name /dev/md3 PV UUID vHgUON-kzqN-TcDt-yhto-fxTW-3nsK-O92Kgx PV Status allocatable Total PE / Free PE 117800 / 114728
Based on the partition map and
df output, I suspect your system is configured in this way:
You have two disks,
sdb. Each disk has three partitions, two raid partitions and a swap partition. They’re allocated like so:
/filesystem lives on a raid mirror occupying partition 1 on both disks.
- You have two swap partitions, 2 GB each, which are not raided.
- The third partitions on each disk are connected in a raid mirror 500 GB in size (probably
- The raid mirror has been set up in LVM as a single large physical volume (
pvdisplaywould confirm this).
- That physical volume has been carved up into at least one volume group (use
vgdisplayto see it). It’s likely that there’s only one volume group, named
vg00; this is a popular convention.
- That volume group has at least three logical volumes on it, which are what are mounted on
In my guess about how your system is configured, the rest of the space in the physical volume is probably assigned to the single volume group, so to create a new logical volume of 150 GB you’d run
lvcreate -n data -L 150G vg00. This would then appear as
/dev/vg00-data and be available to be formatted with a filesystem and mounted into
Note: Don’t run that command without making absolutely sure your system really is set up this way. It could cause trouble otherwise.