Re: glabel clarification
PJ wrote: I understood that labeling a disk with glabel would permit the disk to be switched to another system and booting from that disk would not require other manupulations than adjusting network configuration, samba, rc.conf and a few others.. But what if there is already a disk on the system with the identical labels in /dev/label/ ? I understood that whatever the actual disk might be (ad4, ad12, ad1...)would be irrelevant? It would appear that the actual booting goes according to the label; so, if there are duplicate labels the boot will not necessarily be from the newly installed disk if there is another disk with duplicate glabel labels? So doing a glabel seems superfluous... What then is the real purpose of glabel, since the boot process seems to need a unique identifier? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org Basically there is some order required to the whole process and labelling is required should you wish to boot from more that just the first BIOS disk. The BIOS will look for disks at certain points on the controller and assign device names to each disk based on it's physical position. The GEOM framework adds meta data to an area of the disk that is looked at by the kernel at boot. I've included some of my own documentation on how to setup a complex 2 x RAID1 + 1 x RAID10 over 4 disks (2 slices per disk). I know you're not doing anything so complex, but hopefully you'll be able to take out the unnecessary step to suit your need. GEOM Background gstripe(8) provides a stripe set or RAID 0 gmirror(8) provides a mirror/duplex or RAID 1 graid3(8) provides a stripe with parity or RAID 3 provider--This GEOM entity appears in /dev. This article shows how to create a provider known as /dev/mirror/gm0, which represents the disk mirror/duplex. consumer--This entity receives I/O requests. In the example of a mirror/duplex, it is the two physical drives. I use two IDE drives on separate cables; they are /dev/ad0 and /dev/ad2. metadata--When referring to any RAID level, metadata includes the array members, their sizes and locations, descriptions of logical disks and partitions, and the current state of the disk array. mirror/duplex--RAID 1 maintains the same data on two separate drives. In other words, it mirrors the data on one drive to another drive. If those two drives are attached to the same IDE cable, they are a mirror; if they are attached to separate cables, they are a duplex. Because a single cable introduces a single point of failure, most mirrors are actually duplexes. Complex GEOM RAID /Creating a complex 4 disk raid where the OS and swap are duplexed on the first slice over the 4 disks; and the 2nd slice of all disks is setup as a RAID10 for the data. By analyzing this way, it can be easily broken down into it's smaller gmirror/glabel/gsrtipe components if that is all that is required. So the dual RAID1 and single RAID10 will look like:/ The Aim Physical disk providers da0s1 mirrors with da2s1 for / (1G); /usr (5G) and /var (2G) called gmROOT then glabelled ROOT da1s1 mirrors with da3s1 for swap only and labelled gmSWAP then glabelled SWAP da0s2 mirrors with da2s2 and labelled gmDATA0 da1s2 mirrors with da3s2 and labelled gmDATA1 gmDATA0 and gmDATA1 will be striped and labelled gsDATA and glabelled DATA for /home (10G) and /opt (15G) labelling: / = ROOTa /usr = ROOTd /var = ROOTe /home = DATAd /opt – DATAe Creating a RAID steps 1. create all slices remembering to leave space between them for the disk/slice data - done by creating the first slice larger than it needs to be, then creating the second slice, deleting the first slice and recreating it from the free space at it's correct size. 2. create da0s1 partitioning as above; all of da1s1 for swap; and da0s2 partitioned as above 3. install OS onto da0s1. Partitioning as above, installing minimal package and developer. 4. return to config, set root password, then break out (*alt-F4*) to add all geom modules to loader.conf: *grep geom /boot/defaults/loader.conf /boot/loader.conf* 5. edit /boot/loader.conf so that stripe, mirror and label are set to yes and return to the install (*alt-f1*) and exit. 6. create mirror for root fs on the unused disk: *gmirror label -v -b round-robin gmROOT da2s1* /Where gmirror label creates the mirror; -v enables verbose mode; -b round-robin chooses a balance algorithm (at the moment, round-robin is the algorithm with the best performance); ROOT is the name of mirror/duplex (this name represents the first GEOM mirror); and /dev/da2s1 represents the disk containing the data to mirror./ 7. check it: *gmirror status* 8. create labels for this mirror: *glabel label -v
Re: glabel clarification
Polytropon wrote: On Mon, 19 Oct 2009 13:12:06 -0400, PJ af.gour...@videotron.ca wrote: this is ad12; ad6 is the same - I guess I hae to get rid of those labels in ad6 but am not sure if I need to use glabel to remove them or if just editing fstab will do it? You could indicate if a given disk is your working disk (w) or your backup disk (b). A possible fstab would look like this: The working disk: /dev/label/w-swap none swap sw 0 0 /dev/label/w-rootfs / ufs rw 1 1 /dev/label/w-tmp /tmp ufs rw 2 2 /dev/label/w-var /var ufs rw 2 2 /dev/label/w-usr /usr ufs rw 2 2 /dev/label/w-home /home ufs rw 2 2 /dev/label/w-backups /backups ufs rw 2 2 The backup disk: /dev/label/b-swap none swap sw 0 0 /dev/label/b-rootfs / ufs rw 1 1 /dev/label/b-tmp /tmp ufs rw 2 2 /dev/label/b-var /var ufs rw 2 2 /dev/label/b-usr /usr ufs rw 2 2 /dev/label/b-home /home ufs rw 2 2 /dev/label/b-backups /backups ufs rw 2 2 (Note that I sorted the partitions by usage priority.) The downside is that you would have to keep a difference between /etc/fstab(w) and /etc/fstab(b). On its own, each disk will work on any controller (because of proper labels). Funny question: What happens if a system has access to two disks with labelled partitions where the labels are identical? Exactly what is happening on my system. That's basically what has been troubling me. I cloned ad12 to ad6 and then wanted to boot from ad6... well, everytime I boot from ad6 the boot is from ad12 because both have identical labels. The only way out is to change the labels on ad6 to point to ad6 partitions and not to /dev/label/name. So the only reason to use glabel, in my case, is to boot from the clone on another system without worrying about the actual disk label. Once it's booted, the label can be changed to conform to the label on the new system. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: glabel clarification
On Tue, 20 Oct 2009 05:57:53 -0400, PJ af.gour...@videotron.ca wrote: Exactly what is happening on my system. That's basically what has been troubling me. I cloned ad12 to ad6 and then wanted to boot from ad6... well, everytime I boot from ad6 the boot is from ad12 because both have identical labels. The only way out is to change the labels on ad6 to point to ad6 partitions and not to /dev/label/name. That is a solution for the case that you want to keep both disks running in the system. If you just want to make one disk (b) available in order to swap it when the master disk fails (w), then labels are fine. I'm not sure what your main purpose of cloning the disks was. Two options: a) keep two disks in sync, so you can use your backup disk when the working disk fails and needs to be extracted b) make a clone of your working disk so it can be placed into another system So the only reason to use glabel, in my case, is to boot from the clone on another system without worrying about the actual disk label. Once it's booted, the label can be changed to conform to the label on the new system. The label doesn't need to be changed when the disk in question is placed into another system. Labels work independent from the different settings you might find in different computers, such as different device names (due to different position on the controller). -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: glabel clarification
Polytropon wrote: On Tue, 20 Oct 2009 05:57:53 -0400, PJ af.gour...@videotron.ca wrote: Exactly what is happening on my system. That's basically what has been troubling me. I cloned ad12 to ad6 and then wanted to boot from ad6... well, everytime I boot from ad6 the boot is from ad12 because both have identical labels. The only way out is to change the labels on ad6 to point to ad6 partitions and not to /dev/label/name. That is a solution for the case that you want to keep both disks running in the system. If you just want to make one disk (b) available in order to swap it when the master disk fails (w), then labels are fine. I'm not sure what your main purpose of cloning the disks was. Two options: a) keep two disks in sync, so you can use your backup disk when the working disk fails and needs to be extracted b) make a clone of your working disk so it can be placed into another system So the only reason to use glabel, in my case, is to boot from the clone on another system without worrying about the actual disk label. Once it's booted, the label can be changed to conform to the label on the new system. The label doesn't need to be changed when the disk in question is placed into another system. Labels work independent from the different settings you might find in different computers, such as different device names (due to different position on the controller). LONGEST glabel discussion ever. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
RE: glabel clarification
I understood that labeling a disk with glabel would permit the disk to be switched to another system and booting from that disk would not require other manupulations than adjusting network configuration, samba, rc.conf and a few others.. But what if there is already a disk on the system with the identical labels in /dev/label/ ? I understood that whatever the actual disk might be (ad4, ad12, ad1...)would be irrelevant? It would appear that the actual booting goes according to the label; so, if there are duplicate labels the boot will not necessarily be from the newly installed disk if there is another disk with duplicate glabel labels? So doing a glabel seems superfluous... What then is the real purpose of glabel, since the boot process seems to need a unique identifier? Switching between machines is not what labels are for.(enlighten me if it is) As far as understand, it makes switching the drive in the same machine easier. It does not matter if labels are used, that the device is seen as /dev/ad0 or /dev/ad{x}. This makes adding and replacing disk much easier. Sometimes the disk numbers change when removing raid controllers or other hardware. Regards, Johan No virus found in this outgoing message. Checked by AVG - www.avg.com Version: 8.5.422 / Virus Database: 270.14.20/2444 - Release Date: 10/18/09 09:04:00 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: glabel clarification
Johan Hendriks wrote: I understood that labeling a disk with glabel would permit the disk to be switched to another system and booting from that disk would not require other manupulations than adjusting network configuration, samba, rc.conf and a few others.. But what if there is already a disk on the system with the identical labels in /dev/label/ ? I understood that whatever the actual disk might be (ad4, ad12, ad1...)would be irrelevant? It would appear that the actual booting goes according to the label; so, if there are duplicate labels the boot will not necessarily be from the newly installed disk if there is another disk with duplicate glabel labels? So doing a glabel seems superfluous... What then is the real purpose of glabel, since the boot process seems to need a unique identifier? Switching between machines is not what labels are for.(enlighten me if it is) As far as understand, it makes switching the drive in the same machine easier. It does not matter if labels are used, that the device is seen as /dev/ad0 or /dev/ad{x}. This makes adding and replacing disk much easier. Sometimes the disk numbers change when removing raid controllers or other hardware. Here are my specifics: I just cloned disk - ad6 from ad12... I assume that the two are identical except for their bios assignments - that is ad6 and ad12. Other than that they are quite identical, or should be. ad12 was just glabeled, so I would assume that the clone would have all the identical information - anyway, it looks like it does. To test things, I booted from ad12 and then from ad6 but the boot is always from ad12 - this is evidenced from changing the motd on ad6s1a... the fstab on both ad4 and ad12 are identical... and dmesg shows the boot device... so, where have I erred? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: glabel clarification
Johan Hendriks wrote: I understood that labeling a disk with glabel would permit the disk to be switched to another system and booting from that disk would not require other manupulations than adjusting network configuration, samba, rc.conf and a few others.. But what if there is already a disk on the system with the identical labels in /dev/label/ ? I understood that whatever the actual disk might be (ad4, ad12, ad1...)would be irrelevant? It would appear that the actual booting goes according to the label; so, if there are duplicate labels the boot will not necessarily be from the newly installed disk if there is another disk with duplicate glabel labels? So doing a glabel seems superfluous... What then is the real purpose of glabel, since the boot process seems to need a unique identifier? Switching between machines is not what labels are for.(enlighten me if it is) As far as understand, it makes switching the drive in the same machine easier. It does not matter if labels are used, that the device is seen as /dev/ad0 or /dev/ad{x}. This makes adding and replacing disk much easier. Sometimes the disk numbers change when removing raid controllers or other hardware. Yes, this is true and that is why I thought that glabel would work; I am trying to set up my computers with identical clones that I can update with changes on the master machine from time to time and thus prevent data loss in case of problems. So I use ad12 as the main system; if it were to crash I would then boot from ad6 which is identical. But the /etc/fstab is identical in both machines. So if I boot from ad6, I will get booted from ad12 ... so that doesn't work. It looks like we need an unique identifier for each disk. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: glabel clarification
On Mon, Oct 19, 2009 at 9:26 AM, PJ af.gour...@videotron.ca wrote: Yes, this is true and that is why I thought that glabel would work; I am trying to set up my computers with identical clones that I can update with changes on the master machine from time to time and thus prevent data loss in case of problems. So I use ad12 as the main system; if it were to crash I would then boot from ad6 which is identical. But the /etc/fstab is identical in both machines. So if I boot from ad6, I will get booted from ad12 ... so that doesn't work. It looks like we need an unique identifier for each disk. Why not use gmirror? -- Adam Vande More ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: glabel clarification
Adam Vande More wrote: On Mon, Oct 19, 2009 at 9:26 AM, PJ af.gour...@videotron.ca mailto:af.gour...@videotron.ca wrote: Yes, this is true and that is why I thought that glabel would work; I am trying to set up my computers with identical clones that I can update with changes on the master machine from time to time and thus prevent data loss in case of problems. So I use ad12 as the main system; if it were to crash I would then boot from ad6 which is identical. But the /etc/fstab is identical in both machines. So if I boot from ad6, I will get booted from ad12 ... so that doesn't work. It looks like we need an unique identifier for each disk. Why not use gmirror? -- Adam Vande More I've been having such headaches with glabel, I didn't want to get a migraine. ;-) Actually, I don't know gmirror but will look it up and see whatit can do for me. Thanks. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: glabel clarification
Adam Vande More wrote: On Mon, Oct 19, 2009 at 9:26 AM, PJ af.gour...@videotron.ca mailto:af.gour...@videotron.ca wrote: Yes, this is true and that is why I thought that glabel would work; I am trying to set up my computers with identical clones that I can update with changes on the master machine from time to time and thus prevent data loss in case of problems. So I use ad12 as the main system; if it were to crash I would then boot from ad6 which is identical. But the /etc/fstab is identical in both machines. So if I boot from ad6, I will get booted from ad12 ... so that doesn't work. It looks like we need an unique identifier for each disk. Why not use gmirror? -- Adam Vande More because I am not using RAID. :-( ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: glabel clarification
On Mon, Oct 19, 2009 at 9:35 AM, PJ af.gour...@videotron.ca wrote: Adam Vande More wrote: On Mon, Oct 19, 2009 at 9:26 AM, PJ af.gour...@videotron.ca mailto:af.gour...@videotron.ca wrote: Yes, this is true and that is why I thought that glabel would work; I am trying to set up my computers with identical clones that I can update with changes on the master machine from time to time and thus prevent data loss in case of problems. So I use ad12 as the main system; if it were to crash I would then boot from ad6 which is identical. But the /etc/fstab is identical in both machines. So if I boot from ad6, I will get booted from ad12 ... so that doesn't work. It looks like we need an unique identifier for each disk. Why not use gmirror? -- Adam Vande More because I am not using RAID. :-( gmirror + ggated = disk or slice replicated to remote system -- Adam Vande More ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: glabel clarification
On Mon, Oct 19, 2009 at 9:37 AM, Adam Vande More amvandem...@gmail.comwrote: On Mon, Oct 19, 2009 at 9:35 AM, PJ af.gour...@videotron.ca wrote: Adam Vande More wrote: On Mon, Oct 19, 2009 at 9:26 AM, PJ af.gour...@videotron.ca mailto:af.gour...@videotron.ca wrote: Yes, this is true and that is why I thought that glabel would work; I am trying to set up my computers with identical clones that I can update with changes on the master machine from time to time and thus prevent data loss in case of problems. So I use ad12 as the main system; if it were to crash I would then boot from ad6 which is identical. But the /etc/fstab is identical in both machines. So if I boot from ad6, I will get booted from ad12 ... so that doesn't work. It looks like we need an unique identifier for each disk. Why not use gmirror? -- Adam Vande More because I am not using RAID. :-( gmirror + ggated = disk or slice replicated to remote system gmirror + ggated = disk or partition replicated to remote system -- Adam Vande More ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: glabel clarification
Adam Vande More wrote: On Mon, Oct 19, 2009 at 9:35 AM, PJ af.gour...@videotron.ca mailto:af.gour...@videotron.ca wrote: Adam Vande More wrote: On Mon, Oct 19, 2009 at 9:26 AM, PJ af.gour...@videotron.ca mailto:af.gour...@videotron.ca mailto:af.gour...@videotron.ca mailto:af.gour...@videotron.ca wrote: Yes, this is true and that is why I thought that glabel would work; I am trying to set up my computers with identical clones that I can update with changes on the master machine from time to time and thus prevent data loss in case of problems. So I use ad12 as the main system; if it were to crash I would then boot from ad6 which is identical. But the /etc/fstab is identical in both machines. So if I boot from ad6, I will get booted from ad12 ... so that doesn't work. It looks like we need an unique identifier for each disk. Why not use gmirror? -- Adam Vande More because I am not using RAID. :-( gmirror + ggated = disk or slice replicated to remote system -- Adam Vande More You ae trying to give me a migraine. :-) But what happens if the disks are not identical in size? Dump/restore allows for that; dump/restore will copy only the used date and not the entire partition or slice. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: glabel clarification
On Mon, Oct 19, 2009 at 9:46 AM, PJ af.gour...@videotron.ca wrote: Adam Vande More wrote: On Mon, Oct 19, 2009 at 9:35 AM, PJ af.gour...@videotron.ca mailto:af.gour...@videotron.ca wrote: Adam Vande More wrote: On Mon, Oct 19, 2009 at 9:26 AM, PJ af.gour...@videotron.ca mailto:af.gour...@videotron.ca mailto:af.gour...@videotron.ca mailto:af.gour...@videotron.ca wrote: Yes, this is true and that is why I thought that glabel would work; I am trying to set up my computers with identical clones that I can update with changes on the master machine from time to time and thus prevent data loss in case of problems. So I use ad12 as the main system; if it were to crash I would then boot from ad6 which is identical. But the /etc/fstab is identical in both machines. So if I boot from ad6, I will get booted from ad12 ... so that doesn't work. It looks like we need an unique identifier for each disk. Why not use gmirror? -- Adam Vande More because I am not using RAID. :-( gmirror + ggated = disk or slice replicated to remote system -- Adam Vande More You ae trying to give me a migraine. :-) But what happens if the disks are not identical in size? Dump/restore allows for that; dump/restore will copy only the used date and not the entire partition or slice. It depends on what your end goals is which is still not entirely clear. Do you want a disk that can be unplugged from a machine and used to boot immediately in your orginal system in case of hd failure. If yes then gmirror + ggated is the way to go. If you simply want data to be backed up on regular basis, something like rsync is easier. -- Adam Vande More ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: glabel clarification
On Mon, Oct 19, 2009 at 10:58 AM, PJ af.gour...@videotron.ca wrote: Actually, I have been trying to clone a disk and then install the disk in another machine or same clone in several machines. That's why I thought that once the clone is make it would boot on any machine. This in presuming that each clone is identical including the fstab file; I understood that this would allow immediate bootup regardless of what the disk may be ad4, ad1, ad12 or whatever. This would permit changing the necessary configurations of samba, network, etc. Now I see that it doesn't work that way. I can still clone the disk but then just have to find what disk is the clone. Are all the systems identical? If so, make sure cabling is identical as well then gmirror clone would work as well. Also my understanding of glabel is different than mentioned above. As long as fstab mounts the glabel location eg /dev/ufs/label it should be portable across systems since that info is stored as meta data on the drive. What does your fstab look like? -- Adam Vande More ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: glabel clarification
Adam Vande More wrote: On Mon, Oct 19, 2009 at 9:46 AM, PJ af.gour...@videotron.ca mailto:af.gour...@videotron.ca wrote: Adam Vande More wrote: On Mon, Oct 19, 2009 at 9:35 AM, PJ af.gour...@videotron.ca mailto:af.gour...@videotron.ca mailto:af.gour...@videotron.ca mailto:af.gour...@videotron.ca wrote: Adam Vande More wrote: On Mon, Oct 19, 2009 at 9:26 AM, PJ af.gour...@videotron.ca mailto:af.gour...@videotron.ca mailto:af.gour...@videotron.ca mailto:af.gour...@videotron.ca mailto:af.gour...@videotron.ca mailto:af.gour...@videotron.ca mailto:af.gour...@videotron.ca mailto:af.gour...@videotron.ca wrote: Yes, this is true and that is why I thought that glabel would work; I am trying to set up my computers with identical clones that I can update with changes on the master machine from time to time and thus prevent data loss in case of problems. So I use ad12 as the main system; if it were to crash I would then boot from ad6 which is identical. But the /etc/fstab is identical in both machines. So if I boot from ad6, I will get booted from ad12 ... so that doesn't work. It looks like we need an unique identifier for each disk. Why not use gmirror? -- Adam Vande More because I am not using RAID. :-( gmirror + ggated = disk or slice replicated to remote system -- Adam Vande More You ae trying to give me a migraine. :-) But what happens if the disks are not identical in size? Dump/restore allows for that; dump/restore will copy only the used date and not the entire partition or slice. It depends on what your end goals is which is still not entirely clear. Do you want a disk that can be unplugged from a machine and used to boot immediately in your orginal system in case of hd failure. If yes then gmirror + ggated is the way to go. If you simply want data to be backed up on regular basis, something like rsync is easier. -- Adam Vande More Actually, I have been trying to clone a disk and then install the disk in another machine or same clone in several machines. That's why I thought that once the clone is make it would boot on any machine. This in presuming that each clone is identical including the fstab file; I understood that this would allow immediate bootup regardless of what the disk may be ad4, ad1, ad12 or whatever. This would permit changing the necessary configurations of samba, network, etc. Now I see that it doesn't work that way. I can still clone the disk but then just have to find what disk is the clone. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: glabel clarification
Adam Vande More wrote: On Mon, Oct 19, 2009 at 10:58 AM, PJ af.gour...@videotron.ca mailto:af.gour...@videotron.ca wrote: Actually, I have been trying to clone a disk and then install the disk in another machine or same clone in several machines. That's why I thought that once the clone is make it would boot on any machine. This in presuming that each clone is identical including the fstab file; I understood that this would allow immediate bootup regardless of what the disk may be ad4, ad1, ad12 or whatever. This would permit changing the necessary configurations of samba, network, etc. Now I see that it doesn't work that way. I can still clone the disk but then just have to find what disk is the clone. Are all the systems identical?� If so, make sure cabling is identical as well then gmirror clone would work as well. Also my understanding of glabel is different than mentioned above.� As long as fstab mounts the glabel location eg /dev/ufs/label it should be portable across systems since that info is stored as meta data on the drive. What does your fstab look like? # DeviceMountpointFStypeOptionsDumpPass# /dev/label/swapnoneswapsw00 /dev/label/rootfs/ufsrw11 /dev/label/backups/backupsufsrw22 /dev/label/home/homeufsrw22 /dev/label/tmp/tmpufsrw22 /dev/label/usr/usrufsrw22 /dev/label/var/varufsrw22 /dev/acd0/cdromcd9660ro,noauto00 linproc /usr/compat/linux/proc linprocfs rw 0 0 this is ad12; ad6 is the same - I guess I hae to get rid of those labels in ad6 but am not sure if I need to use glabel to remove them or if just editing fstab will do it? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: glabel clarification
On Mon, Oct 19, 2009 at 12:12 PM, PJ af.gour...@videotron.ca wrote: # DeviceMountpointFStypeOptionsDumpPass# /dev/label/swapnoneswapsw00 /dev/label/rootfs/ufsrw11 /dev/label/backups/backupsufsrw22 /dev/label/home/homeufsrw22 /dev/label/tmp/tmpufsrw22 /dev/label/usr/usrufsrw22 /dev/label/var/varufsrw22 /dev/acd0/cdromcd9660ro,noauto00 linproc /usr/compat/linux/proc linprocfs rw 0 0 this is ad12; ad6 is the same - I guess I hae to get rid of those labels in ad6 but am not sure if I need to use glabel to remove them or if just editing fstab will do it? You need to use gmirror. If you get it to clone a disk following these instructions http://www.freebsd.org/doc/en/books/handbook/geom-mirror.html the disk will boot up on the new machine no problem provided hardware compatibility. Get rid of any label/fstab work you've done so far and follow that page. -- Adam Vande More ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: glabel clarification
Adam Vande More wrote: On Mon, Oct 19, 2009 at 12:12 PM, PJ af.gour...@videotron.ca wrote: # DeviceMountpointFStypeOptionsDumpPass# /dev/label/swapnoneswapsw00 /dev/label/rootfs/ufsrw11 /dev/label/backups/backupsufsrw22 /dev/label/home/homeufsrw22 /dev/label/tmp/tmpufsrw22 /dev/label/usr/usrufsrw22 /dev/label/var/varufsrw22 /dev/acd0/cdromcd9660ro,noauto00 linproc /usr/compat/linux/proc linprocfs rw 0 0 this is ad12; ad6 is the same - I guess I hae to get rid of those labels in ad6 but am not sure if I need to use glabel to remove them or if just editing fstab will do it? You need to use gmirror. If you get it to clone a disk following these instructions http://www.freebsd.org/doc/en/books/handbook/geom-mirror.html the disk will boot up on the new machine no problem provided hardware compatibility. Get rid of any label/fstab work you've done so far and follow that page. I am trying to digest the procedure. Forgive me if I am a little slow, but I want to be sure to do it right. 1. this procedure requres that both diisks be identical... ?? This is not always possible... I'm not sure I have that possibility at the moment and I don't want to empty other disks from other machines. 2. I am trying to under stand if the procedure is to be done from the active disk, say ad4 and the idea is to copy ad4 to say ad6? Or should I be running on a third disk, say ad12 and be copying ad4 to ad6? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: glabel clarification
On Mon, Oct 19, 2009 at 4:58 PM, PJ af.gour...@videotron.ca wrote: Adam Vande More wrote: On Mon, Oct 19, 2009 at 12:12 PM, PJ af.gour...@videotron.ca wrote: # DeviceMountpointFStypeOptionsDumpPass# /dev/label/swapnoneswapsw00 /dev/label/rootfs/ufsrw11 /dev/label/backups/backupsufsrw22 /dev/label/home/homeufsrw22 /dev/label/tmp/tmpufsrw22 /dev/label/usr/usrufsrw22 /dev/label/var/varufsrw22 /dev/acd0/cdromcd9660ro,noauto00 linproc /usr/compat/linux/proc linprocfs rw 0 0 this is ad12; ad6 is the same - I guess I hae to get rid of those labels in ad6 but am not sure if I need to use glabel to remove them or if just editing fstab will do it? You need to use gmirror. If you get it to clone a disk following these instructions http://www.freebsd.org/doc/en/books/handbook/geom-mirror.html the disk will boot up on the new machine no problem provided hardware compatibility. Get rid of any label/fstab work you've done so far and follow that page. I am trying to digest the procedure. Forgive me if I am a little slow, but I want to be sure to do it right. 1. this procedure requres that both diisks be identical... ?? This is not always possible... I'm not sure I have that possibility at the moment and I don't want to empty other disks from other machines. No if you have one smaller disk you should use that as the base mirror disk, then add the larger to the mirror. Of course there would be some unused space on the larger drive, but that usually not a problem. 2. I am trying to under stand if the procedure is to be done from the active disk, say ad4 and the idea is to copy ad4 to say ad6? Or should I be running on a third disk, say ad12 and be copying ad4 to ad6? From your example assuming ad4 is the smallest of disk sizes you use. sysctl kern.geom.debugflags=17 gmirror label -vb round-robin gm0 /dev/ad4 echo 'geom_mirror_load=YES' /boot/loader.conf Edit the /etc/fstab file shutdown -r now gmirror insert gm0 /dev/ad6 wait until drives are synced. verify by gmirror status. power down. pull ad6 and insert into new system. Power it on. you are done. repeat as necessary. -- Adam Vande More ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: glabel clarification
On Mon, 19 Oct 2009 15:59:43 +0200, Johan Hendriks jo...@double-l.nl wrote: Switching between machines is not what labels are for.(enlighten me if it is) It CAN. If /etc/fstab content matches the labels of the partitions, it matches them regardless of the disk they are on (da[0123...] or ad[0123...]), so the disk can be placed on any controller in any computer. As far as understand, it makes switching the drive in the same machine easier. It does, which is obvious according to the explaination given before. But it is not restricted to one machine. It does not matter if labels are used, that the device is seen as /dev/ad0 or /dev/ad{x}. This makes adding and replacing disk much easier. Furthermore, it gives you the chance do change the name for a device to something human readable, e. g. the descriptive name usrfs for ad0s1e. In different settngs, functional file system entry points may refer to different device nodes, depending on the current disk layout. Sometimes the disk numbers change when removing raid controllers or other hardware. That's true. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: glabel clarification
On Mon, 19 Oct 2009 11:58:18 -0400, PJ af.gour...@videotron.ca wrote: Actually, I have been trying to clone a disk and then install the disk in another machine or same clone in several machines. That's why I thought that once the clone is make it would boot on any machine. This in presuming that each clone is identical including the fstab file; I understood that this would allow immediate bootup regardless of what the disk may be ad4, ad1, ad12 or whatever. I think that's a possible explaination. I'm guessing: If the labels of both disks have the same names, and both disks are present at booting time, and /etc/fstab contains those labels, then maybe if both disks have identical labels, then instead from the booting disk ad6, the ad12 disk labels are used for file system mounting? The easiest way REALLY is to extract one disk from the system and use only one disk for booting tests. Let's say you've already transfered data from ad6 (source) to ad12 (target) successfully. Now unplug ad6 and let the system boot from ad12. It should work. Then, put ad12's disk to ad6's controller. So now the former ad12 is ad6. Because you're using labels, it shouldn't matter. Try to boot. Should work as well. This really is the easiest way to check. I can still clone the disk but then just have to find what disk is the clone. Clones are identical. :-) Seriously: There is a way to determine it definitely: Have a look at the UFSID class labels. They should be unique, even if glabel labels are identical. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: glabel clarification
On Mon, 19 Oct 2009 13:12:06 -0400, PJ af.gour...@videotron.ca wrote: this is ad12; ad6 is the same - I guess I hae to get rid of those labels in ad6 but am not sure if I need to use glabel to remove them or if just editing fstab will do it? You could indicate if a given disk is your working disk (w) or your backup disk (b). A possible fstab would look like this: The working disk: /dev/label/w-swap none swap sw 0 0 /dev/label/w-rootfs / ufs rw 1 1 /dev/label/w-tmp /tmp ufs rw 2 2 /dev/label/w-var /var ufs rw 2 2 /dev/label/w-usr /usr ufs rw 2 2 /dev/label/w-home /home ufs rw 2 2 /dev/label/w-backups /backups ufs rw 2 2 The backup disk: /dev/label/b-swap none swap sw 0 0 /dev/label/b-rootfs / ufs rw 1 1 /dev/label/b-tmp /tmp ufs rw 2 2 /dev/label/b-var /var ufs rw 2 2 /dev/label/b-usr /usr ufs rw 2 2 /dev/label/b-home /home ufs rw 2 2 /dev/label/b-backups /backups ufs rw 2 2 (Note that I sorted the partitions by usage priority.) The downside is that you would have to keep a difference between /etc/fstab(w) and /etc/fstab(b). On its own, each disk will work on any controller (because of proper labels). Funny question: What happens if a system has access to two disks with labelled partitions where the labels are identical? -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org