Twitter Updates

    follow me on Twitter

    G-AVLN in front of her home

    G-AVLN in front of her home

    Mostly Unix and Linux topics. But flying might get a mention too.

    Showing posts with label mount. Show all posts
    Showing posts with label mount. Show all posts

    Thursday, February 12, 2009

    Filesystem with "relatime" attribute

    Many debates have been carried out on the subject of time wasting when writing to i-node table (i.e. accessing the disk) when a user performes file access. Many alternatives have been offered over the years to avoid this.

    One of them is a filesystem attribute called relatime. It has been in existence for a while, but because nobody has been using it (by this I mean vendors rather than users), I never took sufficient time to remember how it works.

    Well, Ubuntu now uses relatime by default. Time to learn...

    Here is a quote from the best resource I found on the subject. It comes from an article posted by Jonathan Corbet on lwn.net: 

    "Another approach was added in 2.6.20: the relatime mount option. If this flag is set, access times are only updated if they are (before the update) earlier than the modification time. This change allows utilities to see if the current version of a file has been read, but still cuts down significantly on atime updates. This option is not heavily used, perhaps because few people have heard of it and many distributions lack a version of mount which is new enough to know about it. Using relatime can still confuse tools which want to ask questions like "has this file been accessed in the last week?"

    Hint: if you want to exeriment with the behaviour, use the stat command. Read and modify a file few times, and observe how the atime (access time) is only updated if the last access was done before the last content change.

    Thursday, September 25, 2008

    CD to disk file transfer on HP-UX

    After a long pause, and several projects later, I'm back getting ready our uxheaven.com (our back-room of variety of UNIX boxes, that will be used for training multi-vendor courses).

    Today, it's configuring HP-UX boxes: one is the B.11.11 U9000, the other B.11.23 on Itanium.

    Had to look up some of my old posts to fix various network settings, and I reckon the /etc/rc.config.d/netconf file will now stay in my memory (sad - it takes few weeks and the detail is gone!).

    Once the network was fine, needed to add software from CDs, to a central repository of documents and future depot files. For the time being, all I need is to have it all on hard disk. Quick refresher on the process:

    1. Identify the special file for CD-ROM:

    # ioscan -funC disk

    showed it to be /dev/c1t0d0

    2. Create mount point directory
    I like the way Linux treats removable media, so my new mount directory became:

    # mkdir -p /media/cdrom

    3. Mount the disk:

    # mount -F cdfs /dev/c1t0d0 /media/cdrom

    4. Finally, create directory for the documents, and copy the CD content

    # mkdir /usr/doc
    # cp -rf /media/cdrom /usr/doc


    Ready for use...

    Blog Archive