LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-01-2010, 03:27 AM   #16
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,327
Blog Entries: 1

Rep: Reputation: 690Reputation: 690Reputation: 690Reputation: 690Reputation: 690Reputation: 690

If you want to play it safe, you can boot a different linux installation or run from a liveCD or liveDVD. Then tar up /home/ and untar it on the other partition. Keep the tar for a backup. Change your /etc/fstab to reflect the new system. Remove the contents in the old /home/ location. And reboot into your original linux installation. You could probably do that on a running system, but it's rarely advised to make modifications to a partition that's actively being used.

Regardless disk space is cheap. Unless you have specific reasons for breaking everything off of /, then it's sometimes easier to not part things out and run it all from a single partition. At least for a desktop. For a server you want things shuffled around so areas that get a lot of I/O burn up their own drive(s) and are easier to backup. And areas like /boot/ are protected by not being mounted after boot. 4GB is still kind of tiny for a modern system. I tend towards swap being 2x's your largest media type (DVD). And / being at least 4x's that amount or 10GB, which ever is biggest. You want at least a DVDs worth of free space at any given time. Filesystems become less efficient past 80% full and other things. And some software is still written for perfect world scenarios and are ill equipped to run out of drive space in the middle of an operation. Plus with 32GB flash cards of media for your MP3 player, you want at least enough space to make a backup copy on your local system. Which is about 8x's larger than your current allocation (not including OS).
 
Old 08-01-2010, 10:05 AM   #17
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,013

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Shadow_7 View Post
If you want to play it safe, you can boot a different linux installation or run from a liveCD or liveDVD. Then tar up /home/ and untar it on the other partition. Keep the tar for a backup. Change your /etc/fstab to reflect the new system. Remove the contents in the old /home/ location. And reboot into your original linux installation. You could probably do that on a running system, but it's rarely advised to make modifications to a partition that's actively being used.

Regardless disk space is cheap. Unless you have specific reasons for breaking everything off of /, then it's sometimes easier to not part things out and run it all from a single partition. At least for a desktop. For a server you want things shuffled around so areas that get a lot of I/O burn up their own drive(s) and are easier to backup. And areas like /boot/ are protected by not being mounted after boot. 4GB is still kind of tiny for a modern system. I tend towards swap being 2x's your largest media type (DVD). And / being at least 4x's that amount or 10GB, which ever is biggest. You want at least a DVDs worth of free space at any given time. Filesystems become less efficient past 80% full and other things. And some software is still written for perfect world scenarios and are ill equipped to run out of drive space in the middle of an operation. Plus with 32GB flash cards of media for your MP3 player, you want at least enough space to make a backup copy on your local system. Which is about 8x's larger than your current allocation (not including OS).
It's a production system so I can't easily restart without valid reasons - I haven't fully checked the startup process yet either for mounting and such.

I think the main problem has probably happened because I put wine under thr oot folder when it should have been installed under home but strangely enough /home doesn't seem to be mounted on its own partition anywhere...

Can I just move wine to a different folder or do I need to unistall it and reinstall it under a different folder?

Last edited by qwertyjjj; 08-01-2010 at 10:48 AM.
 
Old 08-01-2010, 01:15 PM   #18
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 115Reputation: 115
Try this:

find / -size +10000 -type d

This will identify the largest directories in your system.

I once had the symptom you are having, and this is how I found it. Turned out a misconfigured mail server was not sending out the emails that it was being told to send by another server that was generating those emails to tell me about the results of security sweeps on the system. I had been noticing a gradual loss of space, and by the time I finally found the problem there were more than a million files in the directory waiting to be sent. I didn't want those emails anyway.

Another possibility is that a session log is growing and growing as programs that you routinely use keep writing verbosely into that log. You might look in ~ for a file called .xsession-errors.
 
Old 08-01-2010, 01:18 PM   #19
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 115Reputation: 115
You can move /home to a different partition by copying it over, then deleting it from the / partition. Then, make a symlink to the new location of home in /, and you can keep on running without rebooting.
 
Old 08-01-2010, 01:45 PM   #20
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,013

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by jiml8 View Post
You can move /home to a different partition by copying it over, then deleting it from the / partition. Then, make a symlink to the new location of home in /, and you can keep on running without rebooting.
So, if I wanted to move /root/wine and /home to /dev/sda2 how do I copy into a new partition because /dev/sda2 isn't actually a folder or is it?
I guess a create a new partition out of the sda5 space?

[root ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda5 4956284 3765952 934500 81% /
/dev/sda3 4956316 2801532 1898952 60% /var
/dev/sda1 77749 23626 50109 33% /boot
tmpfs 475204 0 475204 0% /dev/shm
/dev/sda2 233345000 36012756 197332244 16% /var/spool/squid
[root ~]#

Last edited by qwertyjjj; 08-01-2010 at 01:57 PM.
 
Old 08-01-2010, 03:03 PM   #21
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 115Reputation: 115
/dev/sda2 is a device. You can only copy to a filesystem. To make the filesystem on /dev/sda2 available, you need to mount /dev/sda2.

You would mount /dev/sda2, perhaps as /mnt/sda2, then copy /home and /root/wine over to /mnt/sda2, which would put their contents on /dev/sda2.

You have to put a symlink in any location from which you remove a directory (so you need a symlink named home on / and a symlink named wine in /root) so that any configuration stuff in the system that references /root/wine or /home can find what it needs.
 
Old 08-01-2010, 05:15 PM   #22
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,013

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by jiml8 View Post
/dev/sda2 is a device. You can only copy to a filesystem. To make the filesystem on /dev/sda2 available, you need to mount /dev/sda2.

You would mount /dev/sda2, perhaps as /mnt/sda2, then copy /home and /root/wine over to /mnt/sda2, which would put their contents on /dev/sda2.

You have to put a symlink in any location from which you remove a directory (so you need a symlink named home on / and a symlink named wine in /root) so that any configuration stuff in the system that references /root/wine or /home can find what it needs.
Does it matter that /dev/sda2 already has the squid folder mounted to it?
 
Old 08-01-2010, 07:25 PM   #23
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,013

Original Poster
Rep: Reputation: 30
Also, I seem to have an sda4 device not listed with df

Code:
[root ~]# fdisk -l

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

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          10       80293+  83  Linux
/dev/sda2              11       29061   233352157+  83  Linux
/dev/sda3           29062       29698     5116702+  83  Linux
/dev/sda4           29699       30401     5646847+   5  Extended
/dev/sda5           29699       30335     5116671   83  Linux
/dev/sda6           30336       30400      522081   82  Linux swap / Solaris
Maybe I could mount /home on that?
 
Old 08-02-2010, 03:25 PM   #24
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,013

Original Poster
Rep: Reputation: 30
Hi - sorry but got another question.
Is sda4 in this instance just an extended partiion of sda5?
Not quite sure how to proceed - as I understand only 1 folder can be mounted to a device, so I can't mount anything else to sda5 as it alredya has the squid folder.
So, do I reduce the partition size or do I mount it on sda4?
 
Old 08-02-2010, 07:52 PM   #25
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
sda4 is your extended partition. An extended partition itself is not usable, it is just a holder for the logical partitions that follow. Delete sda4 and down go all the partitions that follow (which is why most partitioning software will prevent you from doing so until have unmounted everything above sda4.
 
Old 08-02-2010, 07:57 PM   #26
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,013

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by jay73 View Post
sda4 is your extended partition. An extended partition itself is not usable, it is just a holder for the logical partitions that follow. Delete sda4 and down go all the partitions that follow (which is why most partitioning software will prevent you from doing so until have unmounted everything above sda4.
Can I mount more than 1 folder per device?
So, sda5 already has the squid folde, can I put another folder on there?
 
Old 08-02-2010, 09:57 PM   #27
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Quote:
Can I mount more than 1 folder per device?
To prevent confusion: you mount devices on folders, not folders on devices. Folders are put on a device put that is something else. For example, I can mount device X on my /home folder (which thus becomes a mount point) and then the contents of that device are accessible from /home. I can then create folders inside /home, which will then, in fact, be put onto device X.

A single device can be mounted onto multiple mount points (folders) if you use the --bind option but that is rarely ever done. For example, say I have a device dedicated to "var" and mounted on folder /var. If I'd like to be able to access it directly from my home directory, then I could create a /home/var folder and mount the var device there, too. It would still be the same device, only accessible from two places.

What is not possible is mounting multiple devices on a single mount point (folder). Or rather, it is possible but the last mounted device will block access to the ones that were mounted before so as a rule there really isn't any point in doing that sort of thing.

Quote:
So, sda5 already has the squid folde, can I put another folder on there?
Sure. If it has enough space, you could put all your wine stuff there. However, the system expects wine to reside in the user's home partition so you'd need to create a link from your moved wine folder to its original location; then the system believes it is still there although it really isn't.
 
Old 08-02-2010, 10:11 PM   #28
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,013

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by jay73 View Post
Folders are put on a device put that is something else. For example, I can mount device X on my /home folder (which thus becomes a mount point) and then the contents of that device are accessible from /home. I can then create folders inside /home, which will then, in fact, be put onto device X.
So, if /dev/sda5 currently is mounted to /var/squid/cache.
If I mount /dev/sda5 to /home &
mount /dev/sda5 to /root/wine
Will this mess up the cache in anyway?
"and then the contents of that device are accessible from /home" - does the cache suddenly become available to view by going to /home - seems a strange way for things to be organised?

Symlinks would be put in for /home and /root/wine

Last edited by qwertyjjj; 08-02-2010 at 10:46 PM.
 
Old 08-02-2010, 11:20 PM   #29
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,327
Blog Entries: 1

Rep: Reputation: 690Reputation: 690Reputation: 690Reputation: 690Reputation: 690Reputation: 690
I haven't used wine much, but what I recall, when you install something it installs to the ~/ aka /home/user/ of the user installing it. For root that would be /root/. And you should avoid using ROOT for wine in general. You could move it, you could symlink it, but you'll likely have permission issues. You should be able to re-install the software as a user and have it go to your /home/ area. And then fully remove /root/.wine*. But like I said, I haven't used it much. And if you need wine installation stuff to be available to multiple users, you might have to use root. Not that you SHOULD.

In theory it would be possible to use one device for multiple mount points. But there'd be some symlink trickery in there and other complications. And it'd be a pretty dramatically different scenario from your current setup. Which you probably wouldn't be able to do/change on a LIVE system. Really it'd be easier / simpler to backup the system in it's entirety via tar and recreate the partitions and space allocations and restore. Not to imply simple.

You really don't want to run a file system past 50% capacity IMO. Aside from having no room to work, you don't have room to make a backup on that device and move it when done. And other things that make life easier. Past 80% and file system efficiency starts to go down hill in general. Not for all things and manners, but in general. And sizable disks are cheap these days. No more $1 per GB. Closer to $0.10 now.
 
Old 08-02-2010, 11:37 PM   #30
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Quote:
So, if /dev/sda5 currently is mounted to /var/squid/cache.
If I mount /dev/sda5 to /home &
mount /dev/sda5 to /root/wine
Will this mess up the cache in anyway?
Not necessarily mess it up (though it may) but you'll get an odd mix of your cache contents and the contents of the wine folder both appearing under /var/squid/cache and under /root.
This sort of thing would work if the "cache" folder itself (not just its contents) resided on sda5 but it actually resides on sda3, more specifically under /var/squid. If it did, you could simply add a "wine" folder to the same device and create a link from the "cache" folder in /var/squid and a link from "wine" in /root.

The solution would work like this (IF I understand your set-up correctly, which I'm not sure I do):
-run a livecd
-mount sda3 on /mnt/temp and when it is mounted, mount sda5 /on /mnt/temp/var/squid/cache
-mount another device on the livecd (say, on /mnt/new)
-copy /var/squid/cache to the other device (cp -vax /mnt/temp/var/squid/cache /mnt/new)
-copy /root/wine to the other device (cp -vax /mnt/temp/root/wine /mnt/new)
-check whether the /mnt/new directory contains both "cache" and "wine" folders
-delete (or, while you are experimenting, just rename) the "cache" and "wine" folders on sda3
-create a folder inside /mnt/temp/mnt (say, "shared"): /mnt/temp/mnt/shared
-edit /mnt/temp/etc/fstab to make /mnt/shared the mount point for the other device
-create a link from /mnt/temp/mnt/shared/cache to /mnt/temp/var/squid and from /mnt/temp/mnt/shared/wine to /mnt/temp/root.

Last edited by jay73; 08-02-2010 at 11:40 PM.
 
  


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
partition space and disk space usage and free don't match nsic Linux - Newbie 3 02-22-2013 01:57 PM
hard disk partitioning/I am out of space /how to increase linux space? RMLinux Red Hat 8 09-05-2008 01:33 PM
add space to / when from spare space on disk ctsiow Linux - General 4 11-07-2007 08:55 AM
Cedega "Disk space required for the installation exceeds available disk space" Solved Spewdemon LinuxQuestions.org Member Success Stories 1 10-18-2007 07:19 PM
3Gb of disk space lost! Disk space problem or mother board conflicts with HDD Mistreated Linux - Hardware 4 12-06-2004 04:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:19 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration