Problem with diskspace

So here I am, a very fresh linux newbie.

I decided to install Opensuse yesterday on my 7 years old laptop. There was a windows installation, and two partitions, one being 70 gb and the other 80 gb. When I installed opensuse I think I picked to just use both partitions for the installation. I can’t remember exactly.

At the moment, when I look at my home in dolphin, I see there is a 20 gib and 140 gib harddrive.

I installed Matlab yesterday, and no problem there. Today I wanted to install latex, and did so by just typing texlive into the YaST2 application, and install all packackes that came up. However, I got a message that I lacked disk space to further install packages. Both of these programs together should not exceed 40 GiB.

As I am a total newbie in linux, did I do something wrong during installation with the partitions? I am fresh from windows, and know how to make a program install into C: or D: or whatever, but how is this organised in linux? My apologies if this is a very newbish question, feel free to refer me to a FAQ. :slight_smile:

Cheers!

Okay, I am a little bit wiser now. According to a tutorial I found, the Linux native partition being ext4 is used to install all new programs. So it would be good to increase that one. However, when I use OpenUse installer, it does not really give me an option to increase from 20GB to more. When I use the custom partitioning for experts, when I try to increase the size of the 20 GB partition, it does not let me. Or do I need to first remove all partitions and create new ones manually?

Also, I have always left the Vendor diag partition untouched, but seeing how my laptop is 7 years old and all warranty is probably very much void, there is no reason to keep it intact, right?

edit: never mind, I think I got it!]

I am not sure what your real question is. Also a lot of basic information about what you did is missing. Thus a few remarks here in the hope they help.

It is not even clear what you installed. openSUSE I guess, but which version?

From your story, it is not clear if you installed openSUSE alongside the already installed Windows or that you installed it over it.

Because you have bad memory and/or forgot to write down what your decisions during installation were, nobody now knows what your partitioning is. To make you and us know what it is, please post

su -c 'fdisk -l'

About posting such computer text here in the forums: use CODE tags. You get them by clicking on the # button in the tool bar of the posteditor. Copy/paste from your terminal window, the prompt, the command, the output and the next prompt in between the tags.

Try to unlearn almost everything you learned using Windows. Windows knowledge will almost for sure block a lot of understanding of Unix/Linux systems. When software packages are installed, the several files that are in the package (a so called RPM) are going into different places like /usr, /bin, /etc and/or subdirectories of those.

There is but one tree of directories in Unix/Linux (starting at the root, written as / in a path). Not more as in some other operating systems like MS-DOS where the different starting points are called A:, B:, etc.

I’m sorry for my unclear information. I might have asked questions without first consulting FAQs. Thank you for your patience. I installed OpenSUse 13.1, without leaving windows installation intact. I decided to reinstall, so what I did before is no longer relevant. I created the following partitions:

3GB Swap
50 GB for the / (root?) partition
rest for the /home partition (which is about 90 GB)

Disk /dev/sda: 160.0 GB, 160041885696 bytes, 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x34fe34fd

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63    12289724     6144831   12  Compaq diagnostics
/dev/sda2   *    12290048   312580095   150145024    f  W95 Ext'd (LBA)
/dev/sda5        12292096    18589575     3148740   82  Linux swap / Solaris
/dev/sda6        18589696   123459583    52434944   83  Linux
/dev/sda7       123461632   312561663    94550016   83  Linux

Disk /dev/sdb: 8000 MB, 8000110592 bytes, 15625216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x7e142954

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            3764       11955        4096   ef  EFI (FAT-12/16/32)
/dev/sdb2   *       11956     8931327     4459686   17  Hidden HPFS/NTFS

I will install some programs which will require a lot of Diskspace. I wonder if the partitioning I did is a good idea. I do not really need a lot of space to store files.

Okay, so here is a clear question for you to answer:

From what I understood so far, the /home partition is located on the root, pathwise, but everything stored inside this path is saved on the home partition. Everything which is not located pathwise on /home, is stored on the /root partition. If I install a program, and these files will be contained in one of those paths you mentioned, they will be stored on the root partition. (If this is again un-informed, just say that I am incorrect, and I will do my homework better.)

Yes, we can tell.

I can’t solve your problems, because I’m not sure what they are. So I’ll describe how I do it.

I start, by partitioning my disk. I do that before I start an install. These days, I might boot a live opensuse CD (say the live rescue CD) for that purpose. When I first went with opensuse (around 2004), I probably used a “gparted” CD to partition the disk as I wanted it.

Then, in the installer, I choose expert mode (partitioning section). This is so I can tell it to just use the partitions that I have already created.

My current practice is 40G for the root partition, mostly to leave me room for growth. I’ve never actually used 20G, but then I don’t install “matlab” (I do install texlive, latex). I also create a swap partition, though I could probably do without. Sometimes, I use a smaller “/boot”, mostly if I am going to use encrypted partitions. My current practice is 500M for “/boot”. The remainder of my linux space goes to “/home”.

My main point here: if you want to control the details of partitioning, then it is easiest to do the partitioning separately, before you begin the install.

That seems reasonable.

The one puzzle, for me, is that 6G Compaq partition. I would have nuked that. As far as I know, it is mostly for recovering Windows. And since you have decided not to use Windows, there’s probably no great reason to keep the Compaq partition.

Okay, an actual question.

“/home” is logically part of the root file system (that’s “/”, not “/root”). It is logically part of “/”, but it is physically distinct.

If you install some software, it depends on where you install it. Some software can be installed under “/home”. However, it you install as root (you gain root privileges for the install), them most software will install in system space (for your system, that would be the root partition). User settings, for using that software, would normally be under your home directory in the “/home” partition. For most software, the space used on the “/home” partition is small. However, a web browser will probably keep a large cache on your “/home” partition (under your home directory).

I hope that answers your question.

It does answer my question, and thank you for bearing with me. In the future, I will only clear questions. I have been chastized. Anyone who reads this topic: ignore all that has been asked by me. Thread can be closed.

I think nrickert is right. It seems a very reasonable installation so far.

  • you could have used that recovery patition sda1 aslo in the grand design, but maybe you can find a use for it later.
  • those 50 Gb for / is normaly more then adequate. The deafult is about 20 Gb. I have such a 20 Gb one and it is only 30% full. You can check urself how muchis used/free with
df -h /

IMHO thre is no need to make that larger then it is now.

  • Indeed in the /homee dirrectorythere goes all he data belongin to he usrs. Rember that Unix/Linux is multi-user operating tem, thus you must alwas be aware of tht fact, even when you think you are in fact the only user. Alway ask ourself: is thhis a sytething or user thing. E.g. a wallpaper is a user thing, every user chave it’s own. Thus it is to be configured in our deskto(DE,nome, …) and not in the system(using YaST).
  • Before installation you can indeed pre-partition, but the parttioner n the installer is also very good. You can e.g. say to it: use the whole disk. And then it will ignore all present partitions and make a fresh proposal.

On 2014-07-08 15:16, nrickert wrote:
>
> Merlione404;2652895 Wrote:
>> I decided to reinstall, so what I did before is no longer relevant. I
>> created the following partitions:
>>
>> 3GB Swap
>> 50 GB for the / (root?) partition
>> rest for the /home partition (which is about 90 GB)
>
> That seems reasonable.

Quite.

Although I would have made swap bigger. How much RAM does that laptop
have? You need swap in order to be able to hibernate the machine. And
some applications need a lot of memory.

> The one puzzle, for me, is that 6G Compaq partition. I would have nuked
> that. As far as I know, it is mostly for recovering Windows. And since
> you have decided not to use Windows, there’s probably no great reason to
> keep the Compaq partition.

I would backup it up on to a DVD or two, perhaps using clonezilla. Just
in case. At least, make sure to keep the license code, for example to
install windows on a virtual machine somewhere, if needed.

On 2014-07-08 13:56, Merlione404 wrote:

> Okay, I am a little bit wiser now. According to a tutorial I found, the
> Linux native partition being ext4 is used to install all new programs.
> So it would be good to increase that one. However, when I use OpenUse
> installer, it does not really give me an option to increase from 20GB to
> more. When I use the custom partitioning for experts, when I try to
> increase the size of the 20 GB partition, it does not let me. Or do I
> need to first remove all partitions and create new ones manually?

Yes, you either remove partitions from the proposal (they still do not
exist), or tell the installer not to make a proposal at all, let you
start from scratch. The openSUSE installer does not write anything to
disk till the very end, and it pops up a message that it is going to
start writing. I don’t remember now, but I think I saw it once in big red.

On 2014-07-08 14:56, Merlione404 wrote:

> Okay, so here is a clear question for you to answer:
>
> From what I understood so far, the /home partition is located on the
> root, pathwise, but everything stored inside this path is saved on the
> home partition. Everything which is not located pathwise on /home, is
> stored on the /root partition. If I install a program, and these files
> will be contained in one of those paths you mentioned, they will be
> stored on the root partition. (If this is again un-informed, just say
> that I am incorrect, and I will do my homework better.)

Linux hides from view on what disk or partition anything goes, contrary
to Windows that uses names such as “D:\somewhere”.

So, if you create a root partition ("/"), and a home partition
("/home"), then you may get a tree like this:


/
|-- bin
|-- boot
|-- dev
|-- etc
|-- home
|-- lib
|-- lib64
|-- lost+found
|-- media
|-- mnt
|-- opt
|-- proc
|-- root
|-- run
|-- sbin
|-- srv
|-- sys
|-- tmp
|-- usr
|-- var
`-- windows

Well, what results is that everything is on the “root” partition, except
the “/home” directory, that is in fact a different partition. It is
transparent to you.

And this allows you neat tricks: for instance, lets suppose you need to
install a big program that goes into “/opt/bigprogram”. Well, you can
make that directory a different partition. In Linux/Unix we say that the
partition “such” is mounted on “that” directory, in this case,
“/opt/bigprogram”.

Notice that if “/opt/bigprogram” did exist and had files, those files
would disappear from sight, would become inaccessible - mind, not
deleted: just umounting “/opt/bigprogram” would make them appear again.

Note: Windows 7 can do something similar.

Finally, there is some important difference on how Linux installs
programs: you do not decide where they are installed (with exceptions).
It is the designer and the packager of the program who makes that
decision, and this is based on a standard, called “FHS” (Filesystem
Hierarchy Standard, see wikipedia).

Typically, programs would go to /usr/bin, libraries to /usr/lib, global
config files to /etc, global data to /var, and user config, data, or
even plugins would go to /home.

And there can be several users using the same program at the same time,
using each their own config and data.

One exception are programs that were initially designed for Windows.
Another typical one are java applications.

Another is that if you build an application, then, as you are the
“packager”, you can decide where to install the program files.

Another typical one are scripts or small standalone programs that you
may get from other people.

But in general, you install everything as an rpm, which you get
automatically with yast, apper, or zypper, from the main or official
repository, or from auxiliary repos. It is very seldom that you have to
go outside and get something, and this can be problematic. So, if you
need something that you can’t easily find, ask, and we’ll you how to
find programs.

Lastly: Welcome here and enjoy! :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Although I would have made swap bigger. How much RAM does that laptop
have? You need swap in order to be able to hibernate the machine. And
some applications need a lot of memory.

My laptop has a mere 1.95 GiB RAM. I read in some tutorial that your swap partition needs to be at least 50% of your RAM, and preferably 100%. When I used the OpenSUSE installer I think it told me that my maximum size of this partition was about 3.1 GB. But I could be mistaken here. Would it still be better to increase the swap partition, and by how much, in your opinion?

I would backup it up on to a DVD or two, perhaps using clonezilla. Just
in case. At least, make sure to keep the license code, for example to
install windows on a virtual machine somewhere, if needed.

(About the compaq partition) I have decided to reinstall again and get rid of that partition. The original install on this laptop was Win XP, so I do not think I will miss it. Neither will I ever need all the Acer bloatware again. The license code is on a sticker at the downside, so it’s still in my possession.

On 2014-07-08 13:56, Merlione404 wrote:

> Okay, I am a little bit wiser now. According to a tutorial I found, the
> Linux native partition being ext4 is used to install all new programs.
> So it would be good to increase that one. However, when I use OpenUse
> installer, it does not really give me an option to increase from 20GB to
> more. When I use the custom partitioning for experts, when I try to
> increase the size of the 20 GB partition, it does not let me. Or do I
> need to first remove all partitions and create new ones manually?

Yes, you either remove partitions from the proposal (they still do not
exist), or tell the installer not to make a proposal at all, let you
start from scratch. The openSUSE installer does not write anything to
disk till the very end, and it pops up a message that it is going to
start writing. I don’t remember now, but I think I saw it once in big red.

You are completely right about this part.

On 2014-07-08 14:56, Merlione404 wrote:

> Okay, so here is a clear question for you to answer:
>
> From what I understood so far, the /home partition is located on the
> root, pathwise, but everything stored inside this path is saved on the
> home partition. Everything which is not located pathwise on /home, is
> stored on the /root partition. If I install a program, and these files
> will be contained in one of those paths you mentioned, they will be
> stored on the root partition. (If this is again un-informed, just say
> that I am incorrect, and I will do my homework better.)

Linux hides from view on what disk or partition anything goes, contrary
to Windows that uses names such as “D:\somewhere”.

So, if you create a root partition ("/"), and a home partition
("/home"), then you may get a tree like this:


/
|-- bin
|-- boot
|-- dev
|-- etc
|-- home
|-- lib
|-- lib64
|-- lost+found
|-- media
|-- mnt
|-- opt
|-- proc
|-- root
|-- run
|-- sbin
|-- srv
|-- sys
|-- tmp
|-- usr
|-- var
`-- windows

Well, what results is that everything is on the “root” partition, except
the “/home” directory, that is in fact a different partition. It is
transparent to you.

And this allows you neat tricks: for instance, lets suppose you need to
install a big program that goes into “/opt/bigprogram”. Well, you can
make that directory a different partition. In Linux/Unix we say that the
partition “such” is mounted on “that” directory, in this case,
“/opt/bigprogram”.

Notice that if “/opt/bigprogram” did exist and had files, those files
would disappear from sight, would become inaccessible - mind, not
deleted: just umounting “/opt/bigprogram” would make them appear again.

Note: Windows 7 can do something similar.

And what would the benefit be of having such a program on a different partition?

Finally, there is some important difference on how Linux installs
programs: you do not decide where they are installed (with exceptions).
It is the designer and the packager of the program who makes that
decision, and this is based on a standard, called “FHS” (Filesystem
Hierarchy Standard, see wikipedia).

Typically, programs would go to /usr/bin, libraries to /usr/lib, global
config files to /etc, global data to /var, and user config, data, or
even plugins would go to /home.

And there can be several users using the same program at the same time,
using each their own config and data.

One exception are programs that were initially designed for Windows.
Another typical one are java applications.

Another is that if you build an application, then, as you are the
“packager”, you can decide where to install the program files.

Another typical one are scripts or small standalone programs that you
may get from other people.

But in general, you install everything as an rpm, which you get
automatically with yast, apper, or zypper, from the main or official
repository, or from auxiliary repos. It is very seldom that you have to
go outside and get something, and this can be problematic. So, if you
need something that you can’t easily find, ask, and we’ll you how to
find programs.

Lastly: Welcome here and enjoy! :slight_smile:

Thank you! :smiley:


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)[/QUOTE]

On 2014-07-08 19:06, Merlione404 wrote:
>
>> Although I would have made swap bigger. How much RAM does that laptop
>> have? You need swap in order to be able to hibernate the machine. And
>> some applications need a lot of memory.
>
> My laptop has a mere 1.95 GiB RAM. I read in some tutorial that your
> swap partition needs to be at least 50% of your RAM, and preferably
> 100%. When I used the OpenSUSE installer I think it told me that my
> maximum size of this partition was about 3.1 GB. But I could be mistaken
> here.

Really, in Linux there is no limit nor a fixed recommendation for swap
size. It can be anything from zero to terabytes.

> Would it still be better to increase the swap partition, and by
> how much, in your opinion?

3 GB suffices, I think. It depends on the software you use. But /me/
would set it up to 6.

>> I would backup it up on to a DVD or two, perhaps using clonezilla. Just
>> in case. At least, make sure to keep the license code, for example to
>> install windows on a virtual machine somewhere, if needed.
>
> (About the compaq partition) I have decided to reinstall again and get
> rid of that partition. The original install on this laptop was Win XP,
> so I do not think I will miss it. Neither will I ever need all the Acer
> bloatware again. The license code is on a sticker at the downside, so
> it’s still in my possession.

Some people use it when selling the machine second hand. :-?

Me, I still have my rescue partition on my laptop, dunno why. Probably
because I still have free space on that disk - the minute I need the
space, it goes :slight_smile:

> And what would the benefit be of having such a program on a different
> partition?

Well, this minute, I can’t think why :slight_smile:

But, for instance, it may be that the program is huge, too big to fit in
the currently available disk space. So you add another one.

For instance, I have certain software that generates millions of small
files. Well, I can format that partition in a different filesystem type
that is better for such a case.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

On 07/08/2014 12:58 PM, Carlos E. R. wrote:
> On 2014-07-08 19:06, Merlione404 wrote:
>>
>>> Although I would have made swap bigger. How much RAM does that laptop
>>> have? You need swap in order to be able to hibernate the machine. And
>>> some applications need a lot of memory.
>>
>> My laptop has a mere 1.95 GiB RAM. I read in some tutorial that your
>> swap partition needs to be at least 50% of your RAM, and preferably
>> 100%. When I used the OpenSUSE installer I think it told me that my
>> maximum size of this partition was about 3.1 GB. But I could be mistaken
>> here.
>
> Really, in Linux there is no limit nor a fixed recommendation for swap
> size. It can be anything from zero to terabytes.

Carlos is correct. There is, however, a downside to running without swap. The
scheduler is somewhat restricted in that case, and the out-of-memory killer will
kick in resulting in the sudden disappearance of programs.

There are, however, some guidelines concerning a non-zero size. If you wish to
suspend to disk (also known as hibernate), then the swap must be as large as the
compressed contents of RAM plus any swapped-out material. That is where the 50%
comes from. Of course, the less RAM, the greater the need for swap. My laptop
with 4 GB RAM running a mixture of program builds and the usual web browsing
uses a bit of swap. A different machine with 2 GB RAM, and running the same type
of program mix, uses swap extensively, and one with 8 GB never uses any swap. Of
course, if you run several simultaneous programs with large virtual memory
requirements, then more swap will be used.

On 2014-07-08 20:49, Larry Finger wrote:
> On 07/08/2014 12:58 PM, Carlos E. R. wrote:

>> Really, in Linux there is no limit nor a fixed recommendation for swap
>> size. It can be anything from zero to terabytes.
>
> Carlos is correct. There is, however, a downside to running without
> swap. The scheduler is somewhat restricted in that case, and the
> out-of-memory killer will kick in resulting in the sudden disappearance
> of programs.

Exactly.

In this situation, if you have ample swap, the kernel starts using it,
and you may have time to notice and kill yourself the runaway process
before it brings the system down.

> There are, however, some guidelines concerning a non-zero size. If you
> wish to suspend to disk (also known as hibernate), then the swap must be
> as large as the compressed contents of RAM plus any swapped-out
> material. That is where the 50% comes from.

Right.

> Of course, the less RAM, the
> greater the need for swap. My laptop with 4 GB RAM running a mixture of
> program builds and the usual web browsing uses a bit of swap. A
> different machine with 2 GB RAM, and running the same type of program
> mix, uses swap extensively, and one with 8 GB never uses any swap. Of
> course, if you run several simultaneous programs with large virtual
> memory requirements, then more swap will be used.

Yes, it depends on your use.

My desktop machine has 8 GiB ram, and I often see it using about 2 gigs
of swap. The culprits usually are thunderbird and mozilla, after several
days running - this is after four days:


> top - 02:28:33 up 4 days, 11:51, 38 users,  load average: 0,27, 0,27, 0,24
> Tasks: 446 total,   1 running, 445 sleeping,   0 stopped,   0 zombie
> %Cpu(s):  3,3 us,  0,9 sy,  0,0 ni, 94,5 id,  1,3 wa,  0,0 hi,  0,0 si,  0,0 st
> KiB Mem:   8193508 total,  4395944 used,  3797564 free,   140304 buffers
> KiB Swap: 22017008 total,  2532344 used, 19484664 free,  1224480 cached
>
>   PID USER      PR  NI    VIRT    RES    SHR   SWAP S  %CPU  %MEM     TIME+ COMMAND
> 15907 cer       20   0  491496 125516   2468 243016 S 0,000 1,532   3:44.56 pine
>  3703 vscan     20   0  780512  91248   1196 191724 S 0,000 1,114   0:55.91 clamd
> 25063 cer       20   0 5496308  69212   6052 164148 S 0,000 0,845   2:35.99 soffice.bin
> 14731 cer       20   0 2068640 804016  26768 125408 S 10,57 9,813  83:06.04 firefox
> 22420 cer       20   0 1285340 294896  30408 105996 S 0,000 3,599  29:24.97 thunderbird-bin
> 11561 root      20   0  564996 231212  36592 100612 S 1,322 2,822  48:50.09 X
>  3003 mysql     20   0  760460   1968    692  83600 S 0,000 0,024   2:25.03 mysqld
>  1245 cer       20   0  855012  27952   5712  77116 S 0,000 0,341   0:21.23 evince
> 29506 cer       20   0  679724  49712   8324  55360 S 0,991 0,607  11:24.62 lyx
> 24606 cer       20   0 4010592 108584   6148  49164 S 0,000 1,325   1:24.97 java
> 12218 cer       20   0 1150208  57008   8832  44988 S 0,000 0,696   0:56.29 tomboy
>  3017 named     20   0  433832  21344   1536  38496 S 0,000 0,260   0:35.55 named

Huh, Pine sometimes uses a lot.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)