Ask Your Question

check physical disk

asked 2014-11-19 11:25:30 -0600

Chutki gravatar image

I have below linux script

 cre_disk=$(ls /dev/sd[b-z])
    for disk in $cre_isk
    pvcreate $i

My understanding from the above code is, it is checking the sdb,sdc..sdz disk file. if it exist, then do physical volume creation.

what my requirement is, need to convert the above linux into puppet(lvm creation). I know the command for physical volume creation

physical volume{'/dev/sdb':
ensure => 'present'

I am not sure how to check the physical disk (cre_disk=$(ls /dev/sd[b-z])). is there any resource available or puppet would take care without any resource.

NOTE:I have posed this same question in different format in previous question post. Please ignore the topic name is, "check physical disk directory"

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-11-20 16:49:40 -0600

spuder gravatar image

Puppet is a configuration management system. It is intended for managing Packages, Files, and Services (called the trifecta).

What you are looking to do falls outside of the scope of puppets abilities. lvm creation should be done via a script, or as part of the provisioning process.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-11-19 11:25:30 -0600

Seen: 289 times

Last updated: Nov 20 '14