LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 07-29-2013, 07:32 PM   #1
inFAM1S
LQ Newbie
 
Registered: Jul 2013
Posts: 6

Rep: Reputation: Disabled
Need help configuring 2nd HD


Hey guys, new here. I need help with adding a HD to my Linux box. Its running Fedora 19, on an 80GB SATA HD. I have a 750 that I have installed and just need to be able to use it. Working on setting up Samba to use it as a file repository. Just need a little refresher on partitioning, setting up the fs and fstab. Thanks! Help with Samba would be good too...
 
Old 07-29-2013, 07:41 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 1,914

Rep: Reputation: Disabled
Are you planning on having just a single partition?

Do you want to move existing data from the 80 Gb drive to the new drive?

Would it be useful if you were able to further expand the system with another drive later on, or perhaps replace the 750 Gb drive with an even larger one? Or is this all the storage space you're likely to need on this system?
 
Old 07-29-2013, 07:56 PM   #3
inFAM1S
LQ Newbie
 
Registered: Jul 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Yeah, just a single massive partition for the purpose of holding files. I like to have my bootable HDs on smaller disks where i keep nothing but installer files. That way in the event of an OS crash, i will most likely not lose my data. I use the big HDs for data; files, music, torrents, etc...

Moving the FS from the 80GB is not wanted. This is perhaps the most I will need on this system at this time. I have some spare SATA ports free still, not to mention USBs for externals, and all PCI card slots are still empty as well, if needed i could throw a SATA expansion card into it, but that is FAR down the road.

Most of my data now is on a Windows XP PC on its 1TB drive
 
Old 07-29-2013, 08:26 PM   #4
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 1,914

Rep: Reputation: Disabled
Then I would recommend creating a single partition on the new drive and use LVM. You don't lose any capacity by using LVM, and gain a lot of flexibility for a very minor increase in complexity.

(Actually, what I would really recommend is to use RAID for file storage, but that's another matter.)

You can create the partition with fdisk, cfdisk, parted, gdisk or any partitioning tool you're comfortable with. Disks smaller than 2 Tb can use the MBR partitioning scheme or GPT, it really doesn't matter.

If your new drive is /dev/sdb, your new partition will be /dev/sdb1. The MBR partition type should be set to 8e for LVM.

Are you at all familiar with LVM?
 
Old 07-29-2013, 08:58 PM   #5
inFAM1S
LQ Newbie
 
Registered: Jul 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
A little. Logical Volume Manager. Allows for flexible partitions. But thats it.

Right now I am showing sda1-4 and sdb1-2. I need to wipe sdb and turn it into one partitioned drive.

I was planning on using parted, Im a bit out of practice when it comes to Linux, so from what Ive read its going to be the most useful for making the large partition that I want. As for choosing the format I am not sure what to use.

how do i set the MBR for LVM?
 
Old 07-30-2013, 05:58 AM   #6
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 1,914

Rep: Reputation: Disabled
You can erase the existing partition table by telling parted to create a new label (table). mklabel msdos will create an empty msdos (MBR) partition table.

I don't know how or if you can set the partition type field in parted. To be honest, I find fdisk a lot easier to use than parted for editing MBR partition tables.
 
Old 07-30-2013, 09:24 AM   #7
inFAM1S
LQ Newbie
 
Registered: Jul 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
OK. So even though this drive is not going to be boot able I still need to have an MBR on it?
 
Old 07-30-2013, 12:02 PM   #8
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 1,914

Rep: Reputation: Disabled
The Master Boot Record contains two things: The bootloader and the partition table. You don't need the bootloader if you're not booting from the drive, but you still need a partition table.

You could use a GUID Partition Table (GPT) instead. MBR can only handle drives up to 2 Gb in size, so for larger drives GPT is necessary. The Linux kernel understands both MBR and GPT (and a few additional formats as well).
 
Old 07-30-2013, 12:17 PM   #9
inFAM1S
LQ Newbie
 
Registered: Jul 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Excellent. So I'm a little rusty with my commands.
 
Old 07-30-2013, 01:12 PM   #10
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 1,914

Rep: Reputation: Disabled
As I said, you could just use fdisk since the drive is smaller than 2 Tb. It's pretty easy to use:
  • the p command shows ("prints") the partition table
  • the o command creates an empty MBR/MSDOS partition table
  • the d command deletes a partition
  • the n command creates a new partition
  • the t command changes the type code of an existing partition
  • the q command quits without saving
  • the w command writes the new partition table to the disk and exits
  • the m command displays help text
As I mentioned earlier, you should use type 8e for LVM.
 
1 members found this post helpful.
Old 07-30-2013, 01:15 PM   #11
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux
Posts: 2,763
Blog Entries: 1

Rep: Reputation: 871Reputation: 871Reputation: 871Reputation: 871Reputation: 871Reputation: 871Reputation: 871
install 'cfdisk' if you'd like the cli gui.

http://linux.die.net/man/8/cfdisk
 
Old 07-30-2013, 02:40 PM   #12
inFAM1S
LQ Newbie
 
Registered: Jul 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
I think I got it. I wiped the partitions on SDB with fdisk -d and created a new one. Made an ext4 fs with mkfs created the dir I wanted added it to fstab and mounted it. It shows 658GB free on the properties.
 
Old 07-30-2013, 03:15 PM   #13
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 1,914

Rep: Reputation: Disabled
That sounds about right.

Drive manufacturers report capacity using base-10 (750 Gb = 750.000 Mb = 750.000.000 kb = 750.000.000.000 bytes), while most OSes use base-2 math for disk capacity (1 kb = 2^10 bytes, 1 Mb = 2^10 kbytes and so on), like everybody does with memory (RAM).

Are you sure you don't want to use LVM? It's reeeeeally neat...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Problem with configuring the resolution of my 2nd Monitor muslinux Linux - Newbie 2 06-03-2011 02:57 AM
Configuring IP's when expanding network with 2nd router zugvogel Linux - Networking 13 12-03-2009 11:10 PM
Encrypt 2nd drive without 2nd boot time passphrase: How? gargamel Slackware - Installation 15 05-30-2009 02:50 PM
Need help configuring 2nd NIC - Slackware, kernel 2.6.21.5 mfoley Linux - Networking 11 02-10-2009 05:09 AM
configuring 2nd nic/gateway spooge Slackware 2 12-24-2004 02:22 PM


All times are GMT -5. The time now is 10:27 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration