Commit 84368f7b authored by Francesc Guasch's avatar Francesc Guasch
Browse files

wip(doc): re-partition

parent 6c62556c
......@@ -17,7 +17,7 @@ Backup
------
Make a backup of the disk volumes. The easiest way is to
`compact <http://ravada.readthedocs.io/en/latest/docs/compact.html`_
`compact <http://ravada.readthedocs.io/en/latest/docs/compact.html>`_
the virtual machine. After that you should have a copy of all the volumes
in the images directory. Usually located at /var/lib/libvirt/images.
......@@ -27,7 +27,7 @@ Expand the volume
Go to the *Hardware* tab in the virtual machine settings. Select the
disk drive you want to extend and type the desired size of the volume.
.. figure: images/resize_volume.jpg
.. figure:: images/resize_volume.jpg
Remove and create the partition again
-------------------------------------
......@@ -47,7 +47,7 @@ Connect the disk volume as a device
.. prompt:: bash root@telecos:/var/lib/libvirt/images#
modprobe nbd
qemu-nbd -c /dev/nbd1 /var/lib/libvirt/images/WindowsE10_basic-2-hda.WindowsE10_basic-hp-hda.qcow2
qemu-nbd -c /dev/nbd1 /var/lib/libvirt/images/WindowsE10-hda.qcow2
Now the volume appears as an nbd device in the host system. You can use fdisk and other
tools to change the partitions.
......@@ -55,6 +55,8 @@ tools to change the partitions.
Remove and create the partition
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
First let's check what are the partitions with *fdisk*:
.. prompt:: bash root@telecos:/var/lib/libvirt/images#
fdisk /dev/nbd1
......@@ -74,3 +76,48 @@ Remove and create the partition
/dev/nbd1p1 * 2048 1126399 1124352 549M 7 HPFS/NTFS/exFAT
/dev/nbd1p2 1126400 62912511 61786112 29,5G 7 HPFS/NTFS/exFAT
The partition we want to change is the second one (nbd1p2). From fdisk:
.. ::
# fdisk /dev/nbd1
Command (m for help): d
Partition number (1,2, default 2):
Partition 2 has been deleted.
Now we create the partition again but using all the space we just added.
*Warning*: when asked about remove the signature, answer N.
.. ::
Command (m for help): n
Partition type
p primary (1 primary, 0 extended, 3 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (2-4, default 2):
First sector (1126400-230686719, default 1126400):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (1126400-230686719, default 230686719):
Created a new partition 2 of type 'Linux' and of size 109,5 GiB.
Partition #2 contains a ntfs signature.
Do you want to remove the signature? [Y]es/[N]o: N
As it was a NTFS partition we change it to that
.. ::
Command (m for help): t
Partition number (1,2, default 2):
Hex code (type L to list all codes): 7
Changed type of partition 'Linux' to 'HPFS/NTFS/exFAT'.
Then save an exit fdisk:
.. ::
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment