Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbfsb!cbnewsc!dcon From: dcon@cbnewsc.cb.att.com (david.r.connet) Newsgroups: comp.unix.wizards Subject: Re: How do you determine what physical device a file in on? Message-ID: <1991Jun25.202607.5784@cbnewsc.cb.att.com> Date: 25 Jun 91 20:26:07 GMT References: <1991Jun25.174729.11481@StarConn.com> Distribution: na Organization: AT&T Bell Laboratories Lines: 16 In article <1991Jun25.174729.11481@StarConn.com> dror@starnet.UUCP (Dror Matalon) writes: > > I suspect that there are only machine dependent ways. Given >two files x and y. I want to determine if they're on the same PHYSICAL devie. >(It's pretty easy to find out the logical device, you do an statfs on the >file). Is there a portable or a semi-portable way to do this or do I need to >go into every machine's disk drivers structures to find out. > This is probably quite complex. Especially since a filesystem may reside on more than one partition on more than one disk. Which means the file may actually reside on more than one physical disk! Aren't virtual disks great! (I even put 2 filesystems into 1 partition.) Dave Connet dcon@iwtng.att.com