<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>gHacks Technology News &#124; Latest Tech News, Software And Tutorials &#187; new linux drive</title> <atom:link href="http://www.ghacks.net/tag/new-linux-drive/feed/" rel="self" type="application/rss+xml" /><link>http://www.ghacks.net</link> <description>A technology news blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description> <lastBuildDate>Sat, 11 Feb 2012 17:32:23 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/> <item><title>Add a second drive to your Ubuntu server</title><link>http://www.ghacks.net/2009/09/10/add-a-second-drive-to-your-ubuntu-server/</link> <comments>http://www.ghacks.net/2009/09/10/add-a-second-drive-to-your-ubuntu-server/#comments</comments> <pubDate>Thu, 10 Sep 2009 19:20:12 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Hardware]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Advanced]]></category> <category><![CDATA[ext3 file system]]></category> <category><![CDATA[fstab]]></category> <category><![CDATA[mount drives]]></category> <category><![CDATA[new linux drive]]></category> <category><![CDATA[ubuntu server]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=16193</guid> <description><![CDATA[You have your Ubuntu Server up and running (with the help of &#8220;Installing Ubuntu Server 9.04&#8220;) but you&#8217;re afraid you&#8217;ll run out of room on your drive. To solve this problem you have installed a new hard drive, but because this is a GUI-less server you do not have access to the user-friendly GUI tools [...]]]></description> <content:encoded><![CDATA[<p>You have your Ubuntu Server up and running (with the help of &#8220;<a
title="Installing Ubuntu Server 9.04" href="http://www.ghacks.net/2009/09/03/installing-ubuntu-server-9-04/" target="_blank">Installing Ubuntu Server 9.04</a>&#8220;) but you&#8217;re afraid you&#8217;ll run out of room on your drive. To solve this problem you have installed a new hard drive, but because this is a GUI-less server you do not have access to the user-friendly GUI tools that make this job easy. So you&#8217;re going to have to install this drive with the help of the command line.</p><p>GASP!</p><p>Never fear, it&#8217;s not that hard. Just a few commands and you&#8217;ll be up and running with your new hard drive installed on your server. This article will assume the physical drive is already installed on your machine.</p><p><span
id="more-16193"></span>I am going to make a couple of assumptions here, for the sake of simplicity for this article. The first assumption is that the new drive will be mounted to the directory <strong>/data</strong>. The next assumption is that you want this directory to be both readable and writable by all users on the system. Another assumption is that you will want the drive to be formatted with the ext3 file system with just one partition. Finally I will assume you want this drive to be automatically mounted upon boot of the system.</p><p>With that out of the way, let&#8217;s get down to business.</p><p>Once you boot the machine with the new drive log into the console and issue the command:</p><p><span
style="background-color: #ffffff">dmesg</span></p><p>Near the bottom of the output you should see where the disk is located. it will be <span
style="background-color: #ffffff">something like:</span></p><p><em>/dev/sdb</em></p><p>So let&#8217;s assume it is on <strong>/dev/sdb.</strong></p><p>If you can&#8217;t figure it out where the drive is located  with <em>dmesg</em> issue the command:</p><p><em>sudo fdisk -l</em></p><p>The above command will report something like:</p><p><code>/dev/sda1   *           1       18709   150280011   83  Linux<br
/> /dev/sda2           18710       19457     6008310    5  Extended<br
/> /dev/sda5           18710       19457     6008278+  82  Linux swap / Solaris</code></p><p>But will include a listing for your new drive. If you only see listings for <strong>/dev/sda*</strong> then your new drive has not been recognized and there is a problem with the physical installation.</p><p>Once you know where your drive is located (again we&#8217;ll use <strong>/dev/sdb</strong> for our example) it&#8217;s time to create a new directory where this drive will be mounted. We are mounting our drive to the directory <strong>/data </strong><span
style="background-color: #ffffff">so we&#8217;ll create this directory with the following command:</span></p><p><em>sudo mkdir /data</em></p><p>Now let&#8217;s make it available to all users:</p><p><em>sudo chmod -R 777 /data</em></p><p>With a place to mount the drive, it&#8217;s time to format the new drive. The formatting will be done with the command:</p><p><em>sudo mkfs.ext3 /dev/sdb</em></p><p>When this is complete you are ready to mount the drive. Before you edit fstab entry (so the drive will be automatically mounted) make sure it can be successfully mounted <span
style="background-color: #ffffff">with the command:</span></p><p><em>sudo mount /dev/sdb /data</em></p><p>If this is successful let&#8217;s create an entry in <strong>/etc/fstab</strong>. open that <span
style="background-color: #ffffff">file with the command</span></p><p><em>sudo nano /etc/fstab</em></p><p>Now add the following entry at the end of that file:</p><p><code>/dev/sdb /data  ext3 defaults 0 0</code></p><p>Once you save that file, mount the drive (without having to reboot) with the command:</p><p><em>sudo mount -a</em></p><p>To make sure the drive mounted successfully issue the command:</p><p><em>df</em></p><p>The above should include in the report:</p><p><em>/dev/sdb   /data</em></p><p>If that&#8217;s the case, success! You can run one file test by trying to write a file to the new drive with the command:</p><p><em>touch /data/test</em></p><p>If you can write that file all is well.</p><p><strong>Final thoughts</strong></p><p>Yes it is a bit more complicated than adding a new drive when you have GUI tools available, but it&#8217;s not anything that can&#8217;t be accomplished by the average user. If you are not afraid of the command line, you can add a second drive in Ubuntu with ease.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/09/10/add-a-second-drive-to-your-ubuntu-server/feed/</wfw:commentRss> <slash:comments>11</slash:comments> </item> </channel> </rss>
