- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to find the physical drive for a directory
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2005 04:32 AM
04-08-2005 04:32 AM
How to find the physical drive for a directory
Somehow I have misconfigured one of my systems.
I have a directory /f01 that is listed under the root directory and is functional for creating files, etc. When I do a bdf command it is not listed and is not listed in my /etc/fstab nor /etc/mnttab files.
Since this directory is not where it think it is, how can I tell which volume group it belongs to and which physical disk the data is sitting on?
Thanks,
Randy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2005 04:37 AM
04-08-2005 04:37 AM
Re: How to find the physical drive for a directory
As you describe it, it's not a mounted file system and therefore must reside in your root directory: /. That's not good. I would remove it and re-create it elsewhere before you start loading anything there, other wise you risk filling your root filesystem and crashing the machine.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2005 04:43 AM
04-08-2005 04:43 AM
Re: How to find the physical drive for a directory
# ll -d /f01
and see if it is a link to another directory. If it is you will see something like:
/f01 -> /some_other_directory
Something else to try:
# cd /f01
# bdf .
See what filesystem comes up from the bdf command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2005 05:20 AM
04-08-2005 05:20 AM
Re: How to find the physical drive for a directory
the filesystem that "filename" resides on.
You will have to parse the filesystem name
to see if it's NFS or local, and if local,
to get the name of the volume group.
If you want to do this from C then I believe
you will have to use stat(), statvfs() or
somesuch.
Determining the physical disk a file resides
on does not make sense because a logical
volume can span more than one disk, can be
mirrored on multiple disks, etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2005 12:48 PM
04-09-2005 12:48 PM
Re: How to find the physical drive for a directory
bdf /f01
will show you the mountpoint (probably /). For a directory to be listed in bdf and fstab, it must be a mountpoint, that is, a separate logical volume. If /f01 is going to have more than a few Kbytes in it, consider moving it to a different directory such as /var (like /var/f01). If you can't change your applications that refer to this directory, you can move the directory:
mv /f01 /var
Then create a symbolic link so it look the same:
ln -s /var/f01 /f01
Now, /f01 will look the same but physically reside on /var (bdf /f01)
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2005 03:07 PM
04-09-2005 03:07 PM
Re: How to find the physical drive for a directory
If you have allocated this for some application and do not want to assign it to some other file system. Then you can do this also.
Find out or create logical volume on which you actually wanted to put it. If file system is not there then you may create it freshly using some free disk space. Then mount that file system on some other mount point say /f02, copy all files from /f01 to /f02 using cpio or any other convient method and now umount file system from /f02 and mount it on /f01. Also make entry in /etc/fstab for auto mounting.
After successful completion and checking applications, having stop applications umount /f01 then move /f01 to some other directory say /f03(For removing safely) and recreate a directory /f01 and remount file system /f01 and start application. When everything is fine then you can remove the directory where you moved original (here /f03). This will surely make sense if your /f01 is taking a lot of space in your root.
HTH,
Devender
HTH,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2005 12:04 AM
04-10-2005 12:04 AM
Re: How to find the physical drive for a directory
bdf .
This will show the information for the filesystem of which /f01 is a part of.
Ashish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2005 06:25 AM
04-10-2005 06:25 AM
Re: How to find the physical drive for a directory
cd /etc; ls -l fstab*
to see if any of my sysadmin collegues removed the filesystem and were kind enough to leave a copy there
Regds,
Kaps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2005 01:57 AM
04-18-2005 01:57 AM
Re: How to find the physical drive for a directory
It looks like when I wanted to create a new logical volume, I created what I wanted for a mount-point, but did not actually mount it to where it should have been, so it stayed 'mounted' to root.
Randy