how to check that all other disks except the OS disks are not with partitions
up vote
0
down vote
favorite
I want to check that all other disks except the OS disks are not with partitions by bash script
for example
we can see that sdb is with two internal partitions - sdb1 and sdb2
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
fd0 2:0 1 4K 0 disk
sda 8:0 0 150G 0 disk
├─sda1 8:1 0 500M 0 part /boot
└─sda2 8:2 0 149.5G 0 part
├─vg00-lww_root 253:0 0 40G 0 lvm /
├─vg00-lww_swap 253:1 0 7.7G 0 lvm [SWAP]
└─vg00-lww_var 253:2 0 100.9G 0 lvm /var
sdb 8:16 0 20G 0 disk
├─sdb1 8:1 0 500M 0 part
└─sdb2 8:2 0 500M 0 part
sdc 8:32 0 20G 0 disk
with which command or syntax we can verify that disk is without partitions as sdc? ( so with this command I will use it in my bash script )
according to our example - sdc disk , is without partitions
linux partition disk lsblk
add a comment |
up vote
0
down vote
favorite
I want to check that all other disks except the OS disks are not with partitions by bash script
for example
we can see that sdb is with two internal partitions - sdb1 and sdb2
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
fd0 2:0 1 4K 0 disk
sda 8:0 0 150G 0 disk
├─sda1 8:1 0 500M 0 part /boot
└─sda2 8:2 0 149.5G 0 part
├─vg00-lww_root 253:0 0 40G 0 lvm /
├─vg00-lww_swap 253:1 0 7.7G 0 lvm [SWAP]
└─vg00-lww_var 253:2 0 100.9G 0 lvm /var
sdb 8:16 0 20G 0 disk
├─sdb1 8:1 0 500M 0 part
└─sdb2 8:2 0 500M 0 part
sdc 8:32 0 20G 0 disk
with which command or syntax we can verify that disk is without partitions as sdc? ( so with this command I will use it in my bash script )
according to our example - sdc disk , is without partitions
linux partition disk lsblk
This question would probably be clearer if you split it into listing the OS disks (which you're already asking about) and the detecting whether the remaining disks are unpartitioned (which could be the core of this question).
– n.st
Nov 25 at 15:55
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I want to check that all other disks except the OS disks are not with partitions by bash script
for example
we can see that sdb is with two internal partitions - sdb1 and sdb2
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
fd0 2:0 1 4K 0 disk
sda 8:0 0 150G 0 disk
├─sda1 8:1 0 500M 0 part /boot
└─sda2 8:2 0 149.5G 0 part
├─vg00-lww_root 253:0 0 40G 0 lvm /
├─vg00-lww_swap 253:1 0 7.7G 0 lvm [SWAP]
└─vg00-lww_var 253:2 0 100.9G 0 lvm /var
sdb 8:16 0 20G 0 disk
├─sdb1 8:1 0 500M 0 part
└─sdb2 8:2 0 500M 0 part
sdc 8:32 0 20G 0 disk
with which command or syntax we can verify that disk is without partitions as sdc? ( so with this command I will use it in my bash script )
according to our example - sdc disk , is without partitions
linux partition disk lsblk
I want to check that all other disks except the OS disks are not with partitions by bash script
for example
we can see that sdb is with two internal partitions - sdb1 and sdb2
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
fd0 2:0 1 4K 0 disk
sda 8:0 0 150G 0 disk
├─sda1 8:1 0 500M 0 part /boot
└─sda2 8:2 0 149.5G 0 part
├─vg00-lww_root 253:0 0 40G 0 lvm /
├─vg00-lww_swap 253:1 0 7.7G 0 lvm [SWAP]
└─vg00-lww_var 253:2 0 100.9G 0 lvm /var
sdb 8:16 0 20G 0 disk
├─sdb1 8:1 0 500M 0 part
└─sdb2 8:2 0 500M 0 part
sdc 8:32 0 20G 0 disk
with which command or syntax we can verify that disk is without partitions as sdc? ( so with this command I will use it in my bash script )
according to our example - sdc disk , is without partitions
linux partition disk lsblk
linux partition disk lsblk
edited Nov 25 at 15:32
Jeff Schaller
37k1052121
37k1052121
asked Nov 25 at 13:24
yael
2,3321955
2,3321955
This question would probably be clearer if you split it into listing the OS disks (which you're already asking about) and the detecting whether the remaining disks are unpartitioned (which could be the core of this question).
– n.st
Nov 25 at 15:55
add a comment |
This question would probably be clearer if you split it into listing the OS disks (which you're already asking about) and the detecting whether the remaining disks are unpartitioned (which could be the core of this question).
– n.st
Nov 25 at 15:55
This question would probably be clearer if you split it into listing the OS disks (which you're already asking about) and the detecting whether the remaining disks are unpartitioned (which could be the core of this question).
– n.st
Nov 25 at 15:55
This question would probably be clearer if you split it into listing the OS disks (which you're already asking about) and the detecting whether the remaining disks are unpartitioned (which could be the core of this question).
– n.st
Nov 25 at 15:55
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f484035%2fhow-to-check-that-all-other-disks-except-the-os-disks-are-not-with-partitions%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
This question would probably be clearer if you split it into listing the OS disks (which you're already asking about) and the detecting whether the remaining disks are unpartitioned (which could be the core of this question).
– n.st
Nov 25 at 15:55