LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-05-2011, 10:51 AM   #1
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Install Second SATA Drive


OK, I'm feeling stupid -- been a long, long time since I've added a second drive to a system and I'm wondering if this is the "right" way.

I'm figuring, power down, insert the drive in a bay, connect the cable, power up, use cfdisk to set the file system type (no partitions, it's a unused 150G Western Digital, going to use the whole thing for storage), add an entry for it in /etc/fstab. Probably have to run mkfs on it at some point.

Am I missing anything, is there here-dummy-do-it-this-way?
 
Old 10-05-2011, 10:53 AM   #2
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
You're doing the right things, though I think you'll need to create at least one partition (even if it takes up the whole disk). Obviously, you'll have to run mkfs on the partition before you mount it .
 
Old 10-05-2011, 10:55 AM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Actually you are right. The mkfs would come after the cfdisk part.
Just some reminders: It may be possible that the new disk will change the way the system sees partitions, for example, what formerly was sda1 may become sdb1. To avoid this make sure that your system drive is connected to SATA port 1 on the motherboard (may be port 0, depending on the manufacturer, just make sure to use the first port) and the data disk to a higher numbered port.
If you use UUIDs for your partitions this should not be an issue.
 
Old 10-05-2011, 11:14 AM   #4
hughetorrance
Member
 
Registered: Aug 2009
Location: London North West
Distribution: x86_64 Slack 13.37 current : +others
Posts: 459

Rep: Reputation: 59
If you leave the first drive connected then it will remain sda,then the second drive will be sdb,its the BIOS that begins the naming convention,it will only get confused if you remove the first drive and replace it later.Then you make a single dos type partition and format it to the file system you want.I would use Parted magic to do this.
 
Old 10-05-2011, 12:07 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by hughetorrance View Post
If you leave the first drive connected then it will remain sda,then the second drive will be sdb,its the BIOS that begins the naming convention,it will only get confused if you remove the first drive and replace it later.
Sorry, but that is not quite true. I have seen many systems, especially built from smaller vendors, where the disks were connected rather randomly (for example, the DVD drive was plugged into port 2 and the disk into port 4 in a system with 4 SATA ports). If you add a disk to such a system without fixing the order of connections the new disk will become sda, since it is the first disk the BIOS finds.
Of course you are right when the connections are right from the beginning.
 
Old 10-05-2011, 12:48 PM   #6
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
Be defensive on the issue what is recognized as first drive, and simply make sure device mounting is not dependent on device naming. Nowadays an fstab looks like this:

Code:
UUID=507cb975-b1f0-435a-9a66-d71a0a40c365    /       ext3    errors=remount-ro 0       1
UUID=31f9f55b-aa25-4e05-970c-2c68901fc50a    /home   ext3    defaults          0       2
So instead of /dev/sda1 you'd use UUID=507cb975-b1f0-435a-9a66-d71a0a40c365. You can discover the UUID's by issuing the command blkid in a terminal. It will tell you the UUID of each partition so you can correctly enter this in fstab.

It means that when you plug in a new hard drive and the device name changes, your existing drives mount correctly.

jlinkels
 
Old 10-05-2011, 12:53 PM   #7
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Original Poster
Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Well, it's a Dell OptiPlex 780 -- looks like /dev/sda is in the right connector.

Right now, though, I'm waiting for Dell to send me a couple of the little plastic hickeys that slide into the bay and hold the drive; of course they had to change the things from the old green ones (that I have a dozen of) to new blue ones that I have zero of.

Somebody's brother-in-law is in the drive mounting hickey business, I s'pect.

But, I out-boarded it and it works just fine.

Thanks all.
 
Old 10-05-2011, 12:57 PM   #8
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
I know this is OT, but I find it amusing you used the term "hickey" there .
 
  


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
IDE DVD drive and SATA 3.0 hard drive not detected on Debian/Ubuntu install Byrnascus Linux - Hardware 7 01-21-2010 11:11 AM
install xp on ide drive, ubuntu on sata drive abrahammer Ubuntu 5 07-29-2007 11:57 PM
Sata Raid 1 and Single Sata drive drive order issue Kvetch Linux - Hardware 5 03-19-2007 06:50 PM
fc3 install doesnt install grub properly onto sata drive sabo Linux - Newbie 4 02-03-2007 04:04 PM
Can't install on sata drive theri om Slackware - Installation 3 10-20-2006 06:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:19 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