Managing your cloud resources with OpenStack: Difference between revisions

Jump to navigation Jump to search
no edit summary
(Marked this version for translation)
No edit summary
Line 54: Line 54:


==Formatting and Mounting an Empty Volume== <!--T:15-->
==Formatting and Mounting an Empty Volume== <!--T:15-->
On most Linux distributions the following steps can be used to partition, format, and mount the newly created volume. NOTE: If this is not a newly created volume the partition and format steps should be skipped as they will result in loss of data on that volume, and only the steps to mount the volume should be followed.
<!--T:16-->
<ol>
<li>Create a partition on the volume with
{{Command|sudo fdisk /dev/vdb}}
<code>fdisk</code> will prompt you to enter a command. Use this sequence of single-character commands to create a new partition on your volume.</li>
<!--T:17-->
n => new partition
p => primary, only one partition on disk
1 => partition number 1
<return> => first sector (use default)
<return> => last sector (use default)
w => write partition table to disk and exit
<!--T:18-->
<li>Format the newly created partition with
{{Command|sudo mkfs -t ext4 /dev/vdb1}}
<li>Create a place to mount the device with
{{Command|sudo mkdir /media/data}}
<li>Finally, mount the volume with
{{Command|sudo mount /dev/vdb1 /media/data}}
</ol>
<!--T:19-->
If the VM is rebooted for some reason the volume will need to be remounted. To cause the VM to mount the volume automatically at boot time, edit <code>/etc/fstab</code> and add a line like
<!--T:20-->
  /dev/vdb1 /media/data ext4 defaults 0 2
<!--T:43-->
For more details about the fstab file see this [https://en.wikipedia.org/wiki/Fstab wikipedia article]. If you are not rebooting, you can mount the device just added to <code>/etc/fstab</code> with
{{Command|sudo mount -a}}


==Booting from a Volume== <!--T:22-->
==Booting from a Volume== <!--T:22-->
cc_staff
1,486

edits

Navigation menu