Author Topic: (SOLVED) How do I mount a slave hard drive?  (Read 1794 times)

Offline linuxist

  • Full Member
  • ***
  • Posts: 64
(SOLVED) How do I mount a slave hard drive?
« on: June 04, 2012, 04:58:18 AM »
Apologies if this has already been discussed but I can't find any info.
I'm using 'X11 Lightweight'
I want to mount a slave hard drive permanently so I can access it each time after I boot up.
My progress so far. . .
I ran FDISK on the drive using my old Windows XP system - I assume it has removed everything
The drive is now connected to 'X11 Lightweight'. Jumpers are set to 'slave'
'Manage Disk Partitions' in Control Centre shows it as sdb
All ok but don't know what to do from this point.
I'm a newbie so I would appreciate 'step by step' (idiot's guide) instructions please because I don't understand the names of partitions (Ext4, XFS.....etc)
If you know whether there is an article in one of the PCLinux magazines then I could read it myself.
Thank you
« Last Edit: June 09, 2012, 07:34:09 AM by linuxist »

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6467
  • I'm going South
Re: How do I mount a slave hard drive?
« Reply #1 on: June 04, 2012, 06:10:45 AM »
So you have already installed the drive and it is recognized by the system as /dev/sdb?

Now you have to create one or several partitions on it and format them. (The partitions are, sort of, virtual disk drives but, unlike Windows, Linux doesn't call them C or D or E.) You may only need one. Having several means less economical use of the disk space.

To create and format the partition(s) you could use a graphical partition manager like GParted, or the KDE partitioon manager, or the default Diskdrake (which is started from PCC -- "Configure Your Computer").

Unless you have special needs, you should probably format the partition(s) with the default ext4 filesystem -- if you aren't dual-booting Windows and Linux and some part of your Linux drive must be accessible from Windows.

Make doubly sure that any partition you format is on the right drive! If you accidentally reformat a partition on your main drive, it means that you erase everything on it.

Letting the partition manager label the partition(s) is also a good idea.

But then you come to the actual mounting. In Linux all normal partitions are mounted so that they become parts the normal Linux file hierarchy. No C, D, E or F here. You are the one that decides what they are to be known as: what the mountpoint is going to be.

The system can automatically or semi-automatically create mountpoints for removable media under /media (where "/" stands for the system-wide root folder and "media" is a subdirectory immediately under it.) If you have given a partition a label, that partition will this way be mounted as /media/<label> if you click its name in the places panel in a file manager that has a places panel or if you install a widget that handles the mounting entirely automatically. If you haven't given it a label the system will give the mountpoint a more nondescript name.

But in your case we are talking about a permanently installed drive, and that means that it should probably be mounted at boot. A line in the file /etc/fstab should tell the system where and how it should be mounted.

Now, the mountpoint is just an ordinary directory where you decide you want to see the contents of your partition. So first you must decide where you want to mount it, so that /etc/fstab can be edited and the mountpoint created, either manually (which we can help you with) or by the partition manager. (And that mountpoint should not be under /media.) What are you going to use the partition for? How large is your disk? Should it be accessible by everyone?
« Last Edit: June 04, 2012, 08:00:36 AM by Bald Brick »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline linuxist

  • Full Member
  • ***
  • Posts: 64
Re: How do I mount a slave hard drive?
« Reply #2 on: June 04, 2012, 07:51:18 AM »
Thanks for your quick reply. Before I proceed here's the answers to your questions:
(1) I'll use the slave only for storing office documents, pdf, a few mp3's, etc (So, I only want one partition)
(2) The primary drive (operating system) is 10gb, Slave is 20gb
(3) Just me to access
Reason for adding slave: The system crashed. Although I recovered it I now want to put everything on the slave and use the primary drive only for the operating system.
Thanks for your help

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11034
  • MLUs Forever!
Re: How do I mount a slave hard drive?
« Reply #3 on: June 04, 2012, 08:01:13 AM »
I would use the 20GB drive for the operating system and the 10GB drive for data.
MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline linuxist

  • Full Member
  • ***
  • Posts: 64
Re: How do I mount a slave hard drive?
« Reply #4 on: June 04, 2012, 08:15:50 AM »
Thanks for your suggestion. I would like to get all my info off the primary drive first. Then I could install X11 onto a larger hard drive later. Does that make sense? Please remember I'm a newbie - very willing to learn.

Offline linuxist

  • Full Member
  • ***
  • Posts: 64
Re: How do I mount a slave hard drive?
« Reply #5 on: June 04, 2012, 08:31:35 AM »
Thanks Bald Brick. Progress so far . . .
The second drive is now all Ext4
I entered... /etc/fstab (as you instructed)
Warning message appeared 'Now format partition sdb1 otherwise no entry for mount point'
The drive appears in the left hand pane - 'mounted' (in PCManFM)
There are numerous folders on the second drive: bin, boot, dev, etc, home (and others)...Is that ok or have I done something wrong?
Thanks

Offline linuxist

  • Full Member
  • ***
  • Posts: 64
Re: How do I mount a slave hard drive?
« Reply #6 on: June 04, 2012, 08:38:05 AM »
Sorry Bald Brick. . to avoid any confusion. .  The second drive previously had PCLOS Linux KDE operating system installed on it.
Also, as I mentioned previously, the drive appears in the left hand pane 'mounted'
But it is /media/disk.
« Last Edit: June 04, 2012, 09:18:10 AM by linuxist »

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6467
  • I'm going South
Re: How do I mount a slave hard drive?
« Reply #7 on: June 04, 2012, 09:48:49 AM »
Thanks Bald Brick. Progress so far . . .
The second drive is now all Ext4
I entered... /etc/fstab (as you instructed)
Warning message appeared 'Now format partition sdb1 otherwise no entry for mount point'
The drive appears in the left hand pane - 'mounted' (in PCManFM)
There are numerous folders on the second drive: bin, boot, dev, etc, home (and others)...Is that ok or have I done something wrong?
Thanks

Quote
Sorry Bald Brick. . to avoid any confusion. .  The second drive previously had PCLOS Linux KDE operating system installed on it.
Also, as I mentioned previously, the drive appears in the left hand pane 'mounted'
But it is /media/disk.

Not so fast, not so fast!

I have no idea what you've actually done. Nothing really wrong, I suppose, but possibly a few things in the wrong order....

First, the folders on your second drive: I suspect they are really remnants of your old KDE install, which would indicate that you just marked the partition to be formatted as ext4 but never actually did the formatting. The drive was probably formatted as ext4 even when you used it for KDE. (Or else it's the wrong drive.)

And what did you mean by
Quote
I entered... /etc/fstab (as you instructed)?

I just told you that /etc/fstab needed an additional line, I never got around to what the line should look like or whether we should add it manually or not. I thought that was to be the subject of my next post.

But first: which partition manager did you use, and precisely what have you done so far? We can do this step by step, but first I'd have to know precisely where we stand now.





« Last Edit: June 04, 2012, 10:00:53 AM by Bald Brick »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline linuxist

  • Full Member
  • ***
  • Posts: 64
Re: How do I mount a slave hard drive?
« Reply #8 on: June 04, 2012, 12:27:27 PM »
I used PCLinuxOS Control Centre. Clicked on 'Local Disks'. Clicked on 'Manage Disk Partitions'. Clicked on 'sdb' tab.
I'm not exactly sure of the sequence of my next steps (except that I did type /etc/fstab in one of the boxes which I thought was asking for a mount point).
Here is the info when I click on the box 'Ext4'
Here is info in the details box:
Device: sdb

Size: 18GB

Geometry: 2434 cylinders, 255 heads, 63 sectors

Name: Seagate Technology 20011A

Medium type: hd

Partition table type: table::dos

on channel 0 id 1'
Then, when I click on the long oblong box above the boxes 'Ext4', 'XFS', 'Swap', 'Windows', 'Other', 'Empty'
this info appears in the details box:
Device: sdb1

UUID: 60bba1f9-b55c-4201-9f79-943da75b6294

Type: Journalised FS: ext4 (0x83)

Start: sector 63

Size: 18GB (99%), 39102273 sectors

Cylinder 0 to 2434

Mounted

The long oblong box is 100% coloured red - the same colour as the box 'Ext4'
The long oblong box does not contain any text
I now wait for your next step please. Sorry for being too hasty. I appreciate your help.

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6467
  • I'm going South
Re: How do I mount a slave hard drive?
« Reply #9 on: June 04, 2012, 01:28:15 PM »
I used PCLinuxOS Control Centre. Clicked on 'Local Disks'. Clicked on 'Manage Disk Partitions'. Clicked on 'sdb' tab.
I'm not exactly sure of the sequence of my next steps (except that I did type /etc/fstab in one of the boxes which I thought was asking for a mount point).

Ah, I probably confused you.

A mountpoint has to be a folder (a.k.a. a directory). /etc/fstab is an ordinary text file. You can't use it as a mountpoint:  fstab tells the system where and how to mount your partitions; i.e. it just contains information about your mountpoints -- and that info you can edit.

Quote
Here is the info when I click on the box 'Ext4'
Here is info in the details box:
Device: sdb

Size: 18GB

Geometry: 2434 cylinders, 255 heads, 63 sectors

Name: Seagate Technology 20011A

Medium type: hd

Partition table type: table::dos

on channel 0 id 1'
Then, when I click on the long oblong box above the boxes 'Ext4', 'XFS', 'Swap', 'Windows', 'Other', 'Empty'
this info appears in the details box:
Device: sdb1

UUID: 60bba1f9-b55c-4201-9f79-943da75b6294

Type: Journalised FS: ext4 (0x83)

Start: sector 63

Size: 18GB (99%), 39102273 sectors

Cylinder 0 to 2434

Mounted

The long oblong box is 100% coloured red - the same colour as the box 'Ext4'

From this we can conclude that you are using Diskdrake. The red colour means that the partition is formatted as ext4, or at least that you have marked it to be formatted as an ext filesystem.

Quote
The long oblong box does not contain any text

And the partition sdb1 seems to be formatted and mounted. But is it formatted as ext4 because you have just formatted it or because it had an ext4 filesystem when you installed it? Interestingly the warning message you quoted earlier ('Now format partition sdb1 otherwise no entry for mount point') would normally indicate that you have not formatted it sdb1.

I have to run out for half an hour or an hour. But I'll be back soon.

Quote
I now wait for your next step please. Sorry for being too hasty. I appreciate your help.
« Last Edit: June 04, 2012, 01:54:16 PM by Bald Brick »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline linuxist

  • Full Member
  • ***
  • Posts: 64
Re: How do I mount a slave hard drive?
« Reply #10 on: June 04, 2012, 02:19:44 PM »
Hmmm... I hope this is a sensible answer. The long oblong box was not 100% red the first time I viewed it. The first time I clicked on sdb tab I then clicked on 'clear all' & clicked on 'Empty' (but I can't remember the sequence - sorry). I also clicked on 'Done'. The long oblong box was, at some point, 100% white after clicking on 'Empty'. When I clicked on 'Ext4' I had the option to increase the size of 'Ext4'. I increased it to the max size (from approx 6gb).The long oblong box is now 100% red and does not have any text.
Am I correct in assuming I have not formatted the drive because some folders are still on it? In any case I don't know how to format it using PCLinux. Also, I don't know how to, nor do I remember, doing anything to add the '1' after 'sdb'


« Last Edit: June 04, 2012, 02:45:24 PM by linuxist »

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6224
  • I don't do Windows
Re: How do I mount a slave hard drive?
« Reply #11 on: June 04, 2012, 03:16:14 PM »

The first time I clicked on sdb tab I then clicked on 'clear all' & clicked on 'Empty' (but I can't remember the sequence - sorry).


If I remember correctly, once you clear all the partitions on sdb, you have to reboot for it to take effect, even though no message says so. If you had cleared all the partitions, the drive would be completely blank until you manually recover the partitions, using testdisk or another tool.


Am I correct in assuming I have not formatted the drive because some folders are still on it? In any case I don't know how to format it using PCLinux. Also, I don't know how to, nor do I remember, doing anything to add the '1' after 'sdb'


Yes, you are. If you had reformatted the partition(s) on the drive, you would see no data at all, except for a lost + found folder. If you want to clear the partitions, you can do so using PCC, just like you did before. Select each partition, one at a time, and click delete. Or, select clear all, like you did before. With either method, after you've reached the end of the process, reboot and re-examine the sdb hard drive. Bald Brick can guide you through the rest.

I would seriously consider Just18's suggestion to make the 20GB hard drive the boot/system drive.
Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378

Offline Tony

  • Hero Member
  • *****
  • Posts: 1769
  • naturam expelles furca, tamen usque recurret
Re: How do I mount a slave hard drive?
« Reply #12 on: June 04, 2012, 03:42:49 PM »
I'm not sure if I missed some info, but a 'Slave' Drive must have the 'Jumper' (Plastic block=switch) set at the rear of the the Drive, generally on the Left of the Data Cable; as per a diagram stating position of that switch / or Jumper as i call it, to make the Slave Drive a Slave.

Same with A Master Drive. Must be checked that it is set as a Master.

You may need to check that config on the two Drives.
I read most of what has been said, thought best to say something now, before you proceed. If that's already understood, please excuse.  ;)
 
And yes I agree seems a better idea linuxist to use the 20GB Drive, (boot/system) as your PCLinuxOS Installation, and the 10 GB as a storage Drive.
PCLOS *MiniMe 2013 - KDE 4.10.1 + *LDXE Full  Computing is Fun with Linux, mostly ;) *Software Updates

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6467
  • I'm going South
Re: How do I mount a slave hard drive?
« Reply #13 on: June 04, 2012, 03:46:56 PM »
Hmmm... I hope this is a sensible answer. The long oblong box was not 100% red the first time I viewed it. The first time I clicked on sdb tab I then clicked on 'clear all' & clicked on 'Empty' (but I can't remember the sequence - sorry). I also clicked on 'Done'. The long oblong box was, at some point, 100% white after clicking on 'Empty'. When I clicked on 'Ext4' I had the option to increase the size of 'Ext4'. I increased it to the max size (from approx 6gb).The long oblong box is now 100% red and does not have any text.
Am I correct in assuming I have not formatted the drive because some folders are still on it? In any case I don't know how to format it using PCLinux. Also, I don't know how to, nor do I remember, doing anything to add the '1' after 'sdb'




sdb is the drive. sdb1 is the first (or possibly only) partition on it. To format a partition you just have to click the "Format" button on the right side of the window.

I'd be a bit more wordy, but writing my answer to your last post I think I stumbled upon an anomaly in how either Diskdrake or the system itself works, so I need some time for experimenting.

And although my respect for Just18, djohnston and Abraxas knows no bounds, I would not make the 20GB hard drive the system drive. I wouldn't make it just a data drive either. I'd make it (or most of it) the home partition.

10GB is more than enough for a working system (unless you are a hoarder like me, who has to try everything). But even if office files don't take up much space I always seem to run out of space for my data. (But then, of course, I hoard some full-length films too.)

Anyway, if you have lots of disk space, separating your data from the configuration files in your home directory makes a lot of sense. If you don't, it doesn't.


« Last Edit: June 04, 2012, 03:55:25 PM by Bald Brick »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline linuxist

  • Full Member
  • ***
  • Posts: 64
Re: How do I mount a slave hard drive?
« Reply #14 on: June 04, 2012, 03:47:52 PM »
Thank you Abraxas. Yep, I confirm jumpers are set correctly for the master and the slave. Thanks for your reminder.