Re: find hdisk given a filename

From: Justin Bleistein (justin.bleistein_at_TOWERSPERRIN.COM)
Date: 12/27/04

  • Next message: Leyden, Joseph: "Re: find hdisk given a filename"
    Date:         Mon, 27 Dec 2004 14:10:55 -0500
    To: aix-l@Princeton.EDU
    
    

    I'm assuming you mean, you want to know what physical hard disk a file
    like: "/etc/hosts" resides on?
    To figure that out find out which filesystem the file is on (considering
    you know the fully qualified pathname of the file "i.e. - /etc/hosts":

    # cd /etc
    # ls -l hosts
    info on hosts file...
    #

    Now check the filesystem you are currently in, the filesystem/directory to
    file lives:

    # df -k .
    /dev/hd4 xx xx xx xx xx /
    #

    Now the directory: "/etc/" which lives on filesystem: "/" which sits on
    logical volume: "/dev/hd4". Now you must find out
    what physical hard disk(s) the "/dev/hd4" logical volume lives on:

    # lslv -l hd4 (hd4 - being the logical volume name):

    PV COPIES IN BAND DISTRIBUTION
    hdisk0 001:000:000 100% 001:000:000:000:000
    hdisk1 001:000:000 100% 001:000:000:000:000

    Under the PV column will be the name of the hdisk the logical volume:
    "hd4" resides on. Then just trace that back to the file in
    the same hierarchy I explained earlier. Now the list of two physical
    volumes/disks means this logical volume is either mirrored
    or is soo big that it spans multiple disks.

    Hope this helps.
    Thanks.

    --Justin Richard Bleistein
     AIX Systems Administrator

    "Leyden, Joseph" <LeydenJ@METRO.NET>
    Sent by: IBM AIX Discussion List <aix-l@Princeton.EDU>
    12/27/2004 01:43 PM
    Please respond to
    IBM AIX Discussion List <aix-l@Princeton.EDU>

    To
    aix-l@Princeton.EDU
    cc

    Subject
    Re: find hdisk given a filename

    Is there a command to find out which hdiskXX a particular file belong to?
    thank you in advance ...

    Joe

    NOTICE: This communication may contain confidential, proprietary or
    legally privileged information. It is intended only for the person(s) to
    whom it is addressed. If you are not an intended recipient, you may not
    use, read, retransmit, disseminate or take any action in reliance upon it.
    Please notify the sender that you have received it in error and
    immediately delete the entire communication, including any attachments.
    Towers Perrin does not encrypt and cannot ensure the confidentiality or
    integrity of external e-mail communications and, therefore, cannot be
    responsible for any unauthorized access, disclosure, use or tampering that
    may occur during transmission. This communication is not intended to
    create or modify any obligation, contract or warranty of Towers Perrin,
    unless the firm clearly expresses such an intent.


  • Next message: Leyden, Joseph: "Re: find hdisk given a filename"

    Relevant Pages

    • Re: file bigger then 2GB
      ... The filesystem is ... >NTFS, and there should be no constraints for filesize. ... I just copied an 8.9gb file from one physical hard ...
      (microsoft.public.windowsxp.help_and_support)
    • Re: Something Not Rigth!
      ... physical hard disk, -that like anything else stored in a memory chip, it ... in department stores that are deactivated by running them over a magnet. ... When a file is written to a physical hard drive it is there permanantly, ...
      (microsoft.public.security)
    • Re: New volume group not imported on reboot
      ... >be present automatically when we boot. ... >The filesystem that resides in this volume group is referenced in ... yes at system restart?" ...
      (comp.unix.aix)
    • Re: Importing a file (not a module).
      ... I'd like to 'import' a file that resides somewhere on my filesystem without ... relative path from the importer's module, and not from the CWD (that's another ... But beware - it does not create a module, ...
      (comp.lang.python)
    • New volume group not imported on reboot
      ... It imports just fine if I run the command manually, ... be present automatically when we boot. ... The filesystem that resides in this volume group is referenced in ...
      (comp.unix.aix)