LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 07-11-2011, 01:40 PM   #1
ziphem
Member
 
Registered: Feb 2004
Location: US / EU
Distribution: Fedora 20
Posts: 129

Rep: Reputation: 18
How do I view a mounted cloned hard drive's Linux file system?


I've always had a clone of my primary hard drive sitting in my computer's 'ultrabay.' I also have three partitions - NTFS and FAT32, and the Linux partition. Every night, I do an rsync of my NTFS and FAT32 partitions.

However, I've never been able to backup my Linux (Fedora) partition - but because the Linux partition on the backup hard drive has never been visible. Up to this point, I've been backing up my primary hard drive's /home/username directory to a directory on my backup hard drive's Windows partition.

I'd ultimately like to rsync my primary hard drive's Fedora partition directly with my backup hard drive. However, as mentioned, while I can see the non-Fedora partitions on the backup hard drive, I cannot see the Fedora partitions.

I'd greatly appreciate any guidance as to how to do this - and of course, rsync suggestions are always appreciated.

Thanks a ton!!
 
Old 07-11-2011, 02:39 PM   #2
tlhonmey
LQ Newbie
 
Registered: Nov 2008
Posts: 14

Rep: Reputation: 4
Well, to start with, when you say they don't show up, do you mean that they don't automatically mount? Or that the partitions don't show up in /dev/sd*?


If they're just not automounting, then the solution is to mount them, and then use rsync or whatever other program you like to copy things across.

If they're not showing up, then the most likely explanation is that your "clone" isn't, and something's messed up on the disk. You should be able to fit that with gparted or similar.

If you could clarify with which I am helping you, I'll see what I can do.
 
Old 07-11-2011, 02:40 PM   #3
zer0signal
Member
 
Registered: Oct 2010
Location: Cleveland
Distribution: Slackware, Fedora, RHEL (4,5), LFS 6.7, CentOS
Posts: 258

Rep: Reputation: 29
is your "Fedora Backup Drive" mounted?

if not then

mkdir /mnt/whatever-you-want-to-call-it


then

ls -lrt /dev/sd*

find out which sda,b,c,d is your backupdrive

and

mount /dev/sd"whatever letter, and partition number example: sda1,2 or sdb1,2? is your backup" /mnt/whatever-you-called-it
 
Old 07-11-2011, 04:58 PM   #4
ziphem
Member
 
Registered: Feb 2004
Location: US / EU
Distribution: Fedora 20
Posts: 129

Original Poster
Rep: Reputation: 18
Thanks a ton for the replies.

The backup boots fine, so the drive works. As for mounting, the NTFS and FAT32 partitions do mount.

for ls -lrt /dev/sd*, I get:
brw-rw----. 1 root disk 8, 0 Jul 11 01:49 /dev/sda
brw-rw----. 1 root disk 8, 4 Jul 11 01:49 /dev/sda4
brw-rw----. 1 root disk 8, 1 Jul 11 01:49 /dev/sda1
brw-rw----. 1 root disk 8, 5 Jul 11 01:49 /dev/sda5
brw-rw----. 1 root disk 8, 3 Jul 11 01:49 /dev/sda3
brw-rw----. 1 root disk 8, 16 Jul 11 01:49 /dev/sdb
brw-rw----. 1 root disk 8, 20 Jul 11 01:49 /dev/sdb4
brw-rw----. 1 root disk 8, 6 Jul 11 01:49 /dev/sda6
brw-rw----. 1 root disk 8, 22 Jul 11 01:49 /dev/sdb6
brw-rw----. 1 root disk 8, 19 Jul 11 01:49 /dev/sdb3
brw-rw----. 1 root disk 8, 17 Jul 11 01:49 /dev/sdb1
brw-rw----. 1 root disk 8, 21 Jul 11 01:49 /dev/sdb5
brw-rw----. 1 root disk 8, 2 Jul 11 05:13 /dev/sda2
brw-rw----. 1 root disk 8, 18 Jul 11 05:13 /dev/sdb2

For df, I get:
/dev/mapper/VolGroup-lv_root 51606140 10314500 38670200 22% /
tmpfs 1021772 372 1021400 1% /dev/shm
/dev/sdb5 495844 65372 404872 14% /boot
/dev/mapper/VolGroup-lv_home 217163740 33400164 172732232 17% /home
/dev/sda3 53797288 13263648 40533640 25% /media/SHARED
/dev/sda2 156753916 126998784 29755132 82% /media/SW_Preload
/dev/sdb3 53797288 13257416 40539872 25% /media/SHARED_2
/dev/sdb2 156753916 126999432 29754484 82% /media/SW_Preload_2


The main Linux partition is at sda6 and the backup is at sdb6, so I did the mount /dev/sdb6 /mnt/F14_2, but the following was returned:

mount: unknown filesystem type 'LVM2_member'

What is that warning all about? What can I do to fix this?

Thanks a ton!!

Last edited by ziphem; 07-11-2011 at 04:59 PM.
 
Old 07-11-2011, 07:09 PM   #5
tlhonmey
LQ Newbie
 
Registered: Nov 2008
Posts: 14

Rep: Reputation: 4
It looks like your linux partitions are making use of LVM. That works a little differently.

http://www.linuxquestions.org/questi...member-564880/

The pages linked to in that thread give a decent rundown on how to do it, although I'm not seeing anything that's specific to Fedora 9, so you may have to improvise a bit on some of the names of the commands. You probably won't have to install any packages since it's a clone of your current drive and your machine can read it just fine. The other fellow who actually uses Fedora can probably do a better job of helping you with the specifics if necessary.
 
Old 07-11-2011, 07:44 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,483

Rep: Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077
If Fedora doesn't mount it automagically, it probably means you have the same names for vg/lv on the backup. LVM won't handle that.
You could change the names, but then it wouldn't be a (exact) clone, and for example may not boot because of grub/fstab mismatches (unless you use UUID/label).
Personally I'd just blow that partition away, make it type x83 (mkfs as appropriate) and just fsck to it what I needed.

tldp.org has a good LVM howto, Redhat used to as well. I avoid it where possible.
 
Old 07-13-2011, 01:12 AM   #7
ziphem
Member
 
Registered: Feb 2004
Location: US / EU
Distribution: Fedora 20
Posts: 129

Original Poster
Rep: Reputation: 18
Perfect - that the volumes have the same names is exactly what the issue is. On the next install I will choose something other than LVM, but for the meantime, I suppose it would be easiest to change the name of the backup hard drive. Then, if the primary hard drive fails and I want to use the backup, I can boot with a 3d hard drive I have sitting around (an old Fedora 9) and change the backup hard drive name back to what it was on the first (failed) hard drive to ensure it boots fine.

I saw a summary of how to rename the LVM at http://www.linuxquestions.org/questi...-to-do-375928/ , I'll give it a shot later this week. I'm going to also visit tldp.org like you suggested and see what they have.

Thanks a ton for all the advice.
 
Old 07-13-2011, 02:35 AM   #8
kasl33
Member
 
Registered: Oct 2004
Location: Bremerton, WA
Distribution: Arch, Debian, Ubuntu, Ubuntu-Server, CentOS, OSX Lion
Posts: 352

Rep: Reputation: 47
the MOST USEFUL command I have found for mounting info is as follows (as root or sudo):

blkid
 
Old 07-19-2011, 02:47 AM   #9
ziphem
Member
 
Registered: Feb 2004
Location: US / EU
Distribution: Fedora 20
Posts: 129

Original Poster
Rep: Reputation: 18
Now I have a problem after cloning the LVM and keeping this 2nd disk in the 'ultrabay'; when I boot up, the system automatically now runs off SDB instead of SDA. My system is set to boot off the first hard drive, so first, why is it doing this, and second, what can I do to fix this? My GRUB.Conf is below. What if I unhash "#boot=/dev/sda5" on the 'primary' drive (SDA) - will that fix this - or is there a better way?

Thanks!!

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,4)
# kernel /vmlinuz-version ro root=/dev/mapper/VolGroup-lv_root
# initrd /initrd-[generic-]version.img
#boot=/dev/sda5
default=0
timeout=5
splashimage=(hd0,4)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.35.13-92.fc14.i686.PAE)
root (hd0,4)
kernel /vmlinuz-2.6.35.13-92.fc14.i686.PAE ro root=/dev/mapper/VolGroup-lv_root rd_LVM_LV=VolGroup/lv_root rd_LVM_LV=VolGroup/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet
initrd /initramfs-2.6.35.13-92.fc14.i686.PAE.img
title Fedora (2.6.35.13-91.fc14.i686.PAE)
root (hd0,4)
kernel /vmlinuz-2.6.35.13-91.fc14.i686.PAE ro root=/dev/mapper/VolGroup-lv_root rd_LVM_LV=VolGroup/lv_root rd_LVM_LV=VolGroup/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet
initrd /initramfs-2.6.35.13-91.fc14.i686.PAE.img
title Fedora (2.6.35.12-90.fc14.i686.PAE)
root (hd0,4)
kernel /vmlinuz-2.6.35.12-90.fc14.i686.PAE ro root=/dev/mapper/VolGroup-lv_root rd_LVM_LV=VolGroup/lv_root rd_LVM_LV=VolGroup/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet
initrd /initramfs-2.6.35.12-90.fc14.i686.PAE.img
title Other
rootnoverify (hd0,0)
chainloader +1
 
Old 07-19-2011, 01:59 PM   #10
tlhonmey
LQ Newbie
 
Registered: Nov 2008
Posts: 14

Rep: Reputation: 4
The correct way to do it these days, provided you have a reasonably recent version of grub, is to locate your partitions by filesystem UUID. Otherwise you're likely to run into issues if your devices don't always start up in the same order. I've seen several machines where warm boot vs. cold boot changed the device order. Or where having a USB device plugged in would mess it up.

https://help.ubuntu.com/community/UsingUUID

The easiest way, of course, is to upgrade to GRUB2, which will configure things by UUID automagically. Unfortunately, Fedora is a bit messed up in this regard, and the available packages for GRUB2 will just make your life miserable. So install from source instead. Instructions here: http://blog.fpmurphy.com/2010/06/upg...-to-grub2.html
 
1 members found this post helpful.
Old 07-20-2011, 07:29 PM   #11
ziphem
Member
 
Registered: Feb 2004
Location: US / EU
Distribution: Fedora 20
Posts: 129

Original Poster
Rep: Reputation: 18
Ok thanks a ton for the response. It seems the easiest fix would be to replace with the UUID as you suggested.

So, taking my fstab file:
Code:
#
# /etc/fstab
# Created by anaconda on Tue Jan  4 02:23:00 2011
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/VolGroup-lv_root /                       ext4    defaults        1 1
UUID=dcab4a97-c720-4204-8e8c-28ddb46ca10e /boot                   ext4    defaults        1 2
/dev/mapper/VolGroup-lv_home /home                   ext4    defaults        1 2
/dev/mapper/VolGroup-lv_swap swap                    swap    defaults        0 0
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

If blkid output includes: /dev/mapper/VolGroup-lv_root: UUID="4dd82094-943a-4a2e-aaf6-b7d34a26abf7" TYPE="ext4"

Then I would replace fstab line:
Code:
/dev/mapper/VolGroup-lv_root /                       ext4    defaults        1 1
with:
Code:
UUID=4dd82094-943a-4a2e-aaf6-b7d34a26abf7 /                       ext4    defaults        1 1
Of note, I'm not too sure why, in the fstab as it currently exists, /boot is specified as UUID and the other partitions are not....


I'm also not too clear on how I can implement the UUID changes in Grub.

Thanks a ton for your guidance, I really appreciate it!!

Last edited by ziphem; 07-20-2011 at 07:32 PM.
 
1 members found this post helpful.
Old 07-21-2011, 02:40 PM   #12
tlhonmey
LQ Newbie
 
Registered: Nov 2008
Posts: 14

Rep: Reputation: 4
I am not an expert with GRUB. However, my old machine that I'm currently using uses UUIDs and an old version of GRUB, and instead of a "root (hdx,x)" line, it's got a "uuid <uuid>" line. The kernel parameter is being passed as a
"root=UUID=<uuid>"

GRUB2 has a search function. Put in a "search --no-floppy --fs-uuid --set=root <uuid>" in place of the uuid line. Kernel parameter is the same as GRUB.
 
Old 08-10-2011, 02:13 AM   #13
ziphem
Member
 
Registered: Feb 2004
Location: US / EU
Distribution: Fedora 20
Posts: 129

Original Poster
Rep: Reputation: 18
Ok, so by way of background, I have these two cloned Fedora 14 drives, and am trying to boot with both in the computer - one as primary, and the other as secondary.

On the 'original' drive, I've replaced the entries in FSTAB and GRUB.Conf to use the various UUIDs listed with blkid. On the cloned drive, I changed all UUIDs to make them different from the 'original' drive, and then changed FSTAB and GRUB.Conf accordingly to use those updated UUIDs.

Each drive boots up fine separately, no problem.

When I boot them together, though - meaning booting off the original drive in the main HD bay, with the cloned HD sitting in the computer's ultrabay, I get almost to the end of the boot process, but then get a warning: "no root device found, sleeping forever." And that's it.

I'm glad I got this far, it's great to learn about the Fedora OS. It seems that everything works ok alone, since each drive boots up fine separately. However, what can I do now to make the computer boot up with both HDs inserted in the computer? I feel like I'm almost there - or am I?

My GRUB and FSTAB are included a few posts above, the only changes are specifying UUIDs.

Thanks a ton for any help!!!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SUSE not recognizing cloned hard drive catholiccomposer Linux - Hardware 2 05-05-2009 02:48 PM
What hard drive file system should be used for network drive? Zinake Linux - Server 5 01-23-2008 07:58 AM
puzzling: NIC goes away if I use a cloned hard drive BrianK Linux - Hardware 5 03-12-2007 03:18 AM
Reiser file system / Hard Disk/ Hard Drive Problems Oxyacetylene Linux - Software 4 10-10-2005 03:24 PM
HELP! mounted hard drive's read only system? Devboy Linux - Newbie 8 10-12-2003 08:39 AM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration