<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.nodespace.com/wiki/history/Adding_a_second_drive?feed=atom</id>
	<title>Adding a second drive - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.nodespace.com/wiki/history/Adding_a_second_drive?feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.nodespace.com/wiki/history/Adding_a_second_drive"/>
	<updated>2026-04-20T07:40:28Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.nodespace.com/index.php?title=Adding_a_second_drive&amp;diff=20&amp;oldid=prev</id>
		<title>Travis: Created page with &quot;&#039;&#039;&#039;Danger:&#039;&#039;&#039; When working with the file system, it&#039;s important you watch what you type. You can make your system inoperable. &#039;&#039;&#039;&#039;&#039;NodeSpace is not responsible for data loss.&#039;&#039;&#039;&#039;&#039;  Adding a secondary (or tertiary) drive to a system is a common task. This wiki article will walk you through finding your secondary drive and adding a filesystem to it as a mounted filesystem.  == Finding the drive == When SSH&#039;d into your server, run the following command &lt;code&gt;ls /dev/sd*&lt;/co...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.nodespace.com/index.php?title=Adding_a_second_drive&amp;diff=20&amp;oldid=prev"/>
		<updated>2022-08-03T04:35:02Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;Danger:&amp;#039;&amp;#039;&amp;#039; When working with the file system, it&amp;#039;s important you watch what you type. You can make your system inoperable. &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;NodeSpace is not responsible for data loss.&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;  Adding a secondary (or tertiary) drive to a system is a common task. This wiki article will walk you through finding your secondary drive and adding a filesystem to it as a mounted filesystem.  == Finding the drive == When SSH&amp;#039;d into your server, run the following command &amp;lt;code&amp;gt;ls /dev/sd*&amp;lt;/co...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Danger:&amp;#039;&amp;#039;&amp;#039; When working with the file system, it&amp;#039;s important you watch what you type. You can make your system inoperable. &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;NodeSpace is not responsible for data loss.&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Adding a secondary (or tertiary) drive to a system is a common task. This wiki article will walk you through finding your secondary drive and adding a filesystem to it as a mounted filesystem.&lt;br /&gt;
&lt;br /&gt;
== Finding the drive ==&lt;br /&gt;
When SSH&amp;#039;d into your server, run the following command &amp;lt;code&amp;gt;ls /dev/sd*&amp;lt;/code&amp;gt;. This command will output all detected SATA drives by the &amp;lt;abbr&amp;gt;OS&amp;lt;/abbr&amp;gt; and any partitions. You should see /dev/sda /dev/sda1 /dev/sda2 /dev/sdb, etc. Typically if you have a single SATA drive, the secondary drive will be /dev/sdb. /dev/sda1 is the first partition on the disk /dev/sda. Always verify first. Make note of the drive. If you do not see the drive or have a question, open a support ticket.&lt;br /&gt;
&lt;br /&gt;
== Partition the drive ==&lt;br /&gt;
Now we need to add partition(s) to the drive. Run the following command as root (or &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; as a regular user): &amp;lt;code&amp;gt;fdisk /dev/sd&amp;#039;&amp;#039;&amp;#039;b&amp;#039;&amp;#039;&amp;#039;&amp;lt;/code&amp;gt; (change the letter to the appropriate drive).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;fdisk&amp;lt;/code&amp;gt; will then prompt you for a command. Check the disk to see if any partitions exist by typing &amp;lt;code&amp;gt;p&amp;lt;/code&amp;gt; and enter. If any partitions exist, you&amp;#039;ll see them listed, like this:&lt;br /&gt;
 Device     Start        End    Sectors   Size Type&lt;br /&gt;
 /dev/sda1   2048 1953525134 1953523087 931.5G Linux filesystem&lt;br /&gt;
Enter the &amp;lt;code&amp;gt;p&amp;lt;/code&amp;gt; command to create a partition. We recommend keeping the defaults for the next options.&lt;br /&gt;
 Partition number (1-4, default 1): 1&lt;br /&gt;
 First sector (2048-16777215, default 2048): &lt;br /&gt;
 Last sector, +sectors or +size{K,M,G,T,P} (2048-16777215, default 16777215): &lt;br /&gt;
  &lt;br /&gt;
 Created a new partition 1 of type &amp;#039;Linux&amp;#039; and of size 8 GiB.&lt;br /&gt;
  &lt;br /&gt;
 Command (m for help): &lt;br /&gt;
Once the partition is created, you can then write it to the disk using the &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt; command. &amp;#039;&amp;#039;&amp;#039;Warning!&amp;#039;&amp;#039;&amp;#039; If you messed up, this is where you can abort if needed. Pressing enter after &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt; commits the changes to the disk.&lt;br /&gt;
 Command (m for help): w&lt;br /&gt;
 The partition table has been altered.&lt;br /&gt;
 Calling ioctl() to re-read partition table.&lt;br /&gt;
 Syncing disks.&lt;br /&gt;
Now if you re-run &amp;lt;code&amp;gt;ls /dev/sd*&amp;lt;/code&amp;gt;, you should see the partition created.&lt;br /&gt;
&lt;br /&gt;
== Format the partition ==&lt;br /&gt;
Before you can use the drive, you need to format the partition. Run the following command as root (or &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;): &amp;lt;code&amp;gt;mkfs.ext4 /dev/sdb1&amp;lt;/code&amp;gt;. Change the “sdb1” to the partition that you just created. This will format the partition using the ext4 filesystem.&lt;br /&gt;
&lt;br /&gt;
== Mount the filesystem ==&lt;br /&gt;
The last step is to mount the filesystem. Run the following commands:&lt;br /&gt;
 user@server:~$ sudo mkdir /media/sdb1&lt;br /&gt;
 user@server:~$ sudo mount /dev/sdb1 /media/sdb1&lt;br /&gt;
 user@server:~$ sudo nano -Bw /etc/fstab&lt;br /&gt;
The second to last command is mounting the filesystem to our /media/sdb1 directory. The last command edits the the fstab file which will automatically mount the drive when the system boots.&lt;br /&gt;
&lt;br /&gt;
Add the following to the last line of the file and save:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/dev/sdb1 /media/sdb1 ext4 defaults 0 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And now you can use your additional drive.&lt;/div&gt;</summary>
		<author><name>Travis</name></author>
	</entry>
</feed>