Repartitionnement disque VPS suite à un upgrade
BMPCreated with Sketch.BMPZIPCreated with Sketch.ZIPXLSCreated with Sketch.XLSTXTCreated with Sketch.TXTPPTCreated with Sketch.PPTPNGCreated with Sketch.PNGPDFCreated with Sketch.PDFJPGCreated with Sketch.JPGGIFCreated with Sketch.GIFDOCCreated with Sketch.DOC Error Created with Sketch.
Question

Repartitionnement disque VPS suite à un upgrade

by
noio
Created on 2019-02-23 12:02:46 (edited on 2024-09-04 14:02:15) in Serveurs Privés Virtuels (VPS)

Bonjour,
J'ai suivi la documentation OVH "https://docs.ovh.com/fr/vps/repartitionner-vps-suite-upgrade/" afin de repartitionner le VPS suite à l'upgrade mais il semble que la capacité du disque est toujours la même.
Voici les différentes étapes effectuées :

root@rescue:~# umount /dev/sda1
umount: /dev/sda1: not mounted
root@rescue:~# fsck -n /dev/sda1
fsck from util-linux 2.20.1
e2fsck 1.42.5 (29-Jul-2012)
/: clean, 826354/3145728 files, 9590479/12581888 blocks
root@rescue:~# fdisk /dev/sda

Command (m for help): p

Disk /dev/sda: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders, total 209715200 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: 0x00072cd0

Device Boot Start End Blocks Id System
/dev/sda1 * 4096 100659199 50327552 83 Linux
/dev/sda2 100659200 104857599 2099200 82 Linux swap / Solaris

Command (m for help): d
Partition number (1-4): 1

Command (m for help): n
Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-209715199, default 2048): 4096
Last sector, +sectors or +size{K,M,G} (4096-100659199, default 100659199):
Using default value 100659199

Command (m for help): p

Disk /dev/sda: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders, total 209715200 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: 0x00072cd0

Device Boot Start End Blocks Id System
/dev/sda1 4096 100659199 50327552 83 Linux
/dev/sda2 100659200 104857599 2099200 82 Linux swap / Solaris

Command (m for help): a
Partition number (1-4): 1

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
root@rescue:~# reboot
root@rescue:~# e2fsck -f /dev/sda1
e2fsck 1.42.5 (29-Jul-2012)
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
/: 826354/3145728 files (8.8% non-contiguous), 9557678/12581888 blocks
root@rescue:~# resize2fs /dev/sda1
resize2fs 1.42.5 (29-Jul-2012)
The filesystem is already 12581888 blocks long. Nothing to do!
# fdisk -l

Disque /dev/sda: 107.4 Go, 107374182400 octets
255 têtes, 63 secteurs/piste, 13054 cylindres
Unités = cylindres de 16065 * 512 = 8225280 octets
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Identifiant de disque : 0x00072cd0

Périphérique Amorce Début Fin Blocs Id Système
/dev/sda1 * 1 6266 50327552 83 Linux
La partition 1 ne se termine pas sur une frontière de cylindre.
/dev/sda2 6266 6528 2099200 82 Linux swap / Solaris
[root@XXXXX~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sr0 11:0 1 1024M 0 rom
sda 8:0 0 100G 0 disk
├─sda1 8:1 0 48G 0 part /
└─sda2 8:2 0 2G 0 part [SWAP]
------------------------------------------------------
Après un redémarrage normal la taille du disque est la même.
En vous remerciant d'avance de votre aide


1 Reply ( Latest reply on 2019-02-25 09:21:25 by
noio
)

Après lecture rapide tu as recrée exactement la même partition car il y'a la partition de swap...
Supprime la partition data et la partition swap puis recrée la partition, ça devrait aider.

Mais ce n'est que mon humble avis et je décline toute responsabilité :)


lsblk



C'est parfait merci bien !