PDA

View Full Version : Mount internal hd



Zwikirsch
10th August 2008, 08:51 AM
I messed up bad. Upgraded from fc5 to fc9. Not good, most everything didn't work, so I installed a 60 gb hd and did a fresh install. I then plugged my 250 gb in to access all my data, but I can't find it. It is listed in the bios, and I can find info in dev/disk/by-id, but I have no idea how to access it. The 60 gb is listed in fstab by its id number, can I add the id number of 250 gb to access it?

ivancat
10th August 2008, 10:39 AM
please post output from

fdisk -l

Zwikirsch
10th August 2008, 07:24 PM
bash: fdisk: command not found

forkbomb
10th August 2008, 07:49 PM
su -
[password]
fdisk -l

or give the full path:
/sbin/fdisk -l

Zwikirsch
10th August 2008, 08:52 PM
Disk /dev/sda: 61.4 GB, 61492838400 bytes
255 heads, 63 sectors/track, 7476 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000482e2

Device Boot Start End Blocks Id System
/dev/sda1 * 1 25 200781 83 Linux
/dev/sda2 26 7476 59850157+ 8e Linux LVM

Disk /dev/sdb: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000ee56d

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 13 104391 83 Linux
/dev/sdb2 14 30515 245007315 8e Linux LVM

Disk /dev/dm-0: 59.1 GB, 59156463616 bytes
255 heads, 63 sectors/track, 7192 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 2080 MB, 2080374784 bytes
255 heads, 63 sectors/track, 252 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x30307800

Disk /dev/dm-1 doesn't contain a valid partition table

Zwikirsch
11th August 2008, 04:49 AM
if I try mount sdb2, I get: mount: can't find sdb2 in /etc/fstab or /etc/mtab, so my question is, can i add the id number to fstab or use sdb2, and where should it go?

forkbomb
11th August 2008, 06:13 AM
if I try mount sdb2, I get: mount: can't find sdb2 in /etc/fstab or /etc/mtab, so my question is, can i add the id number to fstab or use sdb2, and where should it go?
The general form for mounting follows:

mount -t <type> -o <options> <device node> <mount point>
As a rule, at the very least, you need to give the device node and mount point. Linux is usually smart enough to determine -t and the default mount options are often fine for many situations.

A mount point is simply a directory. My guess is you weren't giving a mount point in your mount command. (Also, I'm not too familiar with LVM, so I don't know if you'll want to be mounting sdb2 or sdb1.)

Try:

su -
mkdir /mnt/point
mount /dev/sdb2 /mnt/point


Substitute in the mount point you want to use instead of /mnt/point.

If you're getting the "can't find sdb2 in /etc/fstab or /etc/mtab" that means you haven't given sufficient arguments to do a manual mount.

What exactly do you mean by "ID?" /dev/sdb2 or the UID of the disk/partition?

Also, please show


cat /etc/fstab

Zwikirsch
11th August 2008, 06:30 AM
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
UUID=331b08f1-dadb-4c58-982d-a76db64ecad0 /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0

Zwikirsch
11th August 2008, 06:34 AM
here is my fstab. the 60 gb is listed by UUID, not sda

/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
UUID=331b08f1-dadb-4c58-982d-a76db64ecad0 /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0

algej
11th August 2008, 02:54 PM
Your /dev/sdb2 partition is an LVM physical volume. You'll have to activate the LVM volume group on that drive, and resolve any naming collisions if you have them, in order to make it available for mounting.

Run the following:

su -
vgchange -a y
vgscan --mknodes
and post the output from:

vgdisplay
pvdisplay
lvdisplay --maps

Zwikirsch
11th August 2008, 07:04 PM
all say command not found

algej
11th August 2008, 08:52 PM
all say command not found

They aren't missing from your system - your current root filesystem is a logical volume and you would be unable to boot if LVM was missing. (it would barf in rc.sysinit for starters)

Did you run "su -" first?

vgscan and vgchange are in /sbin.

vgdisplay, pvdisplay, and lvdisplay are in /usr/sbin (Fedora 8) or /sbin (Fedora 9).

Zwikirsch
12th August 2008, 07:07 AM
yes, I am running su first. I tried switching to sbin and still not found, tried cd to root, command not found

forkbomb
12th August 2008, 02:53 PM
su -

not


su

algej
12th August 2008, 06:04 PM
I suppose it's possible you managed to install your system without the userland LVM tools. Given that you're using LVM, I have no idea how you could have done that, but try:

/usr/bin/yum install lvm2

Then see if you can find them.

Zwikirsch
13th August 2008, 07:04 AM
Package lvm2-2.02.33-11.fc9.x86_64 already installed and latest version

algej
13th August 2008, 03:06 PM
Package lvm2-2.02.33-11.fc9.x86_64 already installed and latest version

In which case I was right the first time.

Obviously, you've either failed to run su with the hyphen "su -", or you've done something to screw up root's path. The commands you've been given work correctly on a system that's been installed with default choices.

Look again at the third post back on page 1, where tjvanwyk instructed you on how to run fdisk -l. The same thing applies to the LVM commands, e.g. /sbin/vgchange -a y

Zwikirsch
14th August 2008, 06:53 AM
WARNING: Duplicate VG name VolGroup00: Existing Y7oSb9-fSVl-S4v6-7ZPq-Toq3-nwCe-8siLGe (created here) takes precedence over 8IR2Zf-UbyQ-wPiB-Uy8f-tbRA-063J-5Mw3Yq
--- Volume group ---
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 233.66 GB
PE Size 32.00 MB
Total PE 7477
Alloc PE / Size 7476 / 233.62 GB
Free PE / Size 1 / 32.00 MB
VG UUID 8IR2Zf-UbyQ-wPiB-Uy8f-tbRA-063J-5Mw3Yq

--- Volume group ---
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 57.06 GB
PE Size 32.00 MB
Total PE 1826
Alloc PE / Size 1825 / 57.03 GB
Free PE / Size 1 / 32.00 MB
VG UUID Y7oSb9-fSVl-S4v6-7ZPq-Toq3-nwCe-8siLGe

Zwikirsch
14th August 2008, 06:54 AM
WARNING: Duplicate VG name VolGroup00: Existing Y7oSb9-fSVl-S4v6-7ZPq-Toq3-nwCe-8siLGe (created here) takes precedence over 8IR2Zf-UbyQ-wPiB-Uy8f-tbRA-063J-5Mw3Yq
--- Physical volume ---
PV Name /dev/sdb2
VG Name VolGroup00
PV Size 233.66 GB / not usable 979.00 KB
Allocatable yes
PE Size (KByte) 32768
Total PE 7477
Free PE 1
Allocated PE 7476
PV UUID 6bREBb-Vf1G-TjuZ-bl4f-Rv9x-NbpI-dtHbp5

--- Physical volume ---
PV Name /dev/sda2
VG Name VolGroup00
PV Size 57.08 GB / not usable 15.42 MB
Allocatable yes
PE Size (KByte) 32768
Total PE 1826
Free PE 1
Allocated PE 1825
PV UUID iHcQG2-d9bB-y9B0-vdlX-JNHB-VbVP-R1QFxf

Zwikirsch
14th August 2008, 06:55 AM
WARNING: Duplicate VG name VolGroup00: Existing Y7oSb9-fSVl-S4v6-7ZPq-Toq3-nwCe-8siLGe (created here) takes precedence over 8IR2Zf-UbyQ-wPiB-Uy8f-tbRA-063J-5Mw3Yq
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID dbadwi-dtfR-KpdM-G4il-Xpny-s18r-C1mSaF
LV Write Access read/write
LV Status available
# open 1
LV Size 55.09 GB
Current LE 1763
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0

--- Segments ---
Logical extent 0 to 1762:
Type linear
Physical volume /dev/sda2
Physical extents 0 to 1762


--- Logical volume ---
LV Name /dev/VolGroup00/LogVol01
VG Name VolGroup00
LV UUID tAHVPG-XpNo-GRXe-WyBy-Kaud-QS7y-gp0nlT
LV Write Access read/write
LV Status available
# open 1
LV Size 1.94 GB
Current LE 62
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1

--- Segments ---
Logical extent 0 to 61:
Type linear
Physical volume /dev/sda2
Physical extents 1763 to 1824

algej
14th August 2008, 02:59 PM
You have two volume groups, both named "VolGroup00". You must rename one of them in order for the system to access both of them. Run the following two commands to rename the one on sdb2 and mount it to /mnt.


/sbin/vgrename 8IR2Zf-UbyQ-wPiB-Uy8f-tbRA-063J-5Mw3Yq VolGroup01
/bin/mount -t ext3 /dev/VolGroup01/LogVol00 /mnt

Everything on sdb2 will be under /mnt, e.g. your old home directory will be under /mnt/home.

Zwikirsch
14th August 2008, 06:41 PM
Thanks so much for your help and sticking with me. I have things back now...