LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices



Reply
 
Search this Thread
Old 12-11-2008, 04:13 PM   #1
eldondehart
LQ Newbie
 
Registered: Oct 2008
Location: Saint Petersburg ,Florida
Distribution: OpenSuse 10.3 Mandrivia 2009
Posts: 18

Rep: Reputation: 0
Question home directory duplicated


Hello all,
I have opensuse 10.3 and have noticed that there are 2 partitions that have my home directory. Why is this and can it be removed ?

Thanks Eldon
 
Old 12-11-2008, 04:19 PM   #2
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Do you mean there are two separate disk partitions with the same contents? Are they both mounted? Do you have any idea how this cam about?

What do

#mount

and

fdisk -l

show?

Point out the partitions in question.
 
Old 12-11-2008, 05:09 PM   #3
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
Check with the mount command and your /etc/fstab file. It could be that you have the same partition (filesystem) mounted twice on two separate directories. If that is the case, deleting the files on one will delete them on the other since they are actually the same.

If you meant to say two Desktop directories, that can happen if you have a dual head setup with independent displays.
 
Old 12-11-2008, 05:45 PM   #4
helptonewbie
Member
 
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 518

Rep: Reputation: 39
hello,

It might be useful to see the output of the 'df' command plus also "billymayday's" request of fdisk, and i'd probably say post the output of 'cat /etc/fstab'. And also to run an 'ls -ald' on both of the directories (just incase we not talking actual partitions here)... ie

ls -ald /home
ls -ald /home_duplicate

regards
MJ
 
Old 12-11-2008, 06:16 PM   #5
eldondehart
LQ Newbie
 
Registered: Oct 2008
Location: Saint Petersburg ,Florida
Distribution: OpenSuse 10.3 Mandrivia 2009
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jschiwal View Post
Check with the mount command and your /etc/fstab file. It could be that you have the same partition (filesystem) mounted twice on two separate directories. If that is the case, deleting the files on one will delete them on the other since they are actually the same.

If you meant to say two Desktop directories, that can happen if you have a dual head setup with independent displays.

this is done automatically in opensuse and yes it is in fstab as / and /home...
 
Old 12-11-2008, 06:20 PM   #6
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
What is done automatically? Would you like to answer any of the questions you've been asked?
 
Old 12-11-2008, 09:27 PM   #7
eldondehart
LQ Newbie
 
Registered: Oct 2008
Location: Saint Petersburg ,Florida
Distribution: OpenSuse 10.3 Mandrivia 2009
Posts: 18

Original Poster
Rep: Reputation: 0
the fstab entries / and home are done automatically in opensuse and this is where /home is duplicated. sorry for not making this clear. been asleep as I work grave yard so not able to answer till now...
 
Old 12-11-2008, 10:34 PM   #8
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Do you mean you have 2 entries for /home in fstab?

Can you post fstab for us?
 
Old 12-12-2008, 06:44 AM   #9
eldondehart
LQ Newbie
 
Registered: Oct 2008
Location: Saint Petersburg ,Florida
Distribution: OpenSuse 10.3 Mandrivia 2009
Posts: 18

Original Poster
Rep: Reputation: 0
Ok here is my fstab file as it is done with opensuse, I have not modified this at all.


/dev/disk/by-id/scsi-SATA_WDC_WD800BB-00FWD-WCAJ91916769-part2 / ext3 acl,user_xattr 1 1
/dev/disk/by-id/scsi-SATA_WDC_WD800BB-00FWD-WCAJ91916769-part3 /home ext3 acl,user_xattr 1 2
/dev/disk/by-id/scsi-SATA_WDC_WD800BB-00FWD-WCAJ91916769-part1 swap swap defaults 0 0
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
/dev/fd0 /media/floppy auto noauto,user,sync 0 0
/dev/disk/by-id/scsi-SATA_ST310212A_7EG0X816-part1 /sbd ext2 user,noacl,user_xattr 1 2



my home dir is in both / and /home and the / dir is getting full.

Thanks Eldon
 
Old 12-12-2008, 07:01 AM   #10
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
No, you've lost me.

Do you mean that "/" is getting full

Note that *nix uses mount points for partitions, and /home in you setup is a mount point for part3 (I hate the suse naming). I assume that is /dev/sda3 in most distros. "/" itself is on part2.

On many systems, /home is just another directory, but you have a separate partition mounted. Hence if "/" is getting full, it's somewhere else (often /var), but

#df -h

will tell us a lot.

Rgds
 
Old 12-12-2008, 07:11 AM   #11
helptonewbie
Member
 
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 518

Rep: Reputation: 39
If your directories are getting full i also find that something like 'du -h --max-depth=1 /' can be very useful in being a quick way to drill down onto the area where a large amount of data seems to be getting stored. There maybe other ways as well for nistance with the 'find' command you can also search for file/directories that are over a certain size for example. But from this point of veiw i normally find a partition that appears to be getting full from the 'df' command. 'cd /that/partition' and then 'du -h --max-depth=1'

Helps me on all occasions i've needed it i think, but yet output of 'df -h' most useful!
Cheers,
MJ
 
Old 12-12-2008, 07:20 AM   #12
eldondehart
LQ Newbie
 
Registered: Oct 2008
Location: Saint Petersburg ,Florida
Distribution: OpenSuse 10.3 Mandrivia 2009
Posts: 18

Original Poster
Rep: Reputation: 0
ok here is df-h and I just noticed that my second hd (sdb1) is also backed up in / (sda2) partition...what the hell!!!

Filesystem Size Used Avail Use% Mounted on
/dev/sda2 9.9G 8.0G 1.4G 86% /
udev 253M 124K 252M 1% /dev
/dev/sda3 62G 18G 42G 30% /home
/dev/sdb1 9.4G 406M 8.6G 5% /sbd

Eldon
 
Old 12-12-2008, 07:42 AM   #13
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
No, sdb1 in mounted under /sdb, not the same thing.

Think of partitions being disk drives in themselves (even though they're not). In Windows parlance, C: is a partition, as is D:, etc.

Now each partition is a defined size (as is a disk), so think of your /home being a separate disk, but mounted in such a way that when you navigate to /home, you are automatically operating on that partition without realising it. Hence when you write to /home, you are writing to a different partition than the "/" partition. The fact that /home ins "under" "/" is irrelevant.

In a sense, think of /home as a link to another partition. That partition could be another partition on the same disk (as in your case), could be a separate disk entirely, or even on a remote server.

Back to windows, there really isn't the same concept - C & D are always separate entities, although you can have a link between the two.

I hope that makes a bit of sense - I don't feel like I've explained it very well.

Back to your initial issue - I'm not sure you have one.

HTH

BM
 
Old 12-12-2008, 08:22 AM   #14
eldondehart
LQ Newbie
 
Registered: Oct 2008
Location: Saint Petersburg ,Florida
Distribution: OpenSuse 10.3 Mandrivia 2009
Posts: 18

Original Poster
Rep: Reputation: 0
so I should not be concerned that / is 86% full? are you saying the duplicate /home dir is a link? How can I tell for sure? also sdb1 is a second separate HD that all files are also on sda

I just went over your last message and you are missing the point...I know that /home is under / but I have home in / and in /home both. One is 10gig in size (/sda2) and one is 61 gig (/home sda3). also in sda2 are all the files on sdb1 which is a completely separate HD. Hope this helps.

Last edited by eldondehart; 12-12-2008 at 09:32 AM.
 
Old 12-12-2008, 11:57 AM   #15
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,154

Rep: Reputation: 333Reputation: 333Reputation: 333Reputation: 333
Issue the mount command with no arguments to see what is mounted at which point in your file system.

And do, please, try to understand that Linux and most other modern operating systems have a single, monolithic, file system where devices, network connections, printers, disk drive partitions, etc. are all just "directories" in the single file system. For historical reasons (basically, backwards compatibility) Windows and older IBM operating systems have separate file systems for devices and disk drives, but there is no longer any practical or technical reason for making that distinction.

And, on that point, you have "missed the point." You do not have 'home" on two drives. You have one file system, and "home" is mounted in the single file system (called "/") as "home" at "/home." Other parts of "/" including "/" itself, are mounted from a different partition.

Last edited by PTrenholme; 12-12-2008 at 12:07 PM. Reason: Added info.
 
  


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
contents of 'home' directory found at sda5: mounted as /home, and also on sda6:/home leswatson Linux - Newbie 4 04-18-2008 05:02 PM
restoring desktop directory in /root (or any home directory) mel_lai Linux - Newbie 3 02-04-2008 04:13 AM
Active Directory User Cannot Write to Samba Home Directory jonwatson Linux - Networking 2 12-19-2006 01:40 PM
Apache Root/Home Directory and setting up FTP for home directories? Mankind75 Linux - Newbie 6 07-23-2006 03:37 PM
How to protect a file/directory in your home login directory (RH Linux) jitsenho Linux - Security 9 07-04-2006 12:08 AM


All times are GMT -5. The time now is 02:54 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