lsblk - what are the possible values for the column “state”
Clash Royale CLAN TAG#URR8PPP
I am creating an overview site of my hard drives (HDD) I have installed in a machine. That website requests the HDDs including the state through a lsblk command. I want to indicate the status (state) on the website by a traffic light system but the only status so far that I am aware of is "running". I did not have any failures yet hence why my question.
Can anybody tell me what other statuses there are for the state column?
lsblk
add a comment |
I am creating an overview site of my hard drives (HDD) I have installed in a machine. That website requests the HDDs including the state through a lsblk command. I want to indicate the status (state) on the website by a traffic light system but the only status so far that I am aware of is "running". I did not have any failures yet hence why my question.
Can anybody tell me what other statuses there are for the state column?
lsblk
add a comment |
I am creating an overview site of my hard drives (HDD) I have installed in a machine. That website requests the HDDs including the state through a lsblk command. I want to indicate the status (state) on the website by a traffic light system but the only status so far that I am aware of is "running". I did not have any failures yet hence why my question.
Can anybody tell me what other statuses there are for the state column?
lsblk
I am creating an overview site of my hard drives (HDD) I have installed in a machine. That website requests the HDDs including the state through a lsblk command. I want to indicate the status (state) on the website by a traffic light system but the only status so far that I am aware of is "running". I did not have any failures yet hence why my question.
Can anybody tell me what other statuses there are for the state column?
lsblk
lsblk
edited Feb 25 at 20:29
Rui F Ribeiro
41.6k1483141
41.6k1483141
asked Feb 25 at 17:31
realShadowrealShadow
12
12
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Looking at the source code for lsblk
, for the STATE column, the only states defined are running
or suspended
adding a manpage as comment (yes, sorry realShadow, but it was a bit hidden): man dmsetup "suspend ... Suspends a device. Any I/O that has already been mapped by the device but has not yet completed will be flushed. Any further I/O to that device will be postponed for as long as the device is suspended. ..." . I verified it affects lsblk's output. So chances are it's meaningful in relation to stuff like LVM etc. I don't know why it's also displayed for physical devices.
– A.B
Feb 25 at 18:34
Fantastic. I will head over and review the items there and see what other information I can draw out of the documentation for my website.
– realShadow
Feb 26 at 19:44
add a comment |
You can specify output options -o
for lsblk, in this case STATE
is what you are looking for.
sudo lsblk -a -o NAME,MAJ:MIN,PARTTYPE,STATE
NAME MAJ:MIN PARTTYPE STATE
sda 8:0 running
├─sda1 8:1 21686148-6449-6e6f-744e-656564454649
├─sda2 8:2 0fc63daf-8483-4772-8e79-3d69d8477de4
├─sda3 8:3 0fc63daf-8483-4772-8e79-3d69d8477de4
└─sda4 8:4 0fc63daf-8483-4772-8e79-3d69d8477de4
lsblk --help
will give you more options to include if needed.
I downvoted because your answer does not answer the OP's question or even attempt to answer the OP's question.
– fpmurphy
Feb 25 at 17:58
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f502948%2flsblk-what-are-the-possible-values-for-the-column-state%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Looking at the source code for lsblk
, for the STATE column, the only states defined are running
or suspended
adding a manpage as comment (yes, sorry realShadow, but it was a bit hidden): man dmsetup "suspend ... Suspends a device. Any I/O that has already been mapped by the device but has not yet completed will be flushed. Any further I/O to that device will be postponed for as long as the device is suspended. ..." . I verified it affects lsblk's output. So chances are it's meaningful in relation to stuff like LVM etc. I don't know why it's also displayed for physical devices.
– A.B
Feb 25 at 18:34
Fantastic. I will head over and review the items there and see what other information I can draw out of the documentation for my website.
– realShadow
Feb 26 at 19:44
add a comment |
Looking at the source code for lsblk
, for the STATE column, the only states defined are running
or suspended
adding a manpage as comment (yes, sorry realShadow, but it was a bit hidden): man dmsetup "suspend ... Suspends a device. Any I/O that has already been mapped by the device but has not yet completed will be flushed. Any further I/O to that device will be postponed for as long as the device is suspended. ..." . I verified it affects lsblk's output. So chances are it's meaningful in relation to stuff like LVM etc. I don't know why it's also displayed for physical devices.
– A.B
Feb 25 at 18:34
Fantastic. I will head over and review the items there and see what other information I can draw out of the documentation for my website.
– realShadow
Feb 26 at 19:44
add a comment |
Looking at the source code for lsblk
, for the STATE column, the only states defined are running
or suspended
Looking at the source code for lsblk
, for the STATE column, the only states defined are running
or suspended
answered Feb 25 at 17:56
fpmurphyfpmurphy
2,456916
2,456916
adding a manpage as comment (yes, sorry realShadow, but it was a bit hidden): man dmsetup "suspend ... Suspends a device. Any I/O that has already been mapped by the device but has not yet completed will be flushed. Any further I/O to that device will be postponed for as long as the device is suspended. ..." . I verified it affects lsblk's output. So chances are it's meaningful in relation to stuff like LVM etc. I don't know why it's also displayed for physical devices.
– A.B
Feb 25 at 18:34
Fantastic. I will head over and review the items there and see what other information I can draw out of the documentation for my website.
– realShadow
Feb 26 at 19:44
add a comment |
adding a manpage as comment (yes, sorry realShadow, but it was a bit hidden): man dmsetup "suspend ... Suspends a device. Any I/O that has already been mapped by the device but has not yet completed will be flushed. Any further I/O to that device will be postponed for as long as the device is suspended. ..." . I verified it affects lsblk's output. So chances are it's meaningful in relation to stuff like LVM etc. I don't know why it's also displayed for physical devices.
– A.B
Feb 25 at 18:34
Fantastic. I will head over and review the items there and see what other information I can draw out of the documentation for my website.
– realShadow
Feb 26 at 19:44
adding a manpage as comment (yes, sorry realShadow, but it was a bit hidden): man dmsetup "suspend ... Suspends a device. Any I/O that has already been mapped by the device but has not yet completed will be flushed. Any further I/O to that device will be postponed for as long as the device is suspended. ..." . I verified it affects lsblk's output. So chances are it's meaningful in relation to stuff like LVM etc. I don't know why it's also displayed for physical devices.
– A.B
Feb 25 at 18:34
adding a manpage as comment (yes, sorry realShadow, but it was a bit hidden): man dmsetup "suspend ... Suspends a device. Any I/O that has already been mapped by the device but has not yet completed will be flushed. Any further I/O to that device will be postponed for as long as the device is suspended. ..." . I verified it affects lsblk's output. So chances are it's meaningful in relation to stuff like LVM etc. I don't know why it's also displayed for physical devices.
– A.B
Feb 25 at 18:34
Fantastic. I will head over and review the items there and see what other information I can draw out of the documentation for my website.
– realShadow
Feb 26 at 19:44
Fantastic. I will head over and review the items there and see what other information I can draw out of the documentation for my website.
– realShadow
Feb 26 at 19:44
add a comment |
You can specify output options -o
for lsblk, in this case STATE
is what you are looking for.
sudo lsblk -a -o NAME,MAJ:MIN,PARTTYPE,STATE
NAME MAJ:MIN PARTTYPE STATE
sda 8:0 running
├─sda1 8:1 21686148-6449-6e6f-744e-656564454649
├─sda2 8:2 0fc63daf-8483-4772-8e79-3d69d8477de4
├─sda3 8:3 0fc63daf-8483-4772-8e79-3d69d8477de4
└─sda4 8:4 0fc63daf-8483-4772-8e79-3d69d8477de4
lsblk --help
will give you more options to include if needed.
I downvoted because your answer does not answer the OP's question or even attempt to answer the OP's question.
– fpmurphy
Feb 25 at 17:58
add a comment |
You can specify output options -o
for lsblk, in this case STATE
is what you are looking for.
sudo lsblk -a -o NAME,MAJ:MIN,PARTTYPE,STATE
NAME MAJ:MIN PARTTYPE STATE
sda 8:0 running
├─sda1 8:1 21686148-6449-6e6f-744e-656564454649
├─sda2 8:2 0fc63daf-8483-4772-8e79-3d69d8477de4
├─sda3 8:3 0fc63daf-8483-4772-8e79-3d69d8477de4
└─sda4 8:4 0fc63daf-8483-4772-8e79-3d69d8477de4
lsblk --help
will give you more options to include if needed.
I downvoted because your answer does not answer the OP's question or even attempt to answer the OP's question.
– fpmurphy
Feb 25 at 17:58
add a comment |
You can specify output options -o
for lsblk, in this case STATE
is what you are looking for.
sudo lsblk -a -o NAME,MAJ:MIN,PARTTYPE,STATE
NAME MAJ:MIN PARTTYPE STATE
sda 8:0 running
├─sda1 8:1 21686148-6449-6e6f-744e-656564454649
├─sda2 8:2 0fc63daf-8483-4772-8e79-3d69d8477de4
├─sda3 8:3 0fc63daf-8483-4772-8e79-3d69d8477de4
└─sda4 8:4 0fc63daf-8483-4772-8e79-3d69d8477de4
lsblk --help
will give you more options to include if needed.
You can specify output options -o
for lsblk, in this case STATE
is what you are looking for.
sudo lsblk -a -o NAME,MAJ:MIN,PARTTYPE,STATE
NAME MAJ:MIN PARTTYPE STATE
sda 8:0 running
├─sda1 8:1 21686148-6449-6e6f-744e-656564454649
├─sda2 8:2 0fc63daf-8483-4772-8e79-3d69d8477de4
├─sda3 8:3 0fc63daf-8483-4772-8e79-3d69d8477de4
└─sda4 8:4 0fc63daf-8483-4772-8e79-3d69d8477de4
lsblk --help
will give you more options to include if needed.
edited Feb 25 at 18:09
answered Feb 25 at 17:39
fugitivefugitive
806421
806421
I downvoted because your answer does not answer the OP's question or even attempt to answer the OP's question.
– fpmurphy
Feb 25 at 17:58
add a comment |
I downvoted because your answer does not answer the OP's question or even attempt to answer the OP's question.
– fpmurphy
Feb 25 at 17:58
I downvoted because your answer does not answer the OP's question or even attempt to answer the OP's question.
– fpmurphy
Feb 25 at 17:58
I downvoted because your answer does not answer the OP's question or even attempt to answer the OP's question.
– fpmurphy
Feb 25 at 17:58
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f502948%2flsblk-what-are-the-possible-values-for-the-column-state%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown