diff --git a/content/guides/anvil/formatting_and_mounting_a_volume_in_linux.md b/content/guides/anvil/formatting_and_mounting_a_volume_in_linux.md index efe2ed5bf61f41232c0be40174f97657498d6951..67a53d1207dde3cbde3915a869268207c9db4490 100644 --- a/content/guides/anvil/formatting_and_mounting_a_volume_in_linux.md +++ b/content/guides/anvil/formatting_and_mounting_a_volume_in_linux.md @@ -11,7 +11,7 @@ when it was created, and that you are connected to the [Anvil VPN]({{< relref " Once you have [created and attached]({{< relref "creating_and_attaching_a_volume" >}}) your volume, it must be formatted and mounted in your Linux instance to be usable. This procedure is identical to what would be done when attaching a second -hard drive to a physical machine. In this example, a 10GB volume was +hard drive to a physical machine. In this example, a 1GB volume was created and attached to the instance. Note that the majority of this guide is for a newly created volume. @@ -32,55 +32,36 @@ command `sudo su -` to get a root shell. {{% panel theme="danger" header="**Running commands as root**" %}}**Extreme care should be taken when running commands as `root.`** It is very easy to permanently delete data or cause irreparable damage to your instance.{{% /panel %}} -{{< figure src="/images/13599376.png" width="700" >}} +{{< figure src="/images/anvil-volumes/1-sudo.png" width="576" >}} Next, you will need to determine what device the volume is presented as within Linux. Typically this will be `/dev/vdb`, but it is necessary to verify this to avoid mistakes, especially if you have more than one -volume attached to an instance. The command `fdisk -l` will list the -hard drive devices. +volume attached to an instance. The command `lsblk` will list the +hard drive devices and partitions. -{{< figure src="/images/13599470.png" width="700" >}} +{{< figure src="/images//anvil-volumes/2-lsblk.png" width="576" >}} Here there is a completely empty (no partitions) disk device matching -the 10GB size of the volume, so `/dev/vdb` is the correct device. -The `fdisk` utility will first be used to create a single partition. -Run the command `fdisk /dev/vdb` to start the program using the volume -disk device. +the 1GB size of the volume, so `/dev/vdb` is the correct device. +The `parted` utility will first be used to label the device and then create a partition. -{{< figure src="/images/13599477.png" width="700" >}} - -Press `n` for new partition and hit enter. - -{{< figure src="/images/13599479.png" width="700" >}} - -Press `p` for primary partition and hit enter. - -{{< figure src="/images/13599482.png" width="700" >}} - -Enter `1` for the partition number. - -{{< figure src="/images/13599528.png" width="700" >}} - -At the next two prompts hit enter to accept the defaults and return to -the main command prompt. - -{{< figure src="/images/13599530.png" width="700" >}} - -Finally, press `w` followed by return to save the changes and -exit `fdisk`. +{{< highlight bash >}} +parted /dev/vdb mklabel gpt +parted /dev/vdb mkpart primary 0% 100% +{{< /highlight >}} -{{< figure src="/images/13599533.png" width="700" >}} +{{< figure src="/images/anvil-volumes/3-mkpart.png" width="576" >}} Now that a partition has been created, it can be formatted. Here, the -EXT4 filesystem will be used. This is the default filesystem used by +ext4 filesystem will be used. This is the default filesystem used by many Linux distributions including CentOS and Ubuntu, and is a good general choice. An alternate filesystem may be used by running a -different format command. To format the partition using EXT4, run the +different format command. To format the partition using ext4, run the command `mkfs.ext4 /dev/vdb1`. You will see a progress message and then be returned to the shell prompt. -{{< figure src="/images/13599540.png" width="700" >}} +{{< figure src="/images/anvil-volumes/4-mkfs.png" width="576" >}} #### Mounting the volume @@ -96,14 +77,14 @@ following commands to make the directory and mount the volume: {{< highlight bash >}} mkdir /mnt/myvolume -mnt /dev/vdb1 /mnt/myvolume +mount /dev/vdb1 /mnt/myvolume {{< /highlight >}} -{{< figure src="/images/13599546.png" width="700" >}} +{{< figure src="/images/anvil-volumes/5-mount.png" width="576" >}} Running the command `df -h` should then show the new mounted empty volume. -{{< figure src="/images/13599549.png" width="700" >}} +{{< figure src="/images/anvil-volumes/6-df.png" width="576" >}} The volume can now be used. diff --git a/static/images/13599376.png b/static/images/13599376.png deleted file mode 100644 index 8ede2034a4033b3ca2765252f2b37970844c5b3f..0000000000000000000000000000000000000000 Binary files a/static/images/13599376.png and /dev/null differ diff --git a/static/images/13599470.png b/static/images/13599470.png deleted file mode 100644 index cef6552f07f7860d668e36e270f76bde330e0ae3..0000000000000000000000000000000000000000 Binary files a/static/images/13599470.png and /dev/null differ diff --git a/static/images/13599477.png b/static/images/13599477.png deleted file mode 100644 index d08032f02e434051a268fe274daa5342181516b1..0000000000000000000000000000000000000000 Binary files a/static/images/13599477.png and /dev/null differ diff --git a/static/images/13599479.png b/static/images/13599479.png deleted file mode 100644 index 38dea05f9a842f558936659b94864343d62bf9e2..0000000000000000000000000000000000000000 Binary files a/static/images/13599479.png and /dev/null differ diff --git a/static/images/13599482.png b/static/images/13599482.png deleted file mode 100644 index 4c80147e5be418378d4f97095ea67c50f67448bf..0000000000000000000000000000000000000000 Binary files a/static/images/13599482.png and /dev/null differ diff --git a/static/images/13599528.png b/static/images/13599528.png deleted file mode 100644 index b48debcddd6c815f0095a58034958a4a35cf71a8..0000000000000000000000000000000000000000 Binary files a/static/images/13599528.png and /dev/null differ diff --git a/static/images/13599530.png b/static/images/13599530.png deleted file mode 100644 index 14edbda5761723a5ba7af50a9b14e4c210006da4..0000000000000000000000000000000000000000 Binary files a/static/images/13599530.png and /dev/null differ diff --git a/static/images/13599533.png b/static/images/13599533.png deleted file mode 100644 index 2bcdeec53a0c3163445b41f57525004219de3a7a..0000000000000000000000000000000000000000 Binary files a/static/images/13599533.png and /dev/null differ diff --git a/static/images/13599540.png b/static/images/13599540.png deleted file mode 100644 index d94de8cdcfa2bf2a90e180b01504108446ed0a80..0000000000000000000000000000000000000000 Binary files a/static/images/13599540.png and /dev/null differ diff --git a/static/images/13599546.png b/static/images/13599546.png deleted file mode 100644 index e41bc3fae3f2884896beb98f38cc187a819e11cd..0000000000000000000000000000000000000000 Binary files a/static/images/13599546.png and /dev/null differ diff --git a/static/images/13599549.png b/static/images/13599549.png deleted file mode 100644 index 578ba70999bb1d3a534b9ce550339b0fb69fe4ed..0000000000000000000000000000000000000000 Binary files a/static/images/13599549.png and /dev/null differ diff --git a/static/images/anvil-volumes/1-sudo.png b/static/images/anvil-volumes/1-sudo.png new file mode 100644 index 0000000000000000000000000000000000000000..4c900702d8ea16c08afdf576e019d29b43c47ebe Binary files /dev/null and b/static/images/anvil-volumes/1-sudo.png differ diff --git a/static/images/anvil-volumes/2-lsblk.png b/static/images/anvil-volumes/2-lsblk.png new file mode 100644 index 0000000000000000000000000000000000000000..a4b918fbe2376f06c42e11b79c4af31cc21b440b Binary files /dev/null and b/static/images/anvil-volumes/2-lsblk.png differ diff --git a/static/images/anvil-volumes/3-mkpart.png b/static/images/anvil-volumes/3-mkpart.png new file mode 100644 index 0000000000000000000000000000000000000000..1ca616c885e575ac8e0505e0cae6493dd8481221 Binary files /dev/null and b/static/images/anvil-volumes/3-mkpart.png differ diff --git a/static/images/anvil-volumes/4-mkfs.png b/static/images/anvil-volumes/4-mkfs.png new file mode 100644 index 0000000000000000000000000000000000000000..c05b6845ac67a2c341256ff7d3a060e5f9effce4 Binary files /dev/null and b/static/images/anvil-volumes/4-mkfs.png differ diff --git a/static/images/anvil-volumes/5-mount.png b/static/images/anvil-volumes/5-mount.png new file mode 100644 index 0000000000000000000000000000000000000000..8521f25294f7208d4f5415ad5e535bc1f6d7b77b Binary files /dev/null and b/static/images/anvil-volumes/5-mount.png differ diff --git a/static/images/anvil-volumes/6-df.png b/static/images/anvil-volumes/6-df.png new file mode 100644 index 0000000000000000000000000000000000000000..62ce026e16735ef8e9c2c3c416997d45e73f5bce Binary files /dev/null and b/static/images/anvil-volumes/6-df.png differ