I have a Linux dedicated server, I need a way more space, like 500G. I see that there is only 4G in my filesystem. I found an article to increase size Logical Volume from this article https://help.1and1.com/servers-c37684/dedicated-server-linux-c37687/administration-c37694/increase-the-size-of-the-logical-volume-a756168.html (I'm on 1and1)
So here is what I did:
first of all I have two file systems mounted on one directory, for some reason and umount command doesn't work
[root@u17669867 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/md1 4.0G 2.7G 1.4G 67% /
/dev/mapper/ssd-var 4.0G 2.7G 1.4G 67% /
[root@u17669867 ~]# fdisk -l
Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
81 heads, 63 sectors/track, 382818 cylinders
Units = cylinders of 5103 * 512 = 2612736 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x4dfb2370
Device Boot Start End Blocks Id System
/dev/sdc1 1 382819 976761560 fd Linux raid autodetect
Disk /dev/sdb: 240.1 GB, 240057409536 bytes
255 heads, 63 sectors/track, 29185 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: 0xb322c93e
Device Boot Start End Blocks Id System
/dev/sdb1 1 523 4194304 fd Linux raid autodetect
Partition 1 does not end on cylinder boundary.
/dev/sdb2 523 784 2097152 82 Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
/dev/sdb3 784 29186 228138584 fd Linux raid autodetect
Partition 3 does not end on cylinder boundary.
Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
81 heads, 63 sectors/track, 382818 cylinders
Units = cylinders of 5103 * 512 = 2612736 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x8c756b43
Device Boot Start End Blocks Id System
/dev/sdd1 1 382819 976761560 fd Linux raid autodetect
Disk /dev/sda: 240.1 GB, 240057409536 bytes
255 heads, 63 sectors/track, 29185 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: 0x26616fe2
Device Boot Start End Blocks Id System
/dev/sda1 1 523 4194304 fd Linux raid autodetect
Partition 1 does not end on cylinder boundary.
/dev/sda2 523 784 2097152 82 Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
/dev/sda3 784 29186 228138584 fd Linux raid autodetect
Partition 3 does not end on cylinder boundary.
Disk /dev/md3: 233.6 GB, 233613819904 bytes
2 heads, 4 sectors/track, 57034624 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/md1: 4294 MB, 4294901760 bytes
2 heads, 4 sectors/track, 1048560 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/md11: 1000.2 GB, 1000203747328 bytes
2 heads, 4 sectors/track, 244190368 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/hdd-data: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/ssd-usr: 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/mapper/ssd-var: 15.0 GB, 15032385536 bytes
255 heads, 63 sectors/track, 1827 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/ssd-home: 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
Here I see how many Phisical Volumes I have
[root@u17669867 ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/md11 hdd lvm2 a-- 931.51g 927.51g
/dev/md3 ssd lvm2 a-- 217.57g 195.57g
Here I try to add some space, for example 10G to the disk, which I'm using
[root@u17669867 ~]# lvextend -L +10 /dev/md1
Path required for Logical Volume "md1"
Please provide a volume group name
Run `lvextend --help' for more information.
[root@u17669867 ~]#
But I'm not a professional, and I'm not sure where to add space... As long as my web content will be stored in /var/www/ directory. So probably I have to mount a disk to that directory, because as I see from here:
[root@u17669867 /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/md1 4.0G 2.7G 1.4G 67% /
/dev/mapper/ssd-var 4.0G 2.7G 1.4G 67% /
Nothing is mounted to /var
Please, assist me if possible.