Upgrading a disk

I’m using openSUSE 11.0. My current hard disk is going bad. So I bought a new 500MB Seagate SATA. The system sees the old disk as sdb and the new disk as sda. I unplugged the old disk (sdb) and formatted the new disk with partitions

Primary sda1 10GB /
Primary sda2 10GB (spare)
Primary sda3 10GB (spare)
Extended sda4 435.7GB
Linux Swap sda5 1.7GB
Linux Native sda6 434.0GB /home

This gives me a completely new installation of 11.0 on the new disk (which I wanted). I unplug the new disk and plugin the old disk. All I want off the old disk is parts of my old /home/stu directory including .mozilla and .thunderbird. So I copy the required parts to CD’s. I unplug the old disk and plugin the new disk. I copy the data to /home/stu. I discovered that the data went to sda1/home/stu instead of sda6/home/stu. So my questions are…

  1. Am I doing this the right way?
  2. Why is my system using the home folder on sda1 (/) instead of sda6 (/home)?
  3. How to fix this so that /home is on sda6?

Also, the system doesn’t seem to want to copy my .mozilla and .thunderbird folders from my CD’s.

  1. Why?
  2. How to get it to copy?

Any suggestions are welcome.

stu

Using KDE 3.5

The fact that you created the partitions does not mean you can assume SUSE will know what your plans are. You need to use the custom partitioner during setup to assign partitions accordingly. It’s almost like partitioning all over again.
Get the install done.
Once up and running, pop the cd in and copy the data to your /home/*user/.

This is exactly what I did the first time. Now I need to know how to correct it.

When you open your file manager how many “/home/stu/” folders do you see?
What makes you think “/home/…” is on sda1 if you created it on sda6?

I have 2. 1 on sda1 and 1 on sda6. I know that the system is reading sda1 because a) When I copied my datafiles to /home/stu they went to sda1, and b) when I tried to send sda1/home/stu to the Trashcan, it wiped out my desktop.

This may be contrary to what I’m experiencing, but here is my FSTAB file…

/dev/disk/by-id/scsi-SATA_ST3500418AS_6VM0DZZ8-part5 swap swap defaults 0 0
/dev/disk/by-id/scsi-SATA_ST3500418AS_6VM0DZZ8-part1 / ext3 acl,user_xattr 1 1
/dev/disk/by-id/scsi-SATA_ST3500418AS_6VM0DZZ8-part6 /home ext3 acl,user_xattr 1 2
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0

rgds
stu

What is the state of the mounts? Do:

mount

I bet /home is not mounted. You can also do:

df /home/stu

and it will tell you which partition /home is on.

I don’t see how you can have 2 /home folders - you would get a system error.
Open konqueror (or dolphin or nautilus whatever) and show the folders list. If you have 2 /home folders they’ll be listed one after the other.

Here are the results of mount and df /home/stu

mount
/dev/sda1 on / type ext3 (rw,acl,user_xattr)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
udev on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/sda6 on /home type ext3 (rw,acl,user_xattr)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
securityfs on /sys/kernel/security type securityfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

df /home/stu
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda6 447986872 1258688 423971712 1% /home

Looks ok, right? So then I did a test. I created the folder Test on /home/stu. It created it on both sda1 AND sda6. Then I noticed…

media:/sda1/home/stu/Test
media:/sda6/stu/Test

  1. This surely isn’t correct?
  2. Why is it creating 2 folders?
  3. How to definitetively use /sda6
  4. Why does it wipe out my Desktop when I trash sda1/home/stu

rgds
stu

How do you know that it was created on both partitions? As far as I can see both paths are equivalent. /sda1/home would actually be sda6, since that’s where it’s mounted. And of course stu is in /home which is what sda6 contains. So as far as I can see it was created on sda6.

Seems like it’s just an artifact of you looking at the directory in two views.

I’m not sure I understand what you are saying.

When I copied my /home/stu datafiles off of my CD’s they only copied to /sda1 and not to /sda6.

And secondly, the reason I don’t think my .mozilla and .thunderbird won’t copy is because there is some conflict as to where they should go.

But you just said that you see the new directory Test in both views. So both views are seeing the same home directory, which is really on sda6.

Forget about the media: view for fixed disks. When a partition is mounted on a mount point, it becomes part of the filesystem tree and in normal operation one doesn’t give a dang what the device carrying directory is. media: is really only useful for removable devices.

Your missing dot files is probably something else.

Well this ain’t exactly correct. My 10GB / is sure going to fill up quick when I’m expecting my /home folder to hold up to 434GB.

Maybe I’m wrong, but I don’t recall my /home directory showing up in the root of my last installation.

But your /home is on sda6 now, as the output from df shows. If you create more stuff in /home and then do a df on that, it should report sda6.

If you copied files onto /home before you mounted sda6, then those files would have been obscured by the mount and will reappear when you unmount sda6. This is how mount in Unix works, it’s the responsibility of the admin to mount on empty directories, or accept that what’s already in the directory will be obscured. That’s probably where your missing files went.

Ok. I got my .mozilla and .thunderbird folders copied eventually to my satisfaction. I have no idea why they copied this time around.

Sorry but I’m still not sure what you are saying. I copied these files after sda6 was mounted. Are you saying that they will not be counted towards the MB used on sda1? And that I shouldn’t worry about the /home/stu on /sda1?

I’m still getting some inconsistencies, afaict. Sometimes copies go to both locations, sometimes 1 location. So I’ll keep an eye on that. But I’m confident enough now to use the new install. Just in time too, because the old install was getting very iffy.

rgds
stu

You don’t have two locations, just two views of one location.

I’ll leave it for someone else who can explain better to you the dissonance between your mental model of the setup and the reality.

Well I hope somebody does. because I’m still confused. thank you for your obtuse help, however.

				           / ] <=/dev/sda1
					    |
[bin  boot  dev  etc  home  lib  media  mnt  opt  proc  root  sbin  srv  sys  tmp  usr  var] <=/dev/sda1
			|
		     user] <= /dev/sda6

Now what was explained to you is if /dev/sda6 is not mounted and you copied you would have…

				           / ] <=/dev/sda1
					    |
[bin  boot  dev  etc  home  lib  media  mnt  opt  proc  root  sbin  srv  sys  tmp  usr  var] <=/dev/sda1
			|
		     user] <= /dev/sda1

So as the first one anything you copied as the second way wouldn’t be seen until you un-mounted.