... | ... | @@ -195,6 +195,8 @@ Then the filesystem needs to be resized inside the VM: |
|
|
|
|
|
ssh root@test1.torproject.org
|
|
|
|
|
|
#### Resizing under LVM
|
|
|
|
|
|
Use `pvs` to display information about the physical volumes:
|
|
|
|
|
|
root@cupani:~# pvs
|
... | ... | @@ -222,9 +224,15 @@ Finally resize the filesystem: |
|
|
|
|
|
See also the [LVM howto](howto/lvm).
|
|
|
|
|
|
#### What if lvm is not available?
|
|
|
#### Resizing without LVM
|
|
|
|
|
|
If there's no LVM inside the VM (a more common configuration
|
|
|
nowadays), the above procedure will obviously not work.
|
|
|
|
|
|
If is possible to resize a partition using fdisk. In the following example we have a sda1 partition that we want to extend from 10G to 20G to fill up the free space on /dev/sda
|
|
|
You might need to resize the partition manually, which can be done
|
|
|
using fdisk. In the following example we have a `sda1` partition that
|
|
|
we want to extend from 10G to 20G to fill up the free space on
|
|
|
`/dev/sda`. Here is what the partition layout looks like before the resize:
|
|
|
|
|
|
```
|
|
|
# lsblk -a
|
... | ... | @@ -261,7 +269,7 @@ Device Boot Start End Sectors Size Id Type |
|
|
|
|
|
```
|
|
|
|
|
|
Now we delete the partition. Note that the data will not be delete only the partition table will be altered.
|
|
|
Now we delete the partition. Note that the data will not be deleted, only the partition table will be altered:
|
|
|
|
|
|
```
|
|
|
Command (m for help): d
|
... | ... | @@ -278,7 +286,7 @@ Disklabel type: dos |
|
|
Disk identifier: 0x73ab5f76
|
|
|
```
|
|
|
|
|
|
Now we create the new partition:
|
|
|
Now we create the new partition to take up the whole space:
|
|
|
|
|
|
```
|
|
|
Command (m for help): n
|
... | ... | @@ -312,7 +320,8 @@ Command (m for help): w |
|
|
The partition table has been altered.
|
|
|
Syncing disks.
|
|
|
```
|
|
|
Now we check the partitions for the machine:
|
|
|
|
|
|
Now we check the partitions:
|
|
|
|
|
|
```
|
|
|
# lsblk -a
|
... | ... | @@ -341,6 +350,7 @@ old_desc_blocks = 2, new_desc_blocks = 3 |
|
|
The filesystem on /dev/sda1 is now 5242624 (4k) blocks long.
|
|
|
```
|
|
|
|
|
|
The resize is now complete.
|
|
|
|
|
|
### Adding disks
|
|
|
|
... | ... | |