Skip to content.

Scientific Linux

Sections
Personal tools
You are here: Home » Documentation » FAQ » Technical Questions

Technical Questions

Technical Questions which apply to Scientific Linux

Q. When I try to read a 12GB file from C on my Linux box, it fails because the file is over 2GB. How do I read this file??

A1. A quick test program shows that simply doing read(2) on a 6 GByte file works just fine. But if you need to seek it, use __llseek(2) because lseek(2) can only address 2 GBytes. To use stdio functions you need to define some compiler flags, as discussed below.

A2. This is a limitation of the libc calls. You need to use the large format version/flags for open, close, fread etc, when compiling your program. This is discussed on this web page Large File Programming .
An example is
gcc -o bonnie_large -DHAVE_LARGEFILE_SUPPORT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE bonnie_large.c

Q. During an kickstart based install. If I mount an NFS area during %post, my transfers are very slow. What options should I mount with to speed them up?

A1. During the install you can go to ctrl-alt-f2 where there will be a bash prompt. Type "mount" to see which options /mnt/source had been mounted with.

A2. Here's what I passed to the -o option in the mount command:
ro,nolock,vers=3,rsize=32768,wsize=32768,hard,udp

Q. Is it possible to setup a partial yum repo? I want it to be some combination of the normal Scientific Linux repo, and local rpm's on my NFS server?

A. It's very possible, and quite easy.

  1. On the NFS server, create a directory where you want everything For this example we'll call use /export/localrepo
  2. On the NFS server, make sure createrepo is installed
    yum install createrepo
  3. On the NFS server, copy all your rpm's into that directory.
    It actually can be in a directory within that directory. They can also be link's, but those links have to be visible to the clients when it's nfs mounted, so sometime's it's easier to just do the regular stuff, and dump everything into the directory.
  4. On the NFS server, create the yum headers for that directory
    (For S.L. 3.0.x clients) yum-arch -l /export/localrepo
    (For S.L. 4.x clients) createrepo /export/localrepo
  5. Everything is now setup on the server
  6. On the client, mount the nfs directory, for our example, we'll say we are mounting on /mnt/repo
    mount myserver:/export/localrepo /mnt/repo
  7. On the clients, put this local repo into your yum configuration
    • S.L. 3.0.x - put the following on the end of /etc/yum.conf
      [localrepo]
      name=local repo
      baseurl=file:///mnt/repo/
      
    • S.L. 4.x - create the file /etc/yum.repos.d/local.repo that looks like
      [localrepo]
      name=local repo
      baseurl=file:///mnt/repo/
      enabled=1
      
  8. On the clients, just use yum as normal
    yum update, yum list, yum install ...

Created by dawson
Last modified 2006-03-23 11:26 AM
 

Powered by Plone

This site conforms to the following standards: