Skip to contentSkip to conversation

How to find the root partition with root=dhcp root-path=iscsi:::...

DISCUSSION Harald Hoyer 3 participants 10 messages Jun 18, 2009 – Jun 19, 2009 7 messages not in the archive

lore
Share & tools
lore
#0 lore raw

If we have root=dhcp and root-path from dhcp with "iscsi::... " nothing is know about the partition where root lives in.

RFC:
provide a pre-mount fallback, which tries to mount

/dev/disk/by-label/\x2f (LABEL=/)
/dev/disk/by-label/ROOT (LABEL=ROOT)

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
In reply to a message not in the archive
Quoted 8 lines · Harald Hoyer

If we have root=dhcp and root-path from dhcp with "iscsi::... " nothing is know about the partition where root lives in.

RFC:
provide a pre-mount fallback, which tries to mount

/dev/disk/by-label/\x2f (LABEL=/)
/dev/disk/by-label/ROOT (LABEL=ROOT)

I think this was the intent of netroot=dhcp for remote block device protocols, then you can define something else in root=. Whether it is implemented yet I don't know.

Warren
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw
In reply to a message not in the archive
Quoted 7 lines · Warren Togami
Quoted 6 lines · Harald Hoyer

If we have root=dhcp and root-path from dhcp with "iscsi::... " nothing is know about the partition where root lives in.

RFC:
provide a pre-mount fallback, which tries to mount

Quoted 8 lines
Quoted 2 lines

/dev/disk/by-label/\x2f (LABEL=/)
/dev/disk/by-label/ROOT (LABEL=ROOT)

I think this was the intent of netroot=dhcp for remote block device protocols, then you can define something else in root=. Whether it is implemented yet I don't know.

Warren

Well, but the root-path does not specify the root partition!
Either we extend the iscsi:::: spec with a root partition or we make requirements like I did above. --
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#6 lore raw
In reply to a message not in the archive
Quoted 15 lines · Harald Hoyer
Quoted 14 lines · Warren Togami
Quoted 8 lines · Harald Hoyer

If we have root=dhcp and root-path from dhcp with "iscsi::... " nothing is know about the partition where root lives in.

RFC:
provide a pre-mount fallback, which tries to mount

/dev/disk/by-label/\x2f (LABEL=/)
/dev/disk/by-label/ROOT (LABEL=ROOT)

I think this was the intent of netroot=dhcp for remote block device protocols, then you can define something else in root=. Whether it is implemented yet I don't know.

Quoted 5 lines
Quoted 1 line

Warren

Well, but the root-path does not specify the root partition! Either we extend the iscsi:::: spec with a root partition or we make requirements like I did above.

root= cannot specify the root partition?

In any case, nothing really stops us from extending the iscsi RFC spec if we really want to.

Warren Togami
[email protected]
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#16 lore raw
In reply to a message not in the archive
Quoted 9 lines · Harald Hoyer

If we have root=dhcp and root-path from dhcp with "iscsi::... " nothing is know about the partition where root lives in.

RFC:
provide a pre-mount fallback, which tries to mount

/dev/disk/by-label/\x2f (LABEL=/)
/dev/disk/by-label/ROOT (LABEL=ROOT)

BTW, I'm not against this as a fallback, but am I incorrect about root= being explicitly usable with netroot=dhcp?

Warren
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#7 lore raw
In reply to a message not in the archive
Quoted 15 lines · Harald Hoyer
Quoted 14 lines · Warren Togami
Quoted 8 lines · Harald Hoyer

If we have root=dhcp and root-path from dhcp with "iscsi::... " nothing is know about the partition where root lives in.

RFC:
provide a pre-mount fallback, which tries to mount

/dev/disk/by-label/\x2f (LABEL=/)
/dev/disk/by-label/ROOT (LABEL=ROOT)

I think this was the intent of netroot=dhcp for remote block device protocols, then you can define something else in root=. Whether it is implemented yet I don't know.

Quoted 5 lines
Quoted 1 line

Warren

Well, but the root-path does not specify the root partition! Either we extend the iscsi:::: spec with a root partition or we make requirements like I did above.

The RFC only says we need to boot off the LUN specified, 0 if none listed. That's your default partition.

It's workable, as these can be virtual disks anyways, but as Warren mentions, we can extend the RFC.

Also, you can specify root=LABEL=ROOT or root=/dev/sda1 etc and it should work, or at least it used to with the netroot= code. I haven't tested it this week -- vacation.
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#9 lore raw
In reply to a message not in the archive
Quoted 15 lines · David Dillow
Quoted 14 lines · Harald Hoyer
Quoted 13 lines · Warren Togami
Quoted 8 lines · Harald Hoyer

If we have root=dhcp and root-path from dhcp with "iscsi::... " nothing is know about the partition where root lives in.

RFC:
provide a pre-mount fallback, which tries to mount

/dev/disk/by-label/\x2f (LABEL=/)
/dev/disk/by-label/ROOT (LABEL=ROOT)

I think this was the intent of netroot=dhcp for remote block device protocols, then you can define something else in root=. Whether it is implemented yet I don't know.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Warren

Well, but the root-path does not specify the root partition! Either we extend the iscsi:::: spec with a root partition or we make requirements like I did above.

The RFC only says we need to boot off the LUN specified, 0 if none listed. That's your default partition.

ok, so the LUN is the partition number?
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#11 lore raw
In reply to a message not in the archive
Quoted 5 lines · Harald Hoyer
Quoted 2 lines · David Dillow

The RFC only says we need to boot off the LUN specified, 0 if none listed. That's your default partition.

ok, so the LUN is the partition number?

No, a LUN is a whole disk. You would map the LUN to /dev/sda or /dev/sdb or such depending on which one it is, and use the entire disk -- no partitions needed. If you wanted to separate /var or /home etc, you would put them on a different LUN(s) -- partitions optional -- and use /etc/fstab to mount them.
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#13 lore raw
In reply to a message not in the archive
Quoted 11 lines · David Dillow
Quoted 4 lines · Harald Hoyer
Quoted 2 lines · David Dillow

The RFC only says we need to boot off the LUN specified, 0 if none listed. That's your default partition.

ok, so the LUN is the partition number?

No, a LUN is a whole disk. You would map the LUN to /dev/sda or /dev/sdb or such depending on which one it is, and use the entire disk -- no partitions needed. If you wanted to separate /var or /home etc, you would put them on a different LUN(s) -- partitions optional -- and use /etc/fstab to mount them.

hmm, so I would have to create a rule, which would look for the next disk which appears and has some /sys magic iSCSI attributes and try to mount the whole disk. --
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#15 lore raw
In reply to a message not in the archive
Quoted 7 lines · Harald Hoyer
Quoted 6 lines · David Dillow
Quoted 4 lines · Harald Hoyer
Quoted 2 lines · David Dillow

The RFC only says we need to boot off the LUN specified, 0 if none listed. That's your default partition.

ok, so the LUN is the partition number?

Quoted 8 lines
Quoted 5 lines

No, a LUN is a whole disk. You would map the LUN to /dev/sda or /dev/sdb or such depending on which one it is, and use the entire disk -- no partitions needed. If you wanted to separate /var or /home etc, you would put them on a different LUN(s) -- partitions optional -- and use /etc/fstab to mount them.

hmm, so I would have to create a rule, which would look for the next disk which appears and has some /sys magic iSCSI attributes and try to mount the whole disk.

You're looking for the disk that makes the directory /sys/class/scsi_disk/<HOST>:0:0:<LUN>

HOST will almost always be 0, unless we try multiple iSCSI roots in sequence. LUN will be the one specified by root-path.

I'm not sure if you can match this via udev rules, perhaps using a match rule such as SYMLINK=="by-path/*-scsi-0:0:0:<LUN>"
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html