LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Moved /home can't mount reiserfs (https://www.linuxquestions.org/questions/linux-hardware-18/moved-home-cant-mount-reiserfs-368494/)

Sigkill(9) 09-30-2005 11:22 AM

Moved /home can't mount reiserfs
 
I recently moved my fc4 wemail server from a 9G to a 250G HD
I created a new partition for /home then cp -ax /home to the new partition on /dev/hda4

Now I would like to mount /dev/hda4 to the new home.
After reboot it's just not working.


/etc/fstab follows:


LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda3 swap swap defaults 0 0
/dev/hda4 /home reiserfs defaults 1 3
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0


Thank you in advance

jailbait 09-30-2005 11:48 AM

"Now I would like to mount /dev/hda4 to the new home.
After reboot it's just not working."

What error messages or error indications are you getting?

----------------------------
Steve Stites

-X- 09-30-2005 11:49 AM

I'm guessing you make a temporary directory to mount /dev/hda4 on before you performed the cp. After you did the cp, did you check it?

Sigkill(9) 09-30-2005 01:34 PM

Yes. I did the temp mount to do the cp.

There is no error.

The original /home is there still.

Must I remove it and recreate it?

Sigkill(9) 09-30-2005 01:38 PM

Maybe this will illustrate the problem better.

The old /home is on /dev/hda2

df -h /home
Filesystem Size Used Avail Use% Mounted on
/dev/hda2 8.4G 6.3G 1.7G 80% /


I can manually mount it:

df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda2 8.4G 6.3G 1.7G 80% /
/dev/hda4 225G 722M 224G 1% /mnt

anomie 09-30-2005 02:00 PM

I may be missing something obvious, but how about:
  • Get to runlevel 3 so you can log in directly as root in text mode (so that you're not using files in /home).
  • Create a new directory, say, /new-home.
  • Mount /dev/hda4 to /new-home.
  • Copy the /home directory contents to /new-home (remembering to preserve permissions and whatever else you need to do).
  • Rename /home to /home-old, and rename /new-home to /home.
  • Make sure your /etc/fstab reflects the changes.

-X- 09-30-2005 02:01 PM

Something doesn't seem right. You show the same thing in;
df -h /home
as;
df -h
Where just df -h /home should just show what *Used* is there.
As root do;
# du -sh /home

Not sure what you have, but some distros make other directories inside /mnt, so in that case you would need to mkdir /mnt/tmp && cp -ar /home /mnt/tmp as root.

Let's see what you have.

-X- 09-30-2005 02:13 PM

anomie, yeah, that's pretty much it.

Sigkill(9) 09-30-2005 02:20 PM

Here's what I did:

init 1

mount -t reiserfs /dev/hda4 /mnt
cd /home
cp -avx * /mnt
cd /
mv /home /home.old
mkdir /home


#added the following line to /etc/fstab

/dev/hda4 /home reiserfs defaults 1 3

reboot

after rebooting /dev/hda4 is not mounted /home

** I have to manually mount it since it's the prod webserver**

-X- 09-30-2005 02:25 PM

You say you "Added line.. " Real stupid question here..... you did remove the old entry. I say that since you said "Added" rather than "Change".

And every thing is there when you manually mount it?

Sigkill(9) 09-30-2005 02:33 PM

There were no references to /home in the fstab.

The old admin installed it had home and all else on the same slice.

/dev/hda2 8704716 6540460 1722068 80% /

-X- 09-30-2005 02:35 PM

okay, got it.
hmmm... seem strange.
thinking......

Sigkill(9) 09-30-2005 02:40 PM

During boot I noticed this error of which references an entry in the fstab

LABEL=/boot duplicate - not mounted

If an error occurs in the fstab during boot does *nix continue to load the following entries or abort the whole thing?

-X- 09-30-2005 02:41 PM

What does fdisk -l show?

Sigkill(9) 09-30-2005 02:48 PM

[root@webmail root]# fdisk -l

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

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 1114 8843782+ 83 Linux
/dev/hda3 1115 1244 1044225 82 Linux swap
/dev/hda4 1245 30515 235119307+ 83 Linux

-X- 09-30-2005 03:12 PM

ya know. this should be easy. I'm missing something.

When you say you "moved" the webserver, how did you do that. dd it over, or what? I still have a question about my post #7.

Sigkill(9) 09-30-2005 03:28 PM

I guess I left that part out.

I did this:

dcfldd if=/dev/hda of=/dev/hdb bs=4096 conv=notrunc,noerror

everything is there and works when I manually mount /home after boot.

-X- 09-30-2005 04:12 PM

okay, I'm going to take a long shot. Since it isn't mounting at boot, but does after boot.... it's something in the initrd (ramdisk) loading the reiserfs modules. There should be a line in the /boot/grub/menu.lst for the kernel you are booting. Should work since it was a mirror image. I'm not up on FC4, but let me look around. I've read something in the past about reiserfs and FC. RH officially supports ext2/3.

Maybe corrupted reiserfs driver file during the dd. // skip that. maybe something pertaining the boot process.

You haven't make any changes to the /boot or /ext files?

-X- 09-30-2005 04:16 PM

Since you have the two drives, any chance you could put the new drive as hda and install new in the partition scheme you want. Then copy /home data from hdb.

Sigkill(9) 09-30-2005 04:26 PM

I dd'd the old drive to the new drive.

Then added /dev/hda4 slice to be the new drive to copy /home to.
The old drive was running out of space.

Sigkill(9) 09-30-2005 04:27 PM

I have two 250GB drives in the machine.

hda and hdb.

I only use hdb for redundancy.

-X- 09-30-2005 04:31 PM

Yes I understand the dd part. I think there's a initrd/module problem not loading the reiserfs modules at boot.

I know you have to do something special to setup reiserfs in FC, don't remember the exact "special".

Anything wrong with ext3? Tests I've performed with reiserfs didn't show anything to get excited about. I've used it before, but have just stuck with ext3. old school stuff, ya know.

Sigkill(9) 09-30-2005 04:48 PM

last minute note here.
I contacted the old admin and come to find out it's not FC4 it's RH9.

Man ... What a drag.

I may have to do this over ... The test box was FC4 so naturally one would think the prod box would be the same.

BTW: I appreciate the all the help too.

Sigkill(9) 09-30-2005 04:53 PM

I guess I could mkfs ext3 /dev/hda4

Then mount /dev/hdb4 and cp home back onto /dev/hda4

anomie 09-30-2005 05:04 PM

Quote:

I contacted the old admin and come to find out it's not FC4 it's RH9.
I know you made this as an OT remark, but in the future if you're ever unsure about what flavor of system you are working on:
Code:

cat /etc/issue
will generally identify it. I think this works on many *nixes.

Sigkill(9) 09-30-2005 05:11 PM

And there it is ...

Another lesson learned.

Though the problem still doesn't make sense regardless of the flavor.

Thanks again for the help folks.

-X- 09-30-2005 05:39 PM

Actually I'm glad you responded back. Some never give the answer or outcome of problems when it's something on the the user's end or not. Leaving the hired help hanging. Just tuck tail and come back with a different username.

I was bored today anyway. :)

Sigkill(9) 10-05-2005 11:27 AM

If anyone is still out there:

I decided to change the reiser slice to ext3 thinking maybe there was a problem in RH9.

adjusted the fstab to read as follows:

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
/dev/hda6 /home ext3 defaults 1 3
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda3 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0


And still /home will not mount on boot.

ronald-be 11-02-2005 12:57 PM

moving /home
 
hello,

Maybe i know what's going on. There are two partitions involved:

/dev/hda2 with mount point /
/dev/hda4 with mount point /home

but actually /home is defined twice :

on /dev/hda2 as a subdirectory of /
on /dev/hda4 as the root-directory

I think the firtst will inhibit the mounting of the second... I noticed u copied the data to the new home. so, first be sure yo have a rescue disk for your distro. Then reboot as usual, do "mv /home /home.old" and reboot again. If your PC locks up, then boot from rescue disk, mount /dev/hda2 manually and restore the old name. Good luck !

greetings,

Ronald


All times are GMT -5. The time now is 06:51 AM.