- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- LVM device special name
Operating System - Linux
1753521
Members
4648
Online
108795
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
02-07-2010 06:12 PM
02-07-2010 06:12 PM
Re: LVM device special name
Many thinks again, Matti.
However, from what you have mentioned, if fstab uses LABEL= or UUID= format to specify device names, then readlink cannot be used to match them in mtab. And that is a situation I cannot exclude.
My real intention is to search in mtab and try to match every FS in fstab. Originally it was written as:
for each line in fstab do
for each line in mtab do
if the mount point in fstab is exactly the same as the one in mtab then a match is found, go to the next line in fstab;
else if the device name in fstab is exactly the same as the one in mtab then a match is found, go to the next line in fstab;
else go to the next line in mtab.
The problem with the above code is, when a symlink is used in fstab for a LVM device, neither the corresponding mount points nor the corresponding device names are exactly the same. Hence the matching logic needs to be modified.
I think I still have another option to fix it. That is, to use the readlink function for a mount point in fstab, that should always return its real path which is listed in mtab, right? I try not to use lstat since it could hang on staled NFS.
Any suggestions will be appreciated!
However, from what you have mentioned, if fstab uses LABEL=
My real intention is to search in mtab and try to match every FS in fstab. Originally it was written as:
for each line in fstab do
for each line in mtab do
if the mount point in fstab is exactly the same as the one in mtab then a match is found, go to the next line in fstab;
else if the device name in fstab is exactly the same as the one in mtab then a match is found, go to the next line in fstab;
else go to the next line in mtab.
The problem with the above code is, when a symlink is used in fstab for a LVM device, neither the corresponding mount points nor the corresponding device names are exactly the same. Hence the matching logic needs to be modified.
I think I still have another option to fix it. That is, to use the readlink function for a mount point in fstab, that should always return its real path which is listed in mtab, right? I try not to use lstat since it could hang on staled NFS.
Any suggestions will be appreciated!
- « Previous
-
- 1
- 2
- Next »
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP