SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
Rep:
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?
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 .
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.
Distribution: x86_64 Slack 13.37 current : +others
Posts: 459
Rep:
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.
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.
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
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:
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.
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
Original Poster
Rep:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.