LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-16-2022, 04:45 PM   #1
guipichina
LQ Newbie
 
Registered: May 2022
Posts: 11

Rep: Reputation: 0
Why should i use lvscan --readonly and not lvscan?


Hi, I'm trying to finish my final project which is about LVM, and i cant really understand the objective/goal/purpose of this command "lvscan --readonly".

Any help is welcomed.
 
Old 05-16-2022, 06:38 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,339

Rep: Reputation: Disabled
Is the man command malfunctioning on your system? From man lvscan:
Code:
--readonly
       Run  the command in a special read-only mode which will read on-
       disk metadata without needing to take any  locks.  This  can  be
       used  to  peek  inside  metadata used by a virtual machine image
       while the virtual machine is running. No attempt will be made to
       communicate with the device-mapper kernel driver, so this option
       is unable to report whether or not LVs are actually in use.
How is this not crystal clear? I mean, the text even includes a use case example.
 
Old 05-17-2022, 04:03 AM   #3
guipichina
LQ Newbie
 
Registered: May 2022
Posts: 11

Original Poster
Rep: Reputation: 0
Well, Im not a native english speaker, so i was hoping that someone will explained to me with less technical word`s so i could start to understand the --readonly command.
 
Old 05-17-2022, 07:54 AM   #4
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,339

Rep: Reputation: Disabled
I'm not a native English speaker either. If you've already looked at various sources but found them hard to understand, please quote them or post a link, and ask specific questions about the terms and/or concepts you find difficult to understand.

For instance, which terms in the man page text would you like to have explained in greater detail?
 
Old 05-18-2022, 03:58 PM   #5
guipichina
LQ Newbie
 
Registered: May 2022
Posts: 11

Original Poster
Rep: Reputation: 0
But why would i want in a hypothethic case to use --readonly? What problem do i avoid by using it? That it's what i dont get. Why shoul i execute lvscan --readonly and not lvscan?
 
Old 05-18-2022, 07:28 PM   #6
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
The man page post above gives you one use case where the --readonly would be preferred.
Code:
       disk metadata without needing to take any  locks.  This  can  be
       used  to  peek  inside  metadata used by a virtual machine image
       while the virtual machine is running.
Think what might happen if the lv is locked while the scan is running on a file system that is in use. Potential for data corruption and/or causing a system crash in the VM. Thus it would be a good time to use that option.

I suggest you ponder the text given and think deeply about why it is stated that way
 
  


Reply

Tags
lvm



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
(OpEd) Why you should not use sshd (directly), and what you should use sundialsvcs Linux - Security 3 09-11-2016 04:33 AM
what is "inherit" in the output of lvscan? ssd7 Linux - Server 1 03-11-2010 01:44 PM
lvm2 ambiguous responses from pvscan and lvscan theking2 Linux - Server 1 12-13-2009 11:58 AM
-bash: HISTSIZE: readonly variable -bash: HISTFILESIZE: readonly variable deathsfriend99 Linux - Newbie 4 12-08-2009 12:51 PM
Difference between Readonly Filesystem and Mounting filesystem as readonly bluepenguine Linux - Newbie 1 06-19-2009 01:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration