LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-17-2009, 03:55 PM   #1
joseph2020
Member
 
Registered: Mar 2009
Location: USA
Distribution: Ubuntu 12.04
Posts: 235

Rep: Reputation: Disabled
how to allocate an extra drive?


I have an empty 10 GB drive that I would like to use to store my Linux backups. Gparted shows it as /dev/sdc--9.5 Gb-- unallocated But it is not seen by the system. What do i need to do so it is seen and so it can be used for backup storage?

Thanks in advance.
 
Old 04-17-2009, 03:57 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
You need to format the drive to a known filesystem (the most common is ext3) from within GParted. Then you just need to mount it (it should end up being /dev/sdc1 after it has been formatted).
 
Old 04-17-2009, 08:37 PM   #3
maresmasb
Member
 
Registered: Apr 2009
Posts: 108

Rep: Reputation: 24
You can use a root the fdisk tool to partition your disk or simply run '/bin/fdisk -l' to list your current device. You have to partition it even if you want it to be a single partition - it needs a partition table anyway.

After having created the partition run mkfs to add a file system to the partition. In actuality, mkfs is simply a front-end for the various file system builders (mkfs.ext3, etc) available under Linux.

When done, mount the device or even better, add it to your /etc/fstab file, so it gets mounted at boot time.

Last edited by Tinkster; 10-30-2010 at 03:18 PM.
 
Old 04-18-2009, 01:22 AM   #4
joseph2020
Member
 
Registered: Mar 2009
Location: USA
Distribution: Ubuntu 12.04
Posts: 235

Original Poster
Rep: Reputation: Disabled
Thank You!

Thank you for your replies. I think it worked!

Code:
joe@joe-desktop:~$ sudo fdisk -l

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        4737    38049921   83  Linux
/dev/sda2            4738        4865     1028160    5  Extended
/dev/sda5            4738        4865     1028128+  82  Linux swap

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        1241     9968301   83  Linux

joe@joe-desktop:~$
Quote:
When done, mount the device or even better, add it to your /etc/fstab file, so it gets mounted at boot time.
OK, next lesson.... how do I do that?

Thanks again!

Last edited by joseph2020; 04-18-2009 at 01:31 AM.
 
Old 04-18-2009, 01:53 AM   #5
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Just open a terminal and enter
sudo gedit /etc/fstab
and add a line for the new partition that looks like the other ones. You can find the UUID of the partition by running the blkid command. And of course, you'll need to create a directory as a mount point where the new space will appear, say
mkdir $HOME/Backup (in which case you need to specify /home/user_name_here/Backup in fstab).
Once you are done, run
sudo mount -a
then you will probably still need to change the permissions:
sudo chown-R $USER:$USER Backup

Last edited by jay73; 04-18-2009 at 02:00 AM.
 
Old 04-18-2009, 02:58 AM   #6
joseph2020
Member
 
Registered: Mar 2009
Location: USA
Distribution: Ubuntu 12.04
Posts: 235

Original Poster
Rep: Reputation: Disabled
thanks jay73

I'm not smart enough to figure out your answer... If you can simplify I would be grateful. Please, pretend you're talking to a 4 year old.

I am lost in the Linux world. Assume I don't know anything (it's true). Please keep it simple and step by step.

Thanks again
 
Old 04-18-2009, 03:52 AM   #7
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
It is simple than you think. Just create a directory. It is assumed that you created in your home directory. Lets say the name of the directory is backup.

Now edit the /etc/fstab file as a root user. Open it in your favorite text editor. I say you do it gedit. But not necessarily that and is just an example.
Just add the following lines there:

Code:
/dev/sdb1   /home/user_name/backup   ext3   defaults    0  0
 
Old 04-18-2009, 04:48 AM   #8
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
joseph2020:

Instructions above are good enough. Yet if you wanted it more simple I'll try it here.

Open the terminal:

TO BACK UP YOUR FSTAB:

<Type in the following commands>

cd /etc <Enter>
cp fstab mybackup_fstab <Enter>

(Now you have just backed up your fstab. You may edit it now.)

TO AUTO MOUNT AT BOOTUP YOUR NEW BACKUP PARTITION:

<Type in the following commands in the terminal>

sudo mkdir /media/mybackpart <Enter>
<enter password> <Enter>

(this created a new folder under /media unto which you shall mount the partition)

NOW YOU CAN EDIT YOUR FSTAB AND USE THAT NEW FOLDER FOR MOUNTING:

sudo gedit /etc/fstab <Enter>
<enter password>
(graphic editor gedit opens, now you may enter or add the following line)

/dev/sdb1 /media/mybackpart ext3 defaults 0 0

(Now save and close the geditor. Be sure you saved it.)

When you reboot you can browse into your /media/mybackpart and there it is now mounted and ready to use.

This is only an illustration for the purpose. But for backup purposes you may mount it under /home directory if you like. Target folders for mounting can be created anywhere as long as you have permissions.

Read more about Linux tutorials available in the web. Use Google. There is also a help file for every command in the terminal, just enter:

man <command> <pressEnter>

For example you want to know more about 'mount' command, you'll type:

man mount <Enter>

(a manual page for command 'mount' will open)

a manual page will show up like help file for the requested command.

hope it helps.

goodluck.

Last edited by malekmustaq; 04-18-2009 at 04:52 AM.
 
Old 04-18-2009, 03:51 PM   #9
joseph2020
Member
 
Registered: Mar 2009
Location: USA
Distribution: Ubuntu 12.04
Posts: 235

Original Poster
Rep: Reputation: Disabled
Thank you for your helpful replies!

linuxlover.chaitanya:

I have done as you instructed....thank you much for your help!

malekmustaq:

Thank you for your explicit directions and your patience in explaining it step by step as you have done. I will try that as soon as I get offline.
 
Old 04-18-2009, 08:26 PM   #10
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,820

Rep: Reputation: 229Reputation: 229Reputation: 229
Try

Try a little of these. You are not expected to read or know it all, all at once.

http://www.linux.org/lessons/beginner/toc.html

http://www.linuxcommand.org/

http://rute.2038bug.com/index.html.gz

http://tldp.org/
 
Old 04-19-2009, 12:09 AM   #11
joseph2020
Member
 
Registered: Mar 2009
Location: USA
Distribution: Ubuntu 12.04
Posts: 235

Original Poster
Rep: Reputation: Disabled
End Of Chapter

linuxlover.chaitanya:

I am very happy! The drive is now showing up in all applications. just finished doing a backup to that "other" drive. I just did what you said:

Code:
It is simple than you think. Just create a directory. It is assumed that you created in your home directory. Lets say the name of the directory is backup.

Now edit the /etc/fstab file as a root user. Open it in your favorite text editor. I say you do it gedit. But not necessarily that and is just an example.
Just add the following lines there:

Code:

/dev/sdb1   /home/user_name/backup   ext3   defaults    0  0
Thank you very much for your helpful suggestions!

thorkelljarl:

Thank you for the links, I will be studying those very soon. There's so much to learn, and it's frustrating as I consider myself an advanced WinXP user, and now it seems I don't know how to do anything, even the most basic tasks. But, it is definitely getting better, and I am sure in a short time I will be as comfortable with Linux as I was with WinXP.

I just need to say that the linuxquestions.org users are the most helpful I have ever seen. I love this place!
 
Old 04-20-2009, 04:23 AM   #12
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
More than happy to help anyone I could. Good to see I could be of some help. Always welcome.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
adding an extra harddrive... what FS to use and how to use the drive? drawagoat Linux - Newbie 3 08-11-2006 01:02 PM
How should I allocate my drive? silvertondevil Linux - Newbie 7 01-03-2004 03:20 AM
seeing extra drive? BajaNick Linux - Hardware 13 08-26-2003 09:41 PM
mounting extra hard drive Brother Michael Linux - Newbie 1 08-18-2003 06:15 PM
extra hard drive finger51 Linux - Newbie 7 09-24-2002 08:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration