Question : untangling external USB mounts Linux

I have a total of six (6) SATA drives now .. four of them I have been swapping in the internal bay of my Gateway MD7818u laptop

http://www.monkeyview.net/id/965/fsck/sfsu/P5120019.vhtml

I have found that having Gentoo in the internal bay

http://www.monkeyview.net/id/965/fsck/xorg_log/P1300122.vhtml

with Ubuntu plugged into an external USB device

http://www.monkeyview.net/id/965/fsck/xorg_log/P1300138.vhtml

(note that above Gentoo is being slid in there.. I am talking about Ubuntu (see below) being slid in there and mounted)

CentOS and Ubuntu:

http://www.monkeyview.net/id/965/fsck/sfsu/P5120018.vhtml

Here is what is going on right now--all five disks plugged in:

http://www.monkeyview.net/id/965/fsck/blob5/p706000201.vhtml

Here's my deal.  You can see some diagnostics I am doing in the code snippet, but what I am search for is a diagnostic that will show me where a disk is mounted.. e.g. it will show me that /dev/sdc5 is mounted on /media/disk-3  (probably not the reality right now)--none of the stuff I have attached is showing me that.  
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
# If your alpha uses the SRM console, set this to "yes".
kayve-gentoo kayve # ls /dev/sd*
/dev/sda   /dev/sda3  /dev/sdb2  /dev/sdc1  /dev/sdc6  /dev/sdd1
/dev/sda1  /dev/sdb   /dev/sdb3  /dev/sdc2  /dev/sdc7  /dev/sdd2
/dev/sda2  /dev/sdb1  /dev/sdc   /dev/sdc5  /dev/sdd   /dev/sde
kayve-gentoo kayve # blkid /dev/sda
kayve-gentoo kayve # blkid /dev/sda1
/dev/sda1: UUID="0d88cd91-2461-4044-a4b1-37845834ae1e" SEC_TYPE="ext2" TYPE="ext3" 
kayve-gentoo kayve # blkid /dev/sdar2
kayve-gentoo kayve # blkid /dev/sda2
/dev/sda2: UUID="28727df1-e782-4865-9d7d-688929d614aa" TYPE="swap" 
kayve-gentoo kayve # blkid /dev/sda3
/dev/sda3: UUID="daca2ee1-21fc-4f12-a5ca-269183d1656c" TYPE="ext3" 
kayve-gentoo kayve # 

kayve-gentoo kayve # fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x6a18e726

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          66      530113+  83  Linux
/dev/sda2              67         198     1060290   82  Linux swap / Solaris
/dev/sda3             199       60801   486793597+  83  Linux

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xbbc99406

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        1306    10485760   27  Unknown
/dev/sdb2   *        1306       31054   238948352    7  HPFS/NTFS
/dev/sdb3           31054       60802   238950400    7  HPFS/NTFS

Disk /dev/sdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x8f800000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1       42261   339457466+  83  Linux
/dev/sdc2           42261       60801   148925985+   5  Extended
/dev/sdc5           59372       60801    11486443+  82  Linux swap / Solaris
/dev/sdc6           42261       58671   131814400   83  Linux
/dev/sdc7           58671       59371     5623808   82  Linux swap / Solaris

Partition table entries are not in disk order

Disk /dev/sdd: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0005cdef

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *           1          13      104391   83  Linux
/dev/sdd2              14       60801   488279610   8e  Linux LVM

Disk /dev/sde: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/sde doesn't contain a valid partition table
kayve-gentoo kayve # man fdisk
Formatting page, please wait...
kayve-gentoo kayve # fdisk -v
fdisk (util-linux-ng 2.16.1)
kayve-gentoo kayve # man fdisk
kayve-gentoo kayve #

Answer : untangling external USB mounts Linux

ok in general:
/dev/sd<XXX>    is a scsi disk (or sata , fiberchannel, iScsi, flash stick) they all behave like a scsi disk.
/dev/sda            is the first disk
/dev/sdb            is the 2nd....

if there is a partition table on a disk then the partitions 1-4 are primary partitions, 5-8 are the extended partitions.

YOU need to known on which disk is WHAT.
Then you can take a not on which UUID belongs to which disk.
based on that you can assign the UUID's in a fstab to get it mounted correctly.

There can be another way, you can assign labels to ext2,3,4 disks those labels will be used when the disk is automounted, as the name of a directory.

My advise: the current disk (active OS) is in /    (say it is the Gentoo disk)
on that disk make an Ubuntu directory, and CentOS on on the root directory of the disk.
Then mount based on UUID the root partitions of those disks on the resp. /Ubuntu /CentOS etc.
Then mount sub partitions as needed on those disks as subdirectories on then ...
(say /boot of Ubuntu -> /Ubuntu/Boot)

That should make them easily distingishable. You need to take care of the level in fstab (pass column).
That should be 0 for /, one for everything below / (f.e. UUID entry for Ubuntu's /) on /Ubuntu during pass1, and /Ubuntu/boot as pass 2... etc



Random Solutions  
 
programming4us programming4us