Announcement

Collapse
No announcement yet.

Second Hard Drive Issues

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Second Hard Drive Issues


    I have managed to install a second hard drive, partition it, and format it. I can mount it to /media/sda1

    I have then run "sudo cp -vax /home /media/sda1"
    This created the file system /media/sda1/home/tim etc etc
    I want to now mount it as /home.

    Unmounted it and added it to /etc/fstab

    When I "sudo mount -a" no programs could find any file system. I quickly removed it from fstab and unmounted it.

    There are two problems I think, one is 3 different places have told me different lines to add to fstab, and the other is I think the file system is wrong, I intended to mount it as /home but the copying copied it into the folder /home, so it would read /home/home/tim when mounted.

    Please could someone tell me, should I delete all of sda1, and run "sudo cp -vax /home/tim /media/sda1"? And what is the correct line to add to my fstab, it is /dev/sda1, to mount as /home and ext3 is the file system.

    Or is there another easier way?

    Please help ^_^

    #2
    Re: Second Hard Drive Issues

    Hate to bump but can anyone help?

    Comment


      #3
      Re: Second Hard Drive Issues

      Can you post the output of:

      Code:
      sudo fdisk -l /dev/sda

      Comment


        #4
        Re: Second Hard Drive Issues

        Disk /dev/sda: 250.0 GB, 250059350016 bytes
        255 heads, 63 sectors/track, 30401 cylinders
        Units = cylinders of 16065 * 512 = 8225280 bytes
        Disk identifier: 0x000a28d3

        Device Boot Start End Blocks Id System
        /dev/sda1 1 30401 244196001 83 Linux


        Comment


          #5
          Re: Second Hard Drive Issues

          Place to start. Now we know it is correctly formatted.

          When you set it up, did you set it up as "/home" or just as "/" ? I think you need to run gParted again and make it "/home". Before doing that, I would suggest you copy your current home directory to a CD or flash drive for backup. Once you renamed that partition, then you should be able to copy all of the files in your current home directory to that partition, remove your current home directory (I suggest just renaming it at this time) and reboot and it should work.

          Comment


            #6
            Re: Second Hard Drive Issues

            gParted? I haven't used that at all, and I shouldn't need to.

            If you mount sda1 and view the folders in there. there is only one called home. It is a complete back up of my home directory, I want to mount this on TOP of my old /home directory, I know its possible, but I don't know what to do.

            Also, my current home dir is over 80gig so I cannot back that up in anyway.

            Comment


              #7
              Re: Second Hard Drive Issues

              You will not be able to re-mount your home directory while you're logged into KDE.
              Log out of KDE, hit ctrl-alt-F1. This should bring you to an old-school text login.
              Login as your user.
              Code:
              sudo umount /home
              sudo mount /dev/sda1 /home
              cd /home/home
              sudo mv * ../
              That should place all your home files where they should be. Now trying unmounting it and then type
              Code:
              sudo mount -a
              .
              If all goes well, your second hard disk should be mounted as home.

              Comment


                #8
                Re: Second Hard Drive Issues

                Ah I see that now.

                Wouldn't I need to add it as a line in fstab for "mount -a" to work?
                I had it in there, but I reverted to my backup so I could use the system. What is the best way to add it to my fstab?

                Also, from the CLI, how do I get back to KDE, is it startx or startkde?

                Comment


                  #9
                  Re: Second Hard Drive Issues

                  Yes, you would have to add the lines back into fstab.

                  Personally, after checking that mount -a worked, I'd reboot the system just to double check.

                  Comment


                    #10
                    Re: Second Hard Drive Issues

                    Okay, but can anyone tell me WHAT line to add to the fstab?

                    Comment


                      #11
                      Re: Second Hard Drive Issues

                      Hate to bump, but can anyone help me with what line to add to my fstab

                      Comment


                        #12
                        Re: Second Hard Drive Issues

                        I did a quick skim of the thread and don't see the needed information. Please open a Konsole window and issue the
                        Code:
                        blkid
                        command, and post the output here.

                        Comment


                          #13
                          Re: Second Hard Drive Issues

                          It only shows up if I "sudo blkid", but never the less:

                          /dev/hda1: UUID="bed45a9f-8146-4bce-a1ea-cbcbe2809b51" SEC_TYPE="ext2" TYPE="ext3"
                          /dev/hda5: TYPE="swap" UUID="16391a9d-7517-4d71-a02d-9a6de083c29c"
                          /dev/sda1: LABEL="Home" UUID="40bd7971-301d-4581-b0e4-410298770d25" SEC_TYPE="ext2" TYPE="ext3"

                          HDA1 is my normal HD, sda1 is the one I will be mounting as home. hda5 is the swap.

                          Comment


                            #14
                            Re: Second Hard Drive Issues

                            OK.

                            I didn't originally catch the part where you want to mount the new drive "as /home" -- I see it now in your original post. While I'm sure it is possible to do this, it's not a great idea, because if anything should go amiss with that drive, your entire Linux filesystem will probably go crash -- the Linux directory structure at the top level is "fixed" -- if it ever tries to boot and finds no "/home" (because of a hard drive issue), you'll have no system at all. It would far better, and more reliable, to link the data on the second drive into the existing /home directory on the first drive.

                            However, if you wish to proceed with your adventure, here's how I would do it:

                            -- The new mount line in /etc/fstab will look like this:

                            Code:
                            UUID=40bd7971-301d-4581-b0e4-410298770d25 /home ext3 defaults,errors=remount-ro 0 2
                            You will have to move all the contents of your existing "/home" directory to this drive, and then remove the existing home directory on hda1. Do that before you try rebooting -- you can't have two directories with the same name. Speaking of which, maybe you could be satisfied with a "/home2" directory -- since that is not a standard Linux directory, it won't carry the same risk of filesystem implosion. If this is an acceptable approach, make a new directory in your root filesystem named "/home2", and then change the name of it in the above /etc/fstab mount line accordingly.

                            HTH

                            Comment


                              #15
                              Re: Second Hard Drive Issues

                              The theory was, once I had moved everything over, I would leave the original /home directory there, so if the second HD failed to mount for any reason, the original one would take its place.

                              Comment

                              Working...
                              X