[opensuse] 11.3 how to move directory to save space?
I have a mixed system (Windows Vista and Opensuse 11.3). I just upgraded from 11.2 to 11.3. I was running out of space prior to this and uninstalled a few non-essential apps (games, graphics/multimedia apps, etc). I am severely low on space in my root directory. I ran the (new) Disk Usage Analyzer and found that my /usr/lib and /usr/share directories are eating up the bulk of space. Is there any way I can move either of these to the empty /overflow partition? Here is my df -h if that helps. Filesystem Size Used Avail Use% Mounted on /dev/sdb6 7.3G 6.9G 57M 100% / devtmpfs 995M 276K 994M 1% /dev tmpfs 995M 300K 994M 1% /dev/shm /dev/sdb7 5.0G 1.6G 3.2G 34% /home /dev/sda1 87G 54G 33G 62% /windows/C /dev/sda2 6.6G 6.0G 639M 91% /windows/D /dev/sdb1 74G 44G 31G 59% /windows/E /dev/sdb8 5.1G 139M 4.7G 3% /overflow Thank you! Mike -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, 16 Jul 2010 21:53:59 Mike wrote:
I have a mixed system (Windows Vista and Opensuse 11.3). I just upgraded from 11.2 to 11.3. I was running out of space prior to this and uninstalled a few non-essential apps (games, graphics/multimedia apps, etc). I am severely low on space in my root directory. I ran the (new) Disk Usage Analyzer and found that my /usr/lib and /usr/share directories are eating up the bulk of space. Is there any way I can move either of these to the empty /overflow partition?
Here is my df -h if that helps.
Filesystem Size Used Avail Use% Mounted on /dev/sdb6 7.3G 6.9G 57M 100% / devtmpfs 995M 276K 994M 1% /dev tmpfs 995M 300K 994M 1% /dev/shm /dev/sdb7 5.0G 1.6G 3.2G 34% /home /dev/sda1 87G 54G 33G 62% /windows/C /dev/sda2 6.6G 6.0G 639M 91% /windows/D /dev/sdb1 74G 44G 31G 59% /windows/E /dev/sdb8 5.1G 139M 4.7G 3% /overflow
Thank you! Mike
Mike, Create /overflow/share/ (and set the ownership to match /usr/share/. Copy (or, better still, rsync) everything from /usr/share/ to /overflow/share. If you use rsync -Cavvh you will preserve ownership and permissions and get verbose human-readable progress reports as you go. Another advantage of using rsync is that if it gets interrupted you can run it again and it will only transfer files that are not the same on the destination as on the source. Once you have successfully copied (and verified) all the files and folders, do the following (as root): rm -rf /usr/share mkdir /usr/share mount -o bind /overflow/share /usr/share You could symlink /overflow/share to /usr/share but some apps might complain about that, I'm not sure. YMMV. I use the bind mount on my system (I just had to go through this exact same exercise myself because my /usr partition was 98% used. BTW, add the following line to /etc/fstab if you use the bind mount method: /overflow/share /usr/share ext3 bind 0 0 Make sure that it is immediately after the lines that mount /overflow (which probably should be immediately after the line for / in this case, otherwise stuff expected in /usr/share/ might not be available if any programs require it during startup. Of course, you don't need to mess around with /etc/fstab if you just create a symlink but as I said I'm not sure about any side effects that might occur if you do that with /usr/share/ on another filesystem. Probably none, but I chose not to do that here. HTH. Regards, -- ====================================================== Rodney Baker rodney@jeremiah31-10.net web: www.jeremiah31-10.net ====================================================== -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Rodney Baker wrote:
Copy (or, better still, rsync) everything from/usr/share/ to /overflow/share. If you use rsync -Cavvh you will preserve ownership and permissions and get verbose human-readable progress reports as you go. Doesn't cp -av also do that?
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, 2010-07-16 at 10:27 -0400, James Knott wrote:
Rodney Baker wrote:
Copy (or, better still, rsync) everything from/usr/share/ to /overflow/share. If you use rsync -Cavvh you will preserve ownership and permissions and get verbose human-readable progress reports as you go. Doesn't cp -av also do that?
Yes it does. I would use cp. rsync is only needed if doing this between two different machines over a network. -- Roger Oberholtzer OPQ Systems / Ramböll RST Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sat, 17 Jul 2010 00:03:28 Roger Oberholtzer wrote:
On Fri, 2010-07-16 at 10:27 -0400, James Knott wrote:
Rodney Baker wrote:
Copy (or, better still, rsync) everything from/usr/share/ to /overflow/share. If you use rsync -Cavvh you will preserve ownership and permissions and get verbose human-readable progress reports as you go.
Doesn't cp -av also do that?
Yes it does. I would use cp. rsync is only needed if doing this between two different machines over a network.
But with rsync if, for some reason, the copy operation is interrupted and you're not sure exactly what has or has not been copied, you simply re-issue the command and it will only copy those files that don't exist or differ between source and destination (for example, a partially copied file). That is the main reason that I chose to use rsync (I also use it scripted for daily backups of my /home partition to a removable drive, but that is another story). -- =================================================== Rodney Baker VK5ZTV rodney.baker@iinet.net.au =================================================== -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sat, 2010-07-17 at 00:39 +0930, Rodney Baker wrote:
On Sat, 17 Jul 2010 00:03:28 Roger Oberholtzer wrote:
On Fri, 2010-07-16 at 10:27 -0400, James Knott wrote:
Rodney Baker wrote:
Copy (or, better still, rsync) everything from/usr/share/ to /overflow/share. If you use rsync -Cavvh you will preserve ownership and permissions and get verbose human-readable progress reports as you go.
Doesn't cp -av also do that?
Yes it does. I would use cp. rsync is only needed if doing this between two different machines over a network.
But with rsync if, for some reason, the copy operation is interrupted and you're not sure exactly what has or has not been copied, you simply re-issue the command and it will only copy those files that don't exist or differ between source and destination (for example, a partially copied file). That is the main reason that I chose to use rsync (I also use it scripted for daily backups of my /home partition to a removable drive, but that is another story).
True. But do you often encounter problems copying between two disks on the same machine? I have only had good luck with cp. Also, if the cp fails, you can do the rsync next. cp is faster. Still, being Linux, there is always more than one way to accomplish something! -- Roger Oberholtzer OPQ Systems / Ramböll RST Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sat, 17 Jul 2010 00:46:48 Roger Oberholtzer wrote:
On Sat, 2010-07-17 at 00:39 +0930, Rodney Baker wrote:
On Sat, 17 Jul 2010 00:03:28 Roger Oberholtzer wrote:
On Fri, 2010-07-16 at 10:27 -0400, James Knott wrote:
Rodney Baker wrote:
Copy (or, better still, rsync) everything from/usr/share/ to /overflow/share. If you use rsync -Cavvh you will preserve ownership and permissions and get verbose human-readable progress reports as you go.
Doesn't cp -av also do that?
Yes it does. I would use cp. rsync is only needed if doing this between two different machines over a network.
But with rsync if, for some reason, the copy operation is interrupted and you're not sure exactly what has or has not been copied, you simply re-issue the command and it will only copy those files that don't exist or differ between source and destination (for example, a partially copied file). That is the main reason that I chose to use rsync (I also use it scripted for daily backups of my /home partition to a removable drive, but that is another story).
True. But do you often encounter problems copying between two disks on the same machine? I have only had good luck with cp. Also, if the cp
Not problems, but I had to interrupt the operation the other day because I needed to restart the desktop and I started the cp in a kde terminal without first invoking screen. Had I remembered to do that, I could have detached the screen session and let the cp complete in the background (or I could have switched to another vt and done it there outside of kde, but I sometimes forget I can do that ;-).
fails, you can do the rsync next. cp is faster. Still, being Linux,
Which is why I switched to rsync :-).
there is always more than one way to accomplish something!
Yes. The pleasure of having choices :-). -- =================================================== Rodney Baker VK5ZTV rodney.baker@iinet.net.au =================================================== -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Roger Oberholtzer wrote:
On Sat, 2010-07-17 at 00:39 +0930, Rodney Baker wrote:
On Fri, 2010-07-16 at 10:27 -0400, James Knott wrote:
Rodney Baker wrote:
Copy (or, better still, rsync) everything from/usr/share/ to /overflow/share. If you use rsync -Cavvh you will preserve ownership and permissions and get verbose human-readable progress reports as you go. Doesn't cp -av also do that? Yes it does. I would use cp. rsync is only needed if doing this between two different machines over a network. But with rsync if, for some reason, the copy operation is interrupted and you're not sure exactly what has or has not been copied, you simply re-issue
On Sat, 17 Jul 2010 00:03:28 Roger Oberholtzer wrote: the command and it will only copy those files that don't exist or differ between source and destination (for example, a partially copied file). That is the main reason that I chose to use rsync (I also use it scripted for daily backups of my /home partition to a removable drive, but that is another story).
True. But do you often encounter problems copying between two disks on the same machine? I have only had good luck with cp. Also, if the cp fails, you can do the rsync next. cp is faster. Still, being Linux, there is always more than one way to accomplish something!
Or you can just do cp -ua :) I'm a big rsync fan but it does have limitations. One is that it builds a list of files before doing anything, and so can run out of memory. cp gets around that. Cheers, Dave PS I think the OP would be better advised to make the windows partitions smaller to recover some of the vast amounts of free space in them! -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 07/16/2010 08:16 AM, Roger Oberholtzer wrote:
On Sat, 2010-07-17 at 00:39 +0930, Rodney Baker wrote:
On Sat, 17 Jul 2010 00:03:28 Roger Oberholtzer wrote:
On Fri, 2010-07-16 at 10:27 -0400, James Knott wrote:
Rodney Baker wrote:
Copy (or, better still, rsync) everything from/usr/share/ to /overflow/share. If you use rsync -Cavvh you will preserve ownership and permissions and get verbose human-readable progress reports as you go.
Doesn't cp -av also do that?
Yes it does. I would use cp. rsync is only needed if doing this between two different machines over a network.
But with rsync if, for some reason, the copy operation is interrupted and you're not sure exactly what has or has not been copied, you simply re-issue the command and it will only copy those files that don't exist or differ between source and destination (for example, a partially copied file). That is the main reason that I chose to use rsync (I also use it scripted for daily backups of my /home partition to a removable drive, but that is another story).
True. But do you often encounter problems copying between two disks on the same machine? I have only had good luck with cp. Also, if the cp fails, you can do the rsync next. cp is faster. Still, being Linux, there is always more than one way to accomplish something!
I've had problems with cp copying the "contents" of symbolic links, rather than just creating the link itself. This behavior can be overridden at the command line, of course, but you need to remember to do it. Regards, Lew -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Lew Wolfgang wrote:
I've had problems with cp copying the "contents" of symbolic links, rather than just creating the link itself. This behavior can be overridden at the command line, of course, but you need to remember to do it.
Think in terms of "archive" with cp -a. That's all you need to remember, unless you want other features. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Roger Oberholtzer wrote:
On Fri, 2010-07-16 at 10:27 -0400, James Knott wrote:
Rodney Baker wrote:
Copy (or, better still, rsync) everything from/usr/share/ to /overflow/share. If you use rsync -Cavvh you will preserve ownership and permissions and get verbose human-readable progress reports as you go.
Doesn't cp -av also do that?
Yes it does. I would use cp. rsync is only needed if doing this between two different machines over a network.
Actually, IIRC, you can use cp & ssh to do that too. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, 2010-07-16 at 11:14 -0400, James Knott wrote:
Roger Oberholtzer wrote:
On Fri, 2010-07-16 at 10:27 -0400, James Knott wrote:
Rodney Baker wrote:
Copy (or, better still, rsync) everything from/usr/share/ to /overflow/share. If you use rsync -Cavvh you will preserve ownership and permissions and get verbose human-readable progress reports as you go.
Doesn't cp -av also do that?
Yes it does. I would use cp. rsync is only needed if doing this between two different machines over a network.
Actually, IIRC, you can use cp & ssh to do that too.
But rsync won't copy something that is already there. Great when a recovery after failure is wanted. -- Roger Oberholtzer OPQ Systems / Ramböll RST Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 07/16/2010 10:33 AM, Roger Oberholtzer pecked at the keyboard and wrote:
On Fri, 2010-07-16 at 10:27 -0400, James Knott wrote:
Rodney Baker wrote:
Copy (or, better still, rsync) everything from/usr/share/ to /overflow/share. If you use rsync -Cavvh you will preserve ownership and permissions and get verbose human-readable progress reports as you go. Doesn't cp -av also do that?
Yes it does. I would use cp. rsync is only needed if doing this between two different machines over a network.
Wrong. rsync can be used on the same machine to copy files from one directory to another. -- Ken Schneider SuSe since Version 5.2, June 1998 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Mike said the following on 07/16/2010 08:23 AM:
I have a mixed system (Windows Vista and Opensuse 11.3). I just upgraded from 11.2 to 11.3. I was running out of space prior to this and uninstalled a few non-essential apps (games, graphics/multimedia apps, etc). I am severely low on space in my root directory. I ran the (new) Disk Usage Analyzer and found that my /usr/lib and /usr/share directories are eating up the bulk of space. Is there any way I can move either of these to the empty /overflow partition?
Why not re-conceptualise your /overflow as /usr? I'm not sure what your base hardware is, but disk storage is amazing cheap these days http://raoulpop.com/2009/01/07/storage-drops-below-9-cents-per-gigabyte/ If your chassis can accommodate another drive I'd recommend adding one and then USE LVM I'd also point out that partitioning allows for robustness. You are obviously doing this on Windows - keeping 'data' separate from the 'system'. It applies in Linux as well. I'd use these guidelines if you can reinstall, repartition. (I'm sure someone will argue the details but the principles hold.) 1. Create a /boot partition. Mine is 150M which gives me a lot of space for alternate kernels Most people might consider even 100M excessive. Treat 50M as the absolute minimum. This should be a ext3 file system 2. Create a / partition Don't make this any bigger than it should be. Mine is 2G and I'm using less than 25% of it. In the light of your post that may seem dramatic but then I've a different strategy. This is also an ext3 FS The rest of my drive is given over to a LVM partition so that I can shrink or grow the file systems on it, create more, take snapshots for backup and so forth. Once you 'get it', LVM is pretty easy. On the LVM partition I have /home /usr /usr/lib /usr/lib /usr/share /usr/src /var /tmp There are good security reasons to put /tmp on a separate partition. Go google. Now with LVM you can add another drive. LVM just allocates space as it needs. If you're a worry-wart you can control how the partitions get allocated over the drives. I'm not sure its worth the bother. As my needs grew and, like you, I had to deal with nearly full partitions, I did one of two things: a) I grew the Logical 'partition' (LogicalVolume) under LVM and then grew the file system b) I created a new LogicalVolume, a new file system on it, and used CPIO to move the files over. So now I have these additional LogicalVolumes and file systems: /home/anton/.thunderbird /home/anton/Downloads /home/anton/Documents /home/anton/Media and few more related to various projects. WHY? you ask. LVM makes 'live' backups easy. Take a snapshot and keep on working. Take a pause and freeze it, move the snapshot to CD or DVD then delete the snapshot It also means I don't fret when I get to the 'full partition' situation you are in. The way things work I'll never have a full /boot or /. The only 'full' I've had is Downloads :-) I can't add another drive on my laptop but I have on my servers. (See "man vgextend") There's a lot more you can do with LVM. Yes, it may eventually be outdated by BtrFS, but that's a separate issue. For now, LVM's greatest boon, and what attracted me to it in the first place, is that the sizing of the partitions and file systems can be deferred and later revised without having to re-install. Which is what you are facing. -- Amateurs hack systems, professionals hack people -- Bruce Schneier -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Mike wrote:
I have a mixed system (Windows Vista and Opensuse 11.3). I just upgraded from 11.2 to 11.3. I was running out of space prior to this and uninstalled a few non-essential apps (games, graphics/multimedia apps, etc). I am severely low on space in my root directory. I ran the (new) Disk Usage Analyzer and found that my /usr/lib and /usr/share directories are eating up the bulk of space. Is there any way I can move either of these to the empty /overflow partition?
Yes, you can create a new directory on another partition or drive and move that directory there. Then create a simlink to the new directory. You can also use Logical Volume Management to avoid the problem. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Mike wrote:
I have a mixed system (Windows Vista and Opensuse 11.3). I just upgraded from 11.2 to 11.3. I was running out of space prior to this and uninstalled a few non-essential apps (games, graphics/multimedia apps, etc). I am severely low on space in my root directory. I ran the (new) Disk Usage Analyzer and found that my /usr/lib and /usr/share directories are eating up the bulk of space. Is there any way I can move either of these to the empty /overflow partition?
Hopefully you solved you problem, but if not, I had a similar problem with my /usr/share/fonts being too big, so I: faster: mv /usr/share/fonts /home/. (or safer:) cp -a /usr/share/fonts /home/. && rm -fr /usr/share/fonts/ then: mkdir /usr/share/fonts and add to /etc/fstab: mount /home/fonts /usr/share/fonts none bind Then your directory at the new location will act like a directory and not a symlink (if that's important for you -- for system folders, it is for me -- some programs disallow symlinks in parts of their paths as being potential security risks). -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 07/17/2010 06:44 PM, Linda Walsh wrote:
Mike wrote:
I have a mixed system (Windows Vista and Opensuse 11.3). I just upgraded from 11.2 to 11.3. I was running out of space prior to this and uninstalled a few non-essential apps (games, graphics/multimedia apps, etc). I am severely low on space in my root directory. I ran the (new) Disk Usage Analyzer and found that my /usr/lib and /usr/share directories are eating up the bulk of space. Is there any way I can move either of these to the empty /overflow partition?
Hopefully you solved you problem, but if not, I had a similar problem with my /usr/share/fonts being too big, so I:
(I hope the subject line formats correctly. I couldn't figure out how to reply back in to the list.) Thank you to everyone for responding to my issue. The list gets a LOT of messages and provides some good reading. :) Following the instructions provided, I moved my share directory to another drive and successfully mounted (bind method). I also gained a ton of storage (40+ GB) by repartitioning space from my old Windows setup (using Gparted LIVE CD). Thanks again everyone. This issue is solved and I have another one I'll save for later. Mike -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (10)
-
Anton Aylward
-
Dave Howorth
-
James Knott
-
Ken Schneider - openSUSE
-
Lew Wolfgang
-
Linda Walsh
-
Mike
-
Rodney Baker
-
Rodney Baker
-
Roger Oberholtzer