[opensuse] /dev/disk/by-uuid ?
All, I've got a few old machines that I've been upgrading that have /dev/sdaX type entries in /etc/fstab. I'm in the process of moving them to /dev/disk/by-uuid/* entries 2 questions: 1) Is there a tool for this. I've just done one machine by looking at the symbolic links in that directory, then hand editing the fstab to be correct. Only takes a few minutes, but it is tedious and error prone. 2) How do you handle swap partitions? I ask because for the first machine I'm handling I have my swap partition on /dev/sda10, but there is not a symbolic link in /dev/disk/by-uuid for that partition. Thanks Greg -- Greg Freemyer Head of EDD Tape Extraction and Processing team Litigation Triage Solutions Specialist http://www.linkedin.com/in/gregfreemyer First 99 Days Litigation White Paper - http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf The Norcross Group The Intersection of Evidence & Technology http://www.norcrossgroup.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tuesday March 31 2009, Greg Freemyer wrote:
All,
I've got a few old machines that I've been upgrading that have /dev/sdaX type entries in /etc/fstab.
I'm in the process of moving them to /dev/disk/by-uuid/* entries
...
Personally, I favor by-label mounting, which works for file systems and swap.
Thanks Greg
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday, 2009-03-31 at 11:01 -0400, Greg Freemyer wrote:
1) Is there a tool for this. I've just done one machine by looking at
Dunno. AFAIK, no, but a distro upgrade /might/ do it.
2) How do you handle swap partitions?
LABEL=320_swap swap swap pri=42 0 0 However, uuid should work. See mine - by label: nimrodel:~ # l /dev/disk/by-label/ | grep -i swap lrwxrwxrwx 1 root root 10 Mar 25 04:28 160_swap -> ../../hdd7 lrwxrwxrwx 1 root root 10 Mar 25 04:28 320_swap -> ../../hda5 By uuid: nimrodel:~ # l /dev/disk/by-uuid/ | grep -i "hdd7\|hda5" lrwxrwxrwx 1 root root 10 Mar 25 04:28 c98fd5ec-e3f6-406d-8efc-e070b8a18119 -> ../../hda5 (only one is seen, not the other. No idea why) By id: nimrodel:~ # l /dev/disk/by-id/ | grep -i "hdd7\|hda5" lrwxrwxrwx 1 root root 10 Mar 25 04:28 ata-ST3160021A_5JS4VV1F-part7 -> ../../hdd7 lrwxrwxrwx 1 root root 10 Mar 25 04:28 ata-ST3320620A_5QF2M56F-part5 -> ../../hda5 lrwxrwxrwx 1 root root 10 Mar 25 04:28 edd-int13_dev82-part7 -> ../../hdd7 By path: nimrodel:~ # l /dev/disk/by-path/ | grep -i "hdd7\|hda5" lrwxrwxrwx 1 root root 10 Mar 25 04:28 pci-0000:00:1f.1-ide-0:0-part5 -> ../../hda5 lrwxrwxrwx 1 root root 10 Mar 25 04:28 pci-0000:00:1f.1-ide-1:1-part7 -> ../../hdd7 - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAknSNT0ACgkQtTMYHG2NR9VN3gCfVKs1OsV0hoYl00JbhhZe/XIH C5sAnA5uUdqQnzHNLR8nt+RdmPo6qM1S =JRJk -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue, Mar 31, 2009 at 11:22 AM, Carlos E. R.
2) How do you handle swap partitions?
LABEL=320_swap swap swap pri=42 0 0
However, uuid should work. See mine - by label:
nimrodel:~ # l /dev/disk/by-label/ | grep -i swap lrwxrwxrwx 1 root root 10 Mar 25 04:28 160_swap -> ../../hdd7 lrwxrwxrwx 1 root root 10 Mar 25 04:28 320_swap -> ../../hda5
See my totally missing by-label: # ls /dev/disk by-id by-path by-uuid Possibly caused by me never having labeled these drives? Did you manually label them 160_swap and 320_swap. With what tool. I thought labels were associated with filesystems. Is there a swap partition labeler? Greg -- Greg Freemyer Head of EDD Tape Extraction and Processing team Litigation Triage Solutions Specialist http://www.linkedin.com/in/gregfreemyer First 99 Days Litigation White Paper - http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf The Norcross Group The Intersection of Evidence & Technology http://www.norcrossgroup.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2009/03/31 12:57 (GMT-0400) Greg Freemyer composed:
On Tue, Mar 31, 2009 at 11:22 AM, Carlos E. R.
wrote:
2) How do you handle swap partitions?
LABEL=320_swap swap swap pri=42 0 0
However, uuid should work. See mine - by label:
nimrodel:~ # l /dev/disk/by-label/ | grep -i swap lrwxrwxrwx 1 root root 10 Mar 25 04:28 160_swap -> ../../hdd7 lrwxrwxrwx 1 root root 10 Mar 25 04:28 320_swap -> ../../hda5
See my totally missing by-label:
# ls /dev/disk by-id by-path by-uuid
Possibly caused by me never having labeled these drives?
They don't label themselves. ;-) You can have YaST set labels during installation, or later.
Did you manually label them 160_swap and 320_swap. With what tool. I thought labels were associated with filesystems.
I only use ext2/3, so both e2label and tune2fs -L work for me for regular partitions, usually the latter, when I change -i & -c to 0.
Is there a swap partition labeler?
mkswap -L -- "The plans of the diligent lead to profit as surely as haste leads to poverty." Proverbs 21:5 NIV Team OS/2 ** Reg. Linux User #211409 Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Did you manually label them 160_swap and 320_swap. With what tool. I thought labels were associated with filesystems.
I only use ext2/3, so both e2label and tune2fs -L work for me for regular partitions, usually the latter, when I change -i & -c to 0.
Is there a swap partition labeler?
mkswap -L
# mkswap -L swap /dev/sda1 /dev/sda1: Device or resource busy I also tried to do it via the yast2 - partitioner, but that fails as well. The partitioner approach seemed like it should of worked, so I opened a bugzilla. https://bugzilla.novell.com/show_bug.cgi?id=490817 FYI: The partitioner did work for my ext3 partitions and did a nice job of updating the /etc/fstab as well. I must say in seemed a very non-intuitive way to do that. Greg -- Greg Freemyer Head of EDD Tape Extraction and Processing team Litigation Triage Solutions Specialist http://www.linkedin.com/in/gregfreemyer First 99 Days Litigation White Paper - http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf The Norcross Group The Intersection of Evidence & Technology http://www.norcrossgroup.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tuesday March 31 2009, Greg Freemyer wrote:
...
# mkswap -L swap /dev/sda1 /dev/sda1: Device or resource busy
You can't reformat a swap partition while it's being used, of course. Use "swapoff" to take it out of service before recreating it then use "swapon" to put it back into service.
...
Greg
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue, Mar 31, 2009 at 2:58 PM, Randall R Schulz
On Tuesday March 31 2009, Greg Freemyer wrote:
...
# mkswap -L swap /dev/sda1 /dev/sda1: Device or resource busy
You can't reformat a swap partition while it's being used, of course. Use "swapoff" to take it out of service before recreating it then use "swapon" to put it back into service.
# swapoff -a swapoff: /dev/sda1: Cannot allocate memory Remember, all I want to do is "label" the swap partition and update my fstab to reference it. I can label a mounted filesystem, so it seems like there should be a tool to label a in use swap partition. I know I'm being a bit pig headed, but every opensuse distro update I've done recently has told me to abort my upgrade and move away from /dev/sda style references in /etc/fstab and then restart the upgrade. (many of my machines started life several versions ago.) If OpenSUSE is going to advise doing that, it really should provide basic tools for doing so. Greg -- Greg Freemyer Head of EDD Tape Extraction and Processing team Litigation Triage Solutions Specialist http://www.linkedin.com/in/gregfreemyer First 99 Days Litigation White Paper - http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf The Norcross Group The Intersection of Evidence & Technology http://www.norcrossgroup.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tuesday March 31 2009, Greg Freemyer wrote:
On Tue, Mar 31, 2009 at 2:58 PM, Randall R Schulz
wrote: On Tuesday March 31 2009, Greg Freemyer wrote:
...
# mkswap -L swap /dev/sda1 /dev/sda1: Device or resource busy
You can't reformat a swap partition while it's being used, of course. Use "swapoff" to take it out of service before recreating it then use "swapon" to put it back into service.
# swapoff -a swapoff: /dev/sda1: Cannot allocate memory
Probably all the pages occupying it cannot be brought back into main store. You'll have to shift to a run level with less running or boot to single-user so that swap is not in use.
Remember, all I want to do is "label" the swap partition and update my fstab to reference it. I can label a mounted filesystem, so it seems like there should be a tool to label a in use swap partition.
I understand what you want to do.
...
Greg
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday, 2009-03-31 at 15:07 -0400, Greg Freemyer wrote:
On Tue, Mar 31, 2009 at 2:58 PM, Randall R Schulz <> wrote:
On Tuesday March 31 2009, Greg Freemyer wrote:
...
# mkswap -L swap /dev/sda1 /dev/sda1: Device or resource busy
Obviously, it is in use.
You can't reformat a swap partition while it's being used, of course. Use "swapoff" to take it out of service before recreating it then use "swapon" to put it back into service.
# swapoff -a swapoff: /dev/sda1: Cannot allocate memory
You have three alternatives: - Try switching to text mode (init 3), to reduce the amount of memory in use. If it fails try runlevel 1, which stops all services. - Create another swapspace (on file, for example), add it, then remove sda1, use mkswap to recreate it with a label, then revert the process to leave only sda1. After sda1 is activated, change the fstab (the kernel might not see the label till next reboot. - Reboot to a live dvd or rescue dvd to do the change while the system is not running - unless the live founds swap space and uses it.
Remember, all I want to do is "label" the swap partition and update my fstab to reference it. I can label a mounted filesystem, so it seems like there should be a tool to label a in use swap partition.
Well, it can be handy, but the devs probably did not find it useful enough to do it. As far as I remember, it is not possible to label a filesystem while in use, and often the kernel does not see the change till you reboot.
I know I'm being a bit pig headed, but every opensuse distro update I've done recently has told me to abort my upgrade and move away from /dev/sda style references in /etc/fstab and then restart the upgrade. (many of my machines started life several versions ago.)
Mine too.
If OpenSUSE is going to advise doing that, it really should provide basic tools for doing so.
I don't remember off-hand if yast automates this or not :-? After all, sysadmins have to earn their potatoes somehow ;-) - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAknSb5gACgkQtTMYHG2NR9UI1wCeJy6lJb0chgahu4Xh60YPp+O/ UKgAnj+89H9jcVHOLR7RA+0+0kdEXyy9 =5BmA -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Remember, all I want to do is "label" the swap partition and update my fstab to reference it. I can label a mounted filesystem, so it seems like there should be a tool to label a in use swap partition.
Well, it can be handy, but the devs probably did not find it useful enough to do it. As far as I remember, it is not possible to label a filesystem while in use, and often the kernel does not see the change till you reboot.
You can definitely label a *mounted* ext3 filesystem partition. I just did it via the yast2-partitioner. The partitioner allows you to try to label a swap partition too, but then gives an error message at the last minute. I assume because it is in use. As I said, I made a bugzilla for this because it seems broken to me as opposed to being a missing feature. Greg -- Greg Freemyer Head of EDD Tape Extraction and Processing team Litigation Triage Solutions Specialist http://www.linkedin.com/in/gregfreemyer First 99 Days Litigation White Paper - http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf The Norcross Group The Intersection of Evidence & Technology http://www.norcrossgroup.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday, 2009-03-31 at 15:42 -0400, Greg Freemyer wrote:
Well, it can be handy, but the devs probably did not find it useful enough to do it. As far as I remember, it is not possible to label a filesystem while in use, and often the kernel does not see the change till you reboot.
You can definitely label a *mounted* ext3 filesystem partition. I just did it via the yast2-partitioner.
Interesting. Try the same with reiserfs, xfs, fat... I believe most of them do not accept it.
The partitioner allows you to try to label a swap partition too, but then gives an error message at the last minute. I assume because it is in use.
Most probably.
As I said, I made a bugzilla for this because it seems broken to me as opposed to being a missing feature.
Yes, I have read it. If the underlying app can't label it, there is little the yast partitioner can do, except warning before you go all the road. It is up to the devs of mkswap to adapt it, I guess. It is a tricky situation, because lives and rescue systems will probably use the swap space they can find. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAknSdX0ACgkQtTMYHG2NR9Wh9ACfdwJhTcowyLNSC+IxorVXs1FV nPoAnRm7tsXmAybZnFJETb+aj6nVGa/Y =U1aG -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue, Mar 31, 2009 at 3:56 PM, Carlos E. R.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tuesday, 2009-03-31 at 15:42 -0400, Greg Freemyer wrote:
Well, it can be handy, but the devs probably did not find it useful enough to do it. As far as I remember, it is not possible to label a filesystem while in use, and often the kernel does not see the change till you reboot.
You can definitely label a *mounted* ext3 filesystem partition. I just did it via the yast2-partitioner.
Interesting. Try the same with reiserfs, xfs, fat... I believe most of them do not accept it.
I only have that style on LVM partitions. Not sure it is a relevant test to compare that to physical partitions.
The partitioner allows you to try to label a swap partition too, but then gives an error message at the last minute. I assume because it is in use.
Most probably.
As I said, I made a bugzilla for this because it seems broken to me as opposed to being a missing feature.
Yes, I have read it. If the underlying app can't label it, there is little the yast partitioner can do, except warning before you go all the road. It is up to the devs of mkswap to adapt it, I guess.
It is a tricky situation, because lives and rescue systems will probably use the swap space they can find.
The label is in a header that is probably only read at swapon time.
It is probably as simple as:
echo "my_label" | dd of=/dev/sda1 obs=1 seek=
- -- Cheers, Carlos E. R.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux)
iEYEARECAAYFAknSdX0ACgkQtTMYHG2NR9Wh9ACfdwJhTcowyLNSC+IxorVXs1FV nPoAnRm7tsXmAybZnFJETb+aj6nVGa/Y =U1aG -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-- Greg Freemyer Head of EDD Tape Extraction and Processing team Litigation Triage Solutions Specialist http://www.linkedin.com/in/gregfreemyer First 99 Days Litigation White Paper - http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf The Norcross Group The Intersection of Evidence & Technology http://www.norcrossgroup.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday, 2009-03-31 at 16:06 -0400, Greg Freemyer wrote:
You can definitely label a *mounted* ext3 filesystem partition. I just did it via the yast2-partitioner.
Interesting. Try the same with reiserfs, xfs, fat... I believe most of them do not accept it.
I only have that style on LVM partitions. Not sure it is a relevant test to compare that to physical partitions.
It doesn't matter, the "formatting" is on another layer.
Yes, I have read it. If the underlying app can't label it, there is little the yast partitioner can do, except warning before you go all the road. It is up to the devs of mkswap to adapt it, I guess.
It is a tricky situation, because lives and rescue systems will probably use the swap space they can find.
The label is in a header that is probably only read at swapon time.
It is probably as simple as:
echo "my_label" | dd of=/dev/sda1 obs=1 seek=
sync
Ughh! :-?
Even easier to write from c code.
If you're paranoid you could wrap some locking around that such that swapon knows what it is going on.
I really don't think this qualifies as tricky.
My hair is rising on end >:-) - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAknSezUACgkQtTMYHG2NR9WyTgCcCnDuwNjPa75lE+NYUbJhWvGj qzYAoIl7yJN4eSd8Schf3w6hhKLQ48xU =eLKt -----END PGP SIGNATURE-----
On Tue, Mar 31, 2009 at 3:56 PM, Carlos E. R.
On Tuesday, 2009-03-31 at 15:42 -0400, Greg Freemyer wrote:
Well, it can be handy, but the devs probably did not find it useful enough to do it. As far as I remember, it is not possible to label a filesystem while in use, and often the kernel does not see the change till you reboot.
You can definitely label a *mounted* ext3 filesystem partition. I just did it via the yast2-partitioner.
Interesting. Try the same with reiserfs, xfs, fat... I believe most of them do not accept it.
reiserfs did not work from the partitioner, so I added a comment to the bugzilla about that. xfs did. Surprisingly, xfs_admin -L from the command line would not handle it being mounted, so this is a case where the partitioner is more flexible than the CLI tool. I did not test fat, ntfs, jfs, etc. So at this point we have 2 successes (ext3 and xfs) and 2 failures (reiserfs and swap). I guess I should update the FATE entry with that info. Greg -- Greg Freemyer Head of EDD Tape Extraction and Processing team Litigation Triage Solutions Specialist http://www.linkedin.com/in/gregfreemyer First 99 Days Litigation White Paper - http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf The Norcross Group The Intersection of Evidence & Technology http://www.norcrossgroup.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday, 2009-04-01 at 10:39 -0400, Greg Freemyer wrote:
Interesting. Try the same with reiserfs, xfs, fat... I believe most of them do not accept it.
reiserfs did not work from the partitioner, so I added a comment to the bugzilla about that.
xfs did. Surprisingly, xfs_admin -L from the command line would not handle it being mounted, so this is a case where the partitioner is more flexible than the CLI tool.
I did not test fat, ntfs, jfs, etc. So at this point we have 2 successes (ext3 and xfs) and 2 failures (reiserfs and swap).
I only used the cli on existing filesystem; yast on new filesystems. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAknTf+0ACgkQtTMYHG2NR9VnJgCaAucAUa0WaaD/9XKd9vrIO1Ie smkAoIVbw9tiIY3W7kyxAiVgBeJNauWc =0VGq -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tuesday March 31 2009, Greg Freemyer wrote:
Remember, all I want to do is "label" the swap partition and update my fstab to reference it. I can label a mounted filesystem, so it seems like there should be a tool to label a in use swap partition.
Well, it can be handy, but the devs probably did not find it useful enough to do it. As far as I remember, it is not possible to label a filesystem while in use, and often the kernel does not see the change till you reboot.
You can definitely label a *mounted* ext3 filesystem partition. I just did it via the yast2-partitioner.
You were trying to label a swap partition, not a file system volume.
...
Greg
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2009/03/31 21:31 (GMT+0200) Carlos E. R. composed:
# swapoff -a swapoff: /dev/sda1: Cannot allocate memory
You have three alternatives:
More than that.
- Try switching to text mode (init 3), to reduce the amount of memory in use. If it fails try runlevel 1, which stops all services.
Or just close a memory hogging app or three to free enough RAM that swap is unnecessary. Just Firefox is probably enough, and certainly OO.org should be more than enough unless you've got a big leaker open.
- Create another swapspace (on file, for example), add it, then remove sda1, use mkswap to recreate it with a label, then revert the process to leave only sda1. After sda1 is activated, change the fstab (the kernel might not see the label till next reboot.
Gross overkill.
- Reboot to a live dvd or rescue dvd to do the change while the system is not running - unless the live founds swap space and uses it.
Comment the swap partition line in /etc/fstab, reboot, mkswap -L, uncomment, swapon -a. Live CDs will typically find and use whatever swap partitions they find. I've done this after the fact swap lable setting lots of times, and doubt it ever took me more than 30 seconds after figuring out the first time. -- "The plans of the diligent lead to profit as surely as haste leads to poverty." Proverbs 21:5 NIV Team OS/2 ** Reg. Linux User #211409 Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday, 2009-03-31 at 16:04 -0400, Felix Miata wrote:
swapoff: /dev/sda1: Cannot allocate memory
You have three alternatives:
More than that.
- Try switching to text mode (init 3), to reduce the amount of memory in use. If it fails try runlevel 1, which stops all services.
Or just close a memory hogging app or three to free enough RAM that swap is unnecessary. Just Firefox is probably enough, and certainly OO.org should be more than enough unless you've got a big leaker open.
If that is enough, obviously :-)
- Create another swapspace (on file, for example), add it, then remove sda1, use mkswap to recreate it with a label, then revert the process to leave only sda1. After sda1 is activated, change the fstab (the kernel might not see the label till next reboot.
Gross overkill.
I happen to always make a swap space on each disk available, as a matter of procedure: thus, here I have two swap partitions, with the same priority: it works faster.
- Reboot to a live dvd or rescue dvd to do the change while the system is not running - unless the live founds swap space and uses it.
Comment the swap partition line in /etc/fstab, reboot, mkswap -L, uncomment, swapon -a. Live CDs will typically find and use whatever swap partitions they find.
A text mode rescue system might not.
I've done this after the fact swap lable setting lots of times, and doubt it ever took me more than 30 seconds after figuring out the first time.
Me too, but the kernel does not see the label change on a live system. Not when I tried. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAknSfQ8ACgkQtTMYHG2NR9WSQACfRvnmHThAmNCuWQdOEm/41n+l 1bAAmwXukIuJRxkHugF50fyIa/ZwFpxX =2DsF -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tuesday 31 March 2009 03:29:00 pm Carlos E. R. wrote:
Me too, but the kernel does not see the label change on a live system. Not when I tried.
sfdisk --re-read /dev/sdX -R [or --re-read]: make kernel reread partition table -- Regards, Rajko -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday, 2009-03-31 at 23:00 -0500, Rajko M. wrote:
On Tuesday 31 March 2009 03:29:00 pm Carlos E. R. wrote:
Me too, but the kernel does not see the label change on a live system. Not when I tried.
sfdisk --re-read /dev/sdX -R [or --re-read]: make kernel reread partition table
It is not the partition table, but the /dev/disk/by-*/ structure: you add a label and, depending on the tool and type, it may not appear there. And anyway, rereading the partition table fails sometimes. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAknTgIoACgkQtTMYHG2NR9USbgCfQu0OamwtjxSRDX0GvtRHpPGa JdMAn1QRWsbdbMDkwTxs5ikRaCxZcvG2 =/tme -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Greg Freemyer wrote:
All,
I've got a few old machines that I've been upgrading that have /dev/sdaX type entries in /etc/fstab.
I'm in the process of moving them to /dev/disk/by-uuid/* entries
2 questions:
1) Is there a tool for this. I've just done one machine by looking at the symbolic links in that directory, then hand editing the fstab to be correct. Only takes a few minutes, but it is tedious and error prone.
Use udevinfo: udevinfo -q symlink -n /dev/sda2 2>/dev/null with little bash scripting you can get it automatic. JR -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday, 2009-03-31 at 17:37 +0200, Josef Reidinger wrote:
Use udevinfo: udevinfo -q symlink -n /dev/sda2 2>/dev/null with little bash scripting you can get it automatic.
cer@nimrodel:~> man udevinfo No manual entry for udevinfo Huh? - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAknScHkACgkQtTMYHG2NR9VXxgCdHaQ1ooEed5bCZevA2sL/XQTs dhEAn3QInszfEPV2xsOKx9qJSMohR/jm =aQJq -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Carlos E. R. wrote:
On Tuesday, 2009-03-31 at 17:37 +0200, Josef Reidinger wrote:
Use udevinfo: udevinfo -q symlink -n /dev/sda2 2>/dev/null with little bash scripting you can get it automatic.
cer@nimrodel:~> man udevinfo No manual entry for udevinfo
Huh?
-- Cheers, Carlos E. R.
It is udevadm info, but udevinfo work also under normal user. For udevadm you need extra permissions (root). Now is udevinfo marked as obsolete, but still works. JR -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue, Mar 31, 2009 at 11:37 AM, Josef Reidinger
Greg Freemyer wrote:
All,
I've got a few old machines that I've been upgrading that have /dev/sdaX type entries in /etc/fstab.
I'm in the process of moving them to /dev/disk/by-uuid/* entries
2 questions:
1) Is there a tool for this. I've just done one machine by looking at the symbolic links in that directory, then hand editing the fstab to be correct. Only takes a few minutes, but it is tedious and error prone.
Use udevinfo: udevinfo -q symlink -n /dev/sda2 2>/dev/null with little bash scripting you can get it automatic. JR
Josef, That seems like that sort of thing that should be part of the distro since going through the yast-partitioner seems like a pretty obtuse way to get it done. I think I'll go drop the idea into FATE. Greg -- Greg Freemyer Head of EDD Tape Extraction and Processing team Litigation Triage Solutions Specialist http://www.linkedin.com/in/gregfreemyer First 99 Days Litigation White Paper - http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf The Norcross Group The Intersection of Evidence & Technology http://www.norcrossgroup.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (6)
-
Carlos E. R.
-
Felix Miata
-
Greg Freemyer
-
Josef Reidinger
-
Rajko M.
-
Randall R Schulz