LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Simultaneous access of 2 hard-disks (each having a Linux Distro on it) from the same laptop (https://www.linuxquestions.org/questions/linux-newbie-8/simultaneous-access-of-2-hard-disks-each-having-a-linux-distro-on-it-from-the-same-laptop-835378/)

TheIndependentAquarius 09-30-2010 06:15 AM

Simultaneous access of 2 hard-disks (each having a Linux Distro on it) from the same laptop
 
I have Linux installed on my laptop and now I have installed Linux on my external hard-disk too.

I was planning to use the external harddisk as a backup medium for my data. I was planning to use data synchronization softwares and all that...

Now I have realized when I boot from my external hard-disk I can't see the other hard-disk and vice-versa :banghead:

What is the way out now ?? Help !

quanta 09-30-2010 06:23 AM

Quote:

Originally Posted by anishakaul (Post 4113581)
Now I have realized when I boot from my external hard-disk I can't see the other hard-disk and vice-versa :banghead:

You can't see it from where?

TheIndependentAquarius 09-30-2010 06:25 AM

I meant from the booted external harddisk. Can I see it from there ?

gdejonge 09-30-2010 06:45 AM

Okay, first of all we have to check if both disks are visible to the OS itself.
Check with fdisk -l if the OS sees both disks. If it does, you probably have to mount the other disk manually.

If not check dmesg output for messages about the disks.
Code:

# dmesg | grep [hs]d[ab]
will probably do the trick.
Should give you something like this
Code:

[    1.625227] sd 0:0:0:0: [sda] 234441648 512-byte logical blocks: (120 GB/111 GiB)
[    1.625313] sd 0:0:0:0: [sda] Write Protect is off
[    1.625317] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    1.625353] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    1.625567]  sda: sda1 sda2 sda3
[    1.648211] sd 0:0:0:0: [sda] Attached SCSI disk
[    2.521124] EXT3-fs (sda1): using internal journal
[    2.521131] EXT3-fs (sda1): mounted filesystem with ordered data mode
[    7.156229] sd 3:0:0:0: [sdb] 781422768 512-byte logical blocks: (400 GB/372 GiB)
[    7.156318] sd 3:0:0:0: [sdb] Write Protect is off
[    7.156322] sd 3:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[    7.156360] sd 3:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    7.156590]  sdb: sdb1 sdb2
[    7.162191] sd 3:0:0:0: [sdb] Attached SCSI disk

Check the output for error messages.
And post it here if there are Warning or Error messages.

_____________
Gerrard

TheIndependentAquarius 09-30-2010 08:42 AM

Many thanks to you, gdejonge, See the result below:
What I am supposed to do now ?
Code:

anisha@Eccentric-aquarian ~ $ fdisk -l
anisha@Eccentric-aquarian ~ $ dmesg | grep [hs]d[ab]
[    3.244414] sd 2:0:0:0: [sda] 312581808 512-byte logical blocks: (160 GB/149 GiB)
[    3.244492] sd 2:0:0:0: [sda] Write Protect is off
[    3.244495] sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    3.244525] sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.244760]  sda:
[    3.587812]  sda1 sda2 sda3 < sda5 sda6 >
[    3.626232] sd 2:0:0:0: [sda] Attached SCSI disk
[    7.942557] sd 5:0:0:0: [sdb] 976773167 512-byte logical blocks: (500 GB/465 GiB)
[    7.943052] sd 5:0:0:0: [sdb] Write Protect is off
[    7.943056] sd 5:0:0:0: [sdb] Mode Sense: 1c 00 00 00
[    7.943059] sd 5:0:0:0: [sdb] Assuming drive cache: write through
[    7.944810] sd 5:0:0:0: [sdb] Assuming drive cache: write through
[    7.944816]  sdb: sdb1 sdb2 < sdb5 > sdb3
[    8.031679] sd 5:0:0:0: [sdb] Assuming drive cache: write through
[    8.031684] sd 5:0:0:0: [sdb] Attached SCSI disk
[    8.653140] EXT4-fs (sdb1): mounted filesystem with ordered data mode
[  16.651558] Adding 3998712k swap on /dev/sdb5.  Priority:-1 extents:1 across:3998712k
[  16.665669] Adding 4264952k swap on /dev/sda6.  Priority:-2 extents:1 across:4264952k
[  17.828121] EXT4-fs (sdb3): mounted filesystem with ordered data mode
anisha@Eccentric-aquarian ~ $


tredegar 09-30-2010 09:22 AM

No output from fdisk -l ?
You may need to be root for fdisk -l to work properly

Your OS detects 2 disks /dev/sda and /dev/sdb

/dev/sda has partitions sda1 sda2 sda3 sda5 sda6
/dev/sdb has partitions sdb1 sdb2 sdb3 sdb5
sdb1 and sdb3 are formatted as etx4
sdb5 and sda6 are formatted as swap

mount
will tell you what is currently mounted where (Ie the disk which is mounted at / is currently running your OS)

So you will be able to work out which disk is the other one, and then mount its partitions
with the mount command.

TheIndependentAquarius 09-30-2010 09:25 AM

Many thanks to you tredegar, for the reminder :redface:
Code:

Eccentric-aquarian ~ # fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000f0989

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1        1306    10490413+  83  Linux
/dev/sda2            1307        6528    41945715  83  Linux
/dev/sda3            6529      19458  103853057    5  Extended
/dev/sda5            6529      18927    99587072  83  Linux
/dev/sda6          18927      19458    4264960  82  Linux swap / Solaris

Disk /dev/sdb: 500.1 GB, 500107861504 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0003061f

  Device Boot      Start        End      Blocks  Id  System
/dev/sdb1              1        623    4999168  83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sdb2            623        1121    3998721    5  Extended
/dev/sdb3            1121      60802  479385600  83  Linux
/dev/sdb5            623        1121    3998720  82  Linux swap / Solaris


TheIndependentAquarius 09-30-2010 09:34 AM

mount output:
Code:

Eccentric-aquarian ~ # mount
/dev/sdb1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
/dev/sdb3 on /home type ext4 (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)


gdejonge 09-30-2010 09:40 AM

Okay, I assume that the 160GB disk is the one in your laptop and that you booted off the external disk.

create some directories where you want to mount the partitions of the internal disk. Lets try
mkdir /media/part1
mkdir /media/part2
mkdir /media/part3

Now you can mount the partitions with
mount /dev/sda1 /media/part1
mount /dev/sda2 /media/part2
mount /dev/sda5 /media/part3

Now you should be able to browse through those directories with your favorite filemanager.

__________________
Gerrard

TheIndependentAquarius 09-30-2010 09:56 AM

Thank you :)
 
Many thanks to you, gdejonge :hattip:
It worked and now I can see the data from the laptop harddisk !

Thanks again !
Code:

Eccentric-aquarian media # ls
Eccentric-aquarian media # mkdir part1
Eccentric-aquarian media # mkdir part2
Eccentric-aquarian media # mount /dev/sda1 part1
Eccentric-aquarian media # cd part1
Eccentric-aquarian part1 # ls
bin  boot  dev  etc  home  lib  lost+found  media  mnt  opt  proc  root  sbin  selinux  srv  success  sys  tmp  usr  var
Eccentric-aquarian part1 # cd home/
Eccentric-aquarian home # ls
Eccentric-aquarian home # mount /dev/sda2 /media/part2
Eccentric-aquarian home # cd ..
Eccentric-aquarian part1 # cd ..
Eccentric-aquarian media # cd part2
Eccentric-aquarian part2 # ls
anisha  lost+found
Eccentric-aquarian part2 # cd anisha
Eccentric-aquarian anisha # ls
bin  Comics  cppPrograms  Desktop  Documents  Frm_Reports.aspx  How to install wireless LAN card  Photography  tarballs



All times are GMT -5. The time now is 01:33 AM.