How to resize OVH Public Cloud disk in CentOS 7 linux

I’m going to resize 100G SSD to 150GB SSD in Public Cloud

First I check the current mounted disk
[code lang=”shell”]
[[email protected] ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 40G 2.4G 36G 7% /
devtmpfs 3.8G 0 3.8G 0% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 3.9G 17M 3.8G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
tmpfs 780M 0 780M 0% /run/user/1000
/dev/vdb 99G 84G 9.7G 90% /mnt/data
[/code]

Then I’m going to umount it
[code lang=”shell”]
[[email protected] ~]# umount /dev/vdb
[[email protected] ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 40G 2.4G 36G 7% /
devtmpfs 3.8G 0 3.8G 0% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 3.9G 17M 3.8G 1% /run
[/code]

I use the OVH interface to Backup first, then Detach the disk, and resize it to 150GB then Save.
And now back to the shell.

[code lang=”shell”]
[[email protected] ~]# fdisk -l

Disk /dev/vda: 42.9 GB, 42949672960 bytes, 83886080 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 label type: dos
Disk identifier: 0x000161a3

Device Boot Start End Blocks Id System
/dev/vda1 * 2048 83883491 41940722 83 Linux

Disk /dev/vdb: 161.1 GB, 161061273600 bytes, 314572800 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
[/code]
Use e2fsck to chekc the file systems.

[code lang=”shell”]
[[email protected] ~]# e2fsck /dev/vdb
e2fsck 1.42.9 (28-Dec-2013)
/dev/vdb: clean, 62/6553600 files, 22382398/26214144 blocks

[[email protected] ~]# resize2fs /dev/vdb
resize2fs 1.42.9 (28-Dec-2013)
Please run ‘e2fsck -f /dev/vdb’ first.

[[email protected] ~]# e2fsck -f /dev/vdb
e2fsck 1.42.9 (28-Dec-2013)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/vdb: 62/6553600 files (56.5% non-contiguous), 22382398/26214144 blocks
[/code]

Resize using resize2fs

[code lang=”shell”]
[[email protected] ~]# resize2fs /dev/vdb
resize2fs 1.42.9 (28-Dec-2013)
Resizing the filesystem on /dev/vdb to 39321600 (4k) blocks.
The filesystem on /dev/vdb is now 39321600 blocks long.
[/code]

Mount again to our system.

[code lang=”shell”]
[[email protected] ~]# mount /dev/vdb /mnt/data
[[email protected] ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 40G 2.4G 36G 7% /
devtmpfs 3.8G 0 3.8G 0% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 3.9G 17M 3.8G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
tmpfs 780M 0 780M 0% /run/user/1000
/dev/vdb 148G 84G 57G 60% /mnt/data
[/code]

You can see the Size increased.
Always backup before you do any change to disk.
Please take your own risk on these command in Linux.

lazy-result.js ReferenceError: Promise is not defined

[code lang=”javascript”]
node_modules/postcss/lib/lazy-result.js:157
this.processing = new Promise(function (resolve, reject) {
^
ReferenceError: Promise is not defined
[/code]

When I install the FoundationPress, after I run gulp build I saw this message,
this is because the node version problem.

the have mention in this post
https://github.com/postcss/postcss-nested/issues/30

Solution

[code lang=”shell”]
vim node_modules/postcss/lib/lazy-result.js
[/code]
Put this to the first line of the file lazy-result.js
[code lang=”shell”]
require(‘es6-promise’).polyfill();
[/code]
Save.

Then install
[code lang=”shell”]
npm install es6-promise
[/code]

Then build again
[code lang=”shell”]

[[email protected]]# gulp build
[18:14:07] Starting ‘clean’…
[18:14:07] Starting ‘clean:javascript’…
[18:14:07] Starting ‘clean:css’…
[18:14:07] Finished ‘clean:javascript’ after 4.56 ms
[18:14:07] Finished ‘clean:css’ after 2.98 ms
[18:14:07] Finished ‘clean’ after 6.38 ms
[18:14:07] Starting ‘build’…
[18:14:07] Starting ‘copy’…
[18:14:07] Finished ‘copy’ after 103 ms
[18:14:07] Starting ‘sass’…
[18:14:08] Starting ‘javascript’…
[18:14:08] Starting ‘lint’…
[18:14:10] Finished ‘lint’ after 1.53 s
[18:14:10] Finished ‘sass’ after 2.58 s
[18:14:14] Finished ‘javascript’ after 6.12 s
[18:14:14] Finished ‘build’ after 6.78 s
[/code]

Success !