LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   weird mount problem (https://www.linuxquestions.org/questions/debian-26/weird-mount-problem-113995/)

scarr3d 11-09-2003 12:29 AM

weird mount problem
 
i'm having problems mounting my partitions in Debian. see the output below:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
#/dev/sda1 /boot ext3 defaults 1 2
#/dev/sda2 /usr ext3 defaults 1 2
#/dev/sda3 /home ext3 defaults 1 2
#/dev/sda5 /var ext3 defaults 1 2
/dev/sda6 / ext3 errors=remount-ro 0 1
/dev/sda7 none swap sw 0 0
proc /proc proc defaults 0 0
/dev/fd0 /floppy auto user,noauto 0 0
/dev/cdrom /cdrom iso9660 ro,user,noauto 0 0
/dev/md0 /RAID ext3 defaults 1 2

BENT00:/# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda6 486M 378M 83M 82% /
/dev/md0 135G 78G 55G 59% /RAID

BENT00:/# ls /home/
jared stevem

BENT00:/# mount -t ext3 /dev/sda3 /home

BENT00:/# ls /home/
lost+found

BENT00:/# find / -name lost*found -print
/home/lost+found

BENT00:/# umount /home/

BENT00:/# ls /home/
jared stevem



whenever i mount a partition, such as /usr /home /var, it mounts to some strange place with the "lost+found" directory in it and nothing else. i can copy files and use the partitions fine unmounted. but they are filling up the / partition.

i'm new to Debian. i came from a FreeBSD and RedHat background. did i partition the disk improperly?

scarr3d 11-09-2003 04:50 AM

:)

fixed it with this:

mkdir /temp_usr
mount /dev/sda2 /temp_usr
cp -r /usr/* /temp_usr/
umount /temp_usr
mount /dev/sda2 /usr
rm -rf /temp_usr

but why did this happen. hmmm...

hw-tph 11-09-2003 06:58 AM

Your fstab looks a bit weird - there are many lines that are commented out and will not be read:
#/dev/sda1 /boot ext3 defaults 1 2
#/dev/sda2 /usr ext3 defaults 1 2
#/dev/sda3 /home ext3 defaults 1 2
#/dev/sda5 /var ext3 defaults 1 2

This means that these partitions will not be mounted automatically. So if you have booted with this configuration you will have your home directories in /home on the root partition instead of on /dev/sda3. When you mount /dev/sda3 to /home, your files residing in that directory (the /home on the root partition) will become inaccessible since you have used that dir as a mountpoint. They will still be there on the root partition but /home displays the /dev/sda3 file system.

I hope that made some sense, but I'm not sure it did. :)

You could create a temporary mountpoint for /dev/sda3 - say /mnt/tmp_home - and mount it there, copy over the files (as in your second post) from your old /home (on the root partition), and when you're done, unmount /dev/sda3 and mount it as described in your fstab. Uncomment the /dev/sda3 line in fstab and next time you boot your homes should reside on /dev/sda3.

The same applies to all the other disabled lines in /etc/fstab, I just used your /dev/sda3 (/home) partition as an example.

Håkan

scarr3d 11-09-2003 07:13 AM

thanks for the reply.

i had those commented out of fstab because they were not working. everything's cool now.


All times are GMT -5. The time now is 03:56 AM.