Adding External USB Drive & Reboot Won't Mount Zpool
up vote
1
down vote
favorite
Ubuntu server 16.04.5 LTS has been running well with external USB drive for years but we've outgrown it. Trying to add a larger external USB drive before removing the old.
I have a four drive RAIDZ created in 2016. Ever since the create commands, it's auto-mounted at boot.
output of dmesg (hope this works)
I assume adding a drive altered the available list of drives and when zfs goes to grab them, doesn't find the right drives in the right order. But I don't know where to go to "hardwire" the assignment, in order for there to be no assumptions about which drives make the RAIDZ.
I have beginner skills at Ubuntu at best and would appreciate any insight and assitance. Thank you!
EDIT
With FDISK -l I've found that device assignment does change when I have both external USB drives attached. When I attach the new external USB drive and reboot, devices change as follows:
sda -> sdf;
sdb -> sda;
sdc -> sdb;
sdd -> sdc;
sde -> sdd;
sdf -> sde;
sdg is the new drive
How do I overcome the dynamic assignment of a device name like this so my mounts, etc. are always correct?
Thanks!
boot usb mount zfs
add a comment |
up vote
1
down vote
favorite
Ubuntu server 16.04.5 LTS has been running well with external USB drive for years but we've outgrown it. Trying to add a larger external USB drive before removing the old.
I have a four drive RAIDZ created in 2016. Ever since the create commands, it's auto-mounted at boot.
output of dmesg (hope this works)
I assume adding a drive altered the available list of drives and when zfs goes to grab them, doesn't find the right drives in the right order. But I don't know where to go to "hardwire" the assignment, in order for there to be no assumptions about which drives make the RAIDZ.
I have beginner skills at Ubuntu at best and would appreciate any insight and assitance. Thank you!
EDIT
With FDISK -l I've found that device assignment does change when I have both external USB drives attached. When I attach the new external USB drive and reboot, devices change as follows:
sda -> sdf;
sdb -> sda;
sdc -> sdb;
sdd -> sdc;
sde -> sdd;
sdf -> sde;
sdg is the new drive
How do I overcome the dynamic assignment of a device name like this so my mounts, etc. are always correct?
Thanks!
boot usb mount zfs
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
Ubuntu server 16.04.5 LTS has been running well with external USB drive for years but we've outgrown it. Trying to add a larger external USB drive before removing the old.
I have a four drive RAIDZ created in 2016. Ever since the create commands, it's auto-mounted at boot.
output of dmesg (hope this works)
I assume adding a drive altered the available list of drives and when zfs goes to grab them, doesn't find the right drives in the right order. But I don't know where to go to "hardwire" the assignment, in order for there to be no assumptions about which drives make the RAIDZ.
I have beginner skills at Ubuntu at best and would appreciate any insight and assitance. Thank you!
EDIT
With FDISK -l I've found that device assignment does change when I have both external USB drives attached. When I attach the new external USB drive and reboot, devices change as follows:
sda -> sdf;
sdb -> sda;
sdc -> sdb;
sdd -> sdc;
sde -> sdd;
sdf -> sde;
sdg is the new drive
How do I overcome the dynamic assignment of a device name like this so my mounts, etc. are always correct?
Thanks!
boot usb mount zfs
Ubuntu server 16.04.5 LTS has been running well with external USB drive for years but we've outgrown it. Trying to add a larger external USB drive before removing the old.
I have a four drive RAIDZ created in 2016. Ever since the create commands, it's auto-mounted at boot.
output of dmesg (hope this works)
I assume adding a drive altered the available list of drives and when zfs goes to grab them, doesn't find the right drives in the right order. But I don't know where to go to "hardwire" the assignment, in order for there to be no assumptions about which drives make the RAIDZ.
I have beginner skills at Ubuntu at best and would appreciate any insight and assitance. Thank you!
EDIT
With FDISK -l I've found that device assignment does change when I have both external USB drives attached. When I attach the new external USB drive and reboot, devices change as follows:
sda -> sdf;
sdb -> sda;
sdc -> sdb;
sdd -> sdc;
sde -> sdd;
sdf -> sde;
sdg is the new drive
How do I overcome the dynamic assignment of a device name like this so my mounts, etc. are always correct?
Thanks!
boot usb mount zfs
boot usb mount zfs
edited Dec 1 at 19:35
asked Dec 1 at 17:41
Kazz
134
134
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
The normal way to do this is to add the devices to you zpool using their UUIDs or WWNs, which are available in /dev/disk/by-uuid
and /dev/disk/by-id
. This and more details about persistent naming for disks is available here.
To switch an existing pool over to the by-id
method, try running:
sudo zpool export tank
sudo zpool import -d /dev/disk/by-id -a
The options tell import
to search for devices in that directory, and keep searching until all devices have been checked whether they have ZFS data on them or not (even if there are multiple pools).
My create command was by-id - sudo zpool create -f shares0 raidz /dev/disk/by-id/ata-Hitachi_HUA723030ALA640_MK0331YHGDPGXA /dev/disk/by-id/ata-Hitachi_HUA723030ALA640_MK0331YHGDR86A /dev/disk/by-id/ata-Hitachi_HUA723030ALA640_MK0351YHG8HMRA /dev/disk/by-id/ata-Hitachi_HUA723030ALA640_MK0331YHGDR5ZA and the /etc/zfs/zpool.cache, while not really human readable, clearly has device paths (eg. /dev/sda) throughout it.
– Kazz
Dec 2 at 17:09
It took some time to satisfy myself that the backup I did have was complete and accurate before moving forward with the export/import. Once I was happy with the smaller backup content I took the "risk" of exporting and importing which was successful. Currently backing up to the larger external drive. Odd that the create commands used UUID but the zfs mount reverted to device paths. This fixed it as evident from the output of the zpool status command. Thank you!
– Kazz
Dec 6 at 16:16
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
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',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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%2faskubuntu.com%2fquestions%2f1097712%2fadding-external-usb-drive-reboot-wont-mount-zpool%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
The normal way to do this is to add the devices to you zpool using their UUIDs or WWNs, which are available in /dev/disk/by-uuid
and /dev/disk/by-id
. This and more details about persistent naming for disks is available here.
To switch an existing pool over to the by-id
method, try running:
sudo zpool export tank
sudo zpool import -d /dev/disk/by-id -a
The options tell import
to search for devices in that directory, and keep searching until all devices have been checked whether they have ZFS data on them or not (even if there are multiple pools).
My create command was by-id - sudo zpool create -f shares0 raidz /dev/disk/by-id/ata-Hitachi_HUA723030ALA640_MK0331YHGDPGXA /dev/disk/by-id/ata-Hitachi_HUA723030ALA640_MK0331YHGDR86A /dev/disk/by-id/ata-Hitachi_HUA723030ALA640_MK0351YHG8HMRA /dev/disk/by-id/ata-Hitachi_HUA723030ALA640_MK0331YHGDR5ZA and the /etc/zfs/zpool.cache, while not really human readable, clearly has device paths (eg. /dev/sda) throughout it.
– Kazz
Dec 2 at 17:09
It took some time to satisfy myself that the backup I did have was complete and accurate before moving forward with the export/import. Once I was happy with the smaller backup content I took the "risk" of exporting and importing which was successful. Currently backing up to the larger external drive. Odd that the create commands used UUID but the zfs mount reverted to device paths. This fixed it as evident from the output of the zpool status command. Thank you!
– Kazz
Dec 6 at 16:16
add a comment |
up vote
0
down vote
accepted
The normal way to do this is to add the devices to you zpool using their UUIDs or WWNs, which are available in /dev/disk/by-uuid
and /dev/disk/by-id
. This and more details about persistent naming for disks is available here.
To switch an existing pool over to the by-id
method, try running:
sudo zpool export tank
sudo zpool import -d /dev/disk/by-id -a
The options tell import
to search for devices in that directory, and keep searching until all devices have been checked whether they have ZFS data on them or not (even if there are multiple pools).
My create command was by-id - sudo zpool create -f shares0 raidz /dev/disk/by-id/ata-Hitachi_HUA723030ALA640_MK0331YHGDPGXA /dev/disk/by-id/ata-Hitachi_HUA723030ALA640_MK0331YHGDR86A /dev/disk/by-id/ata-Hitachi_HUA723030ALA640_MK0351YHG8HMRA /dev/disk/by-id/ata-Hitachi_HUA723030ALA640_MK0331YHGDR5ZA and the /etc/zfs/zpool.cache, while not really human readable, clearly has device paths (eg. /dev/sda) throughout it.
– Kazz
Dec 2 at 17:09
It took some time to satisfy myself that the backup I did have was complete and accurate before moving forward with the export/import. Once I was happy with the smaller backup content I took the "risk" of exporting and importing which was successful. Currently backing up to the larger external drive. Odd that the create commands used UUID but the zfs mount reverted to device paths. This fixed it as evident from the output of the zpool status command. Thank you!
– Kazz
Dec 6 at 16:16
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
The normal way to do this is to add the devices to you zpool using their UUIDs or WWNs, which are available in /dev/disk/by-uuid
and /dev/disk/by-id
. This and more details about persistent naming for disks is available here.
To switch an existing pool over to the by-id
method, try running:
sudo zpool export tank
sudo zpool import -d /dev/disk/by-id -a
The options tell import
to search for devices in that directory, and keep searching until all devices have been checked whether they have ZFS data on them or not (even if there are multiple pools).
The normal way to do this is to add the devices to you zpool using their UUIDs or WWNs, which are available in /dev/disk/by-uuid
and /dev/disk/by-id
. This and more details about persistent naming for disks is available here.
To switch an existing pool over to the by-id
method, try running:
sudo zpool export tank
sudo zpool import -d /dev/disk/by-id -a
The options tell import
to search for devices in that directory, and keep searching until all devices have been checked whether they have ZFS data on them or not (even if there are multiple pools).
answered Dec 2 at 3:37
Dan
1407
1407
My create command was by-id - sudo zpool create -f shares0 raidz /dev/disk/by-id/ata-Hitachi_HUA723030ALA640_MK0331YHGDPGXA /dev/disk/by-id/ata-Hitachi_HUA723030ALA640_MK0331YHGDR86A /dev/disk/by-id/ata-Hitachi_HUA723030ALA640_MK0351YHG8HMRA /dev/disk/by-id/ata-Hitachi_HUA723030ALA640_MK0331YHGDR5ZA and the /etc/zfs/zpool.cache, while not really human readable, clearly has device paths (eg. /dev/sda) throughout it.
– Kazz
Dec 2 at 17:09
It took some time to satisfy myself that the backup I did have was complete and accurate before moving forward with the export/import. Once I was happy with the smaller backup content I took the "risk" of exporting and importing which was successful. Currently backing up to the larger external drive. Odd that the create commands used UUID but the zfs mount reverted to device paths. This fixed it as evident from the output of the zpool status command. Thank you!
– Kazz
Dec 6 at 16:16
add a comment |
My create command was by-id - sudo zpool create -f shares0 raidz /dev/disk/by-id/ata-Hitachi_HUA723030ALA640_MK0331YHGDPGXA /dev/disk/by-id/ata-Hitachi_HUA723030ALA640_MK0331YHGDR86A /dev/disk/by-id/ata-Hitachi_HUA723030ALA640_MK0351YHG8HMRA /dev/disk/by-id/ata-Hitachi_HUA723030ALA640_MK0331YHGDR5ZA and the /etc/zfs/zpool.cache, while not really human readable, clearly has device paths (eg. /dev/sda) throughout it.
– Kazz
Dec 2 at 17:09
It took some time to satisfy myself that the backup I did have was complete and accurate before moving forward with the export/import. Once I was happy with the smaller backup content I took the "risk" of exporting and importing which was successful. Currently backing up to the larger external drive. Odd that the create commands used UUID but the zfs mount reverted to device paths. This fixed it as evident from the output of the zpool status command. Thank you!
– Kazz
Dec 6 at 16:16
My create command was by-id - sudo zpool create -f shares0 raidz /dev/disk/by-id/ata-Hitachi_HUA723030ALA640_MK0331YHGDPGXA /dev/disk/by-id/ata-Hitachi_HUA723030ALA640_MK0331YHGDR86A /dev/disk/by-id/ata-Hitachi_HUA723030ALA640_MK0351YHG8HMRA /dev/disk/by-id/ata-Hitachi_HUA723030ALA640_MK0331YHGDR5ZA and the /etc/zfs/zpool.cache, while not really human readable, clearly has device paths (eg. /dev/sda) throughout it.
– Kazz
Dec 2 at 17:09
My create command was by-id - sudo zpool create -f shares0 raidz /dev/disk/by-id/ata-Hitachi_HUA723030ALA640_MK0331YHGDPGXA /dev/disk/by-id/ata-Hitachi_HUA723030ALA640_MK0331YHGDR86A /dev/disk/by-id/ata-Hitachi_HUA723030ALA640_MK0351YHG8HMRA /dev/disk/by-id/ata-Hitachi_HUA723030ALA640_MK0331YHGDR5ZA and the /etc/zfs/zpool.cache, while not really human readable, clearly has device paths (eg. /dev/sda) throughout it.
– Kazz
Dec 2 at 17:09
It took some time to satisfy myself that the backup I did have was complete and accurate before moving forward with the export/import. Once I was happy with the smaller backup content I took the "risk" of exporting and importing which was successful. Currently backing up to the larger external drive. Odd that the create commands used UUID but the zfs mount reverted to device paths. This fixed it as evident from the output of the zpool status command. Thank you!
– Kazz
Dec 6 at 16:16
It took some time to satisfy myself that the backup I did have was complete and accurate before moving forward with the export/import. Once I was happy with the smaller backup content I took the "risk" of exporting and importing which was successful. Currently backing up to the larger external drive. Odd that the create commands used UUID but the zfs mount reverted to device paths. This fixed it as evident from the output of the zpool status command. Thank you!
– Kazz
Dec 6 at 16:16
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- 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%2faskubuntu.com%2fquestions%2f1097712%2fadding-external-usb-drive-reboot-wont-mount-zpool%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