Difference between revisions of "Windows import"
From OpenZFS on OS X
(Created page with " == Import == Once OpenZFSonWindows matures, automatic pool import on boot will be part of the system setup. But for now, you will have to import pools by hand after each b...") |
(→Alternatives) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 13: | Line 13: | ||
Open Task Scheduler → Action → Create Task: | Open Task Scheduler → Action → Create Task: | ||
• General: | • General: | ||
− | + | • Name: Mount [pool name] | |
− | + | • Run with highest privileges: Enabled | |
• Triggers → New → Begin the task: At log on | • Triggers → New → Begin the task: At log on | ||
• Actions → New | • Actions → New | ||
− | + | • Action: Start a program | |
− | + | • Program/script: zpool | |
− | + | • Add arguments: import [any additional options you want] [pool name] | |
+ | |||
+ | |||
+ | As an option especially for backup pools on USB (poolname usb) | ||
+ | Create a file import_usb.bat on desktop with content | ||
+ | :zpool import -f usb | ||
+ | :cls | ||
+ | :zpool list | ||
+ | :timeout /t 5 | ||
+ | <br /> | ||
+ | |||
+ | Create a file export_usb.bat on desktop | ||
+ | :zpool export -f usb | ||
+ | :cls | ||
+ | :zpool list | ||
+ | :timeout /t 5 | ||
+ | <br /> | ||
+ | |||
+ | Create a file pool_status.bat on desktop | ||
+ | :cls | ||
+ | :zpool list | ||
+ | :timeout /t 5 | ||
+ | <br /> | ||
+ | |||
+ | Start the scripts with a mouse right click -> as admin | ||
+ | <br /> | ||
+ | |||
+ | Important for removeable pools on USB:<br /> | ||
+ | |||
+ | Always export prior disconnect or pool is in suspended mode:<br /> | ||
+ | |||
+ | This can only be fixed by a reboot/reset. |
Latest revision as of 19:07, 7 April 2024
Import[edit]
Once OpenZFSonWindows matures, automatic pool import on boot will be part of the system setup.
But for now, you will have to import pools by hand after each boot.
Alternatives[edit]
Wowfunhappy commented 9 hours ago • For what it's worth, I'm currently using task scheduler to import my pool on startup. Open Task Scheduler → Action → Create Task: • General: • Name: Mount [pool name] • Run with highest privileges: Enabled • Triggers → New → Begin the task: At log on • Actions → New • Action: Start a program • Program/script: zpool • Add arguments: import [any additional options you want] [pool name]
As an option especially for backup pools on USB (poolname usb)
Create a file import_usb.bat on desktop with content
- zpool import -f usb
- cls
- zpool list
- timeout /t 5
Create a file export_usb.bat on desktop
- zpool export -f usb
- cls
- zpool list
- timeout /t 5
Create a file pool_status.bat on desktop
- cls
- zpool list
- timeout /t 5
Start the scripts with a mouse right click -> as admin
Important for removeable pools on USB:
Always export prior disconnect or pool is in suspended mode:
This can only be fixed by a reboot/reset.