ajouter_un_disque_dur_sur_un_vps
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
ajouter_un_disque_dur_sur_un_vps [2016/05/27 11:23] – simon | ajouter_un_disque_dur_sur_un_vps [Date inconnue] (Version actuelle) – supprimée - modification externe (Date inconnue) 127.0.0.1 | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ====== Ajouter un disque dur sur un VPS ====== | ||
- | J'ai un VPS chez OVH sur lequel tourne mon instance [[https:// | ||
- | |||
- | C'est parti ! Une fois le disque commandé via l' | ||
- | <code bash> | ||
- | # fdisk -l | ||
- | |||
- | Disk /dev/vda: 10 GiB, 10737418240 bytes, 20971520 sectors | ||
- | Units: sectors of 1 * 512 = 512 bytes | ||
- | Sector size (logical/ | ||
- | I/O size (minimum/ | ||
- | Disklabel type: dos | ||
- | Disk identifier: 0x00000000 | ||
- | |||
- | Device | ||
- | / | ||
- | |||
- | Disk /dev/vdb: 50 GiB, 53687091200 bytes, 104857600 sectors | ||
- | Units: sectors of 1 * 512 = 512 bytes | ||
- | Sector size (logical/ | ||
- | I/O size (minimum/ | ||
- | </ | ||
- | |||
- | Il n'a pas encore de partition(s). On va en créer une avec '' | ||
- | <code bash> | ||
- | # fdisk /dev/vdb | ||
- | |||
- | Welcome to fdisk (util-linux 2.25.2). | ||
- | Changes will remain in memory only, until you decide to write them. | ||
- | Be careful before using the write command. | ||
- | |||
- | Device does not contain a recognized partition table. | ||
- | Created a new DOS disklabel with disk identifier 0x78fc199b. | ||
- | |||
- | Command (m for help): n | ||
- | Partition type | ||
- | | ||
- | | ||
- | Select (default p): p | ||
- | Partition number (1-4, default 1): 1 | ||
- | First sector (2048-104857599, | ||
- | Last sector, +sectors or +size{K, | ||
- | |||
- | Created a new partition 1 of type ' | ||
- | |||
- | Command (m for help): w | ||
- | The partition table has been altered. | ||
- | Calling ioctl() to re-read partition table. | ||
- | Syncing disks. | ||
- | </ | ||
- | |||
- | On peut voir la différence avec un '' | ||
- | <code bash> | ||
- | # fdisk -l | ||
- | (...) | ||
- | Disk /dev/vdb: 50 GiB, 53687091200 bytes, 104857600 sectors | ||
- | Units: sectors of 1 * 512 = 512 bytes | ||
- | Sector size (logical/ | ||
- | I/O size (minimum/ | ||
- | Disklabel type: dos | ||
- | Disk identifier: 0x78fc199b | ||
- | |||
- | Device | ||
- | / | ||
- | </ | ||
- | |||
- | On formate la partition '' | ||
- | <code bash> | ||
- | # mkfs.ext4 /dev/vdb1 | ||
- | mke2fs 1.42.12 (29-Aug-2014) | ||
- | Creating filesystem with 13106944 4k blocks and 3276800 inodes | ||
- | Filesystem UUID: 5e9d2a50-54bd-47ff-8d1e-873d32991c6c | ||
- | Superblock backups stored on blocks: | ||
- | 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, | ||
- | 4096000, 7962624, 11239424 | ||
- | |||
- | Allocating group tables: done | ||
- | Writing inode tables: done | ||
- | Creating journal (32768 blocks): done | ||
- | Writing superblocks and filesystem accounting information: | ||
- | </ | ||
- | |||
- | On regarde l'UUID du nouveau disque avec la commande [[blkid]] : | ||
- | <code bash> | ||
- | # blkid | ||
- | /dev/vda1: UUID=" | ||
- | /dev/vdb1: UUID=" | ||
- | </ | ||
- | |||
- | L'UUID du nouveau disque : " | ||
- | On modifie maintenant le fichier ''/ | ||
- | <code bash># vim /etc/fstab | ||
- | proc /proc | ||
- | / | ||
- | UUID=" | ||
- | </ |
ajouter_un_disque_dur_sur_un_vps.1464348191.txt.gz · Dernière modification : 2020/08/09 12:59 (modification externe)