- Community Home
- >
- Storage
- >
- HPE Nimble Storage
- >
- Array Setup and Networking
- >
- Powershell Script to Create Clone, Mount Clone
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
тАО07-26-2013 09:31 AM
тАО07-26-2013 09:31 AM
Re: Powershell - create clone, mount clone
for 2012 here is what i do, this will grab all "raw" disks, meaning anything that isnt used. this does make an assumption of only a single raw disk, but as you've shown its fairly easy to foreach it.
$disk = get-disk | ? partitionstyle -eq "RAW"
set-disk -InputObject $disk -IsOffline $false
set-disk -InputObject $disk -IsReadOnly $false
Initialize-Disk -InputObject $disk -PartitionStyle MBR
New-Partition -InputObject $disk -UseMaximumSize -DriveLetter $letter
Format-Volume -DriveLetter $letter -FileSystem NTFS -NewFileSystemLabel "data" -Confirm:$false
also, to find the next valid letter...
$volumes = gwmi win32_volume
$letters = $volumes | ? {$_.driveletter} | select -exp driveletter | sort | %{$_.replace(":","")}
$letter = [string][char]([char]'C'..[char]'Z' | ? {[char]$_ -notin $letters} | select -first 1)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2013 09:54 AM
тАО07-28-2013 09:54 AM
Re: Powershell - create clone, mount clone
I noticed that Justin Rich is using the same GroupMgmt.dll that I made. I have a script that does something similar to the original request but for SQL servers. It could easily be modified to be used for any other such scenario. It also handles all the diskpart and chkdsk needs. I have a couple of customers that use this today for refreshing Dev/Test and reporting SQL servers.
https://dl.dropboxusercontent.com/u/17785549/nimbleScripts.zip
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2013 07:57 AM
тАО07-29-2013 07:57 AM
Re: Powershell - create clone, mount clone
Hi Adam, thanks. those are very good scripts. IтАЩll see if I can customize them according to my need. IтАЩll probably spend some time on improving my PS script skill first тШ║
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2013 07:59 AM
тАО07-29-2013 07:59 AM
Re: Powershell - create clone, mount clone
Hi Justin, can you give me an example of the new-nsclone command? I couldnтАЩt figure out how to use it. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2013 02:19 PM
тАО07-29-2013 02:19 PM
Re: Powershell - create clone, mount clone
Looks like i havent fully implemented that part yet. let me take a look and see if i can get it going easily.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2013 08:42 AM
тАО08-08-2013 08:42 AM
Re: Powershell - create clone, mount clone
I've got these scripts loaded into powershell but am having trouble connecting to the array. When I enter the following command:
Connect-NSArray -SystemName 10.10.10.10 -UserName Admin -Password password
I get an error: "Couldn't login to http://10.10.10.10:4219/soap"
Can you tell what I'm missing here.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-09-2013 10:47 AM
тАО08-09-2013 10:47 AM
Re: Powershell - create clone, mount clone
so the username is case sensitive, its a lowercase a..
also you dont even need to provide that (its in case you've got other accounts setup, the default is provided)
Connect-NSArray -systemname 10.10.10.10 -password password
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-01-2013 07:16 AM
тАО10-01-2013 07:16 AM
Re: Powershell - create clone, mount clone
I'm getting back to this topic now. I still get a failure when I try to login. I'm using this command:
Connect-NSArray -systemname 10.10.10.10 -password mypass
and I get back the following error:
Couldn't login to http://10.10.10.10:4210/soap
Is there something that must be done to talk to the array on port 4210 or is it set by default?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-01-2013 11:31 AM
тАО10-01-2013 11:31 AM
Re: Powershell - create clone, mount clone
I would like to know more about GroupMgmt.dll. Is this supplied by Nimble? An open source project? Something else?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2014 10:04 PM
тАО03-17-2014 10:04 PM
Re: Powershell - create clone, mount clone
Did you ever get volume collections added to this module? Really want to create a snap/clone that is SQL consistent.
Thanks,
Mike