Greetings;
I had to replace a terrabyte drive a few days ago, and I'm mounting it in fstab by its label.
How does one go about determining the UUID of this replacement device so I can make my fstab more uniform in its use?
On Sat, 2009-04-25 at 13:00 -0400, Gene Heskett wrote:
Greetings;
I had to replace a terrabyte drive a few days ago, and I'm mounting it in fstab by its label.
How does one go about determining the UUID of this replacement device so I can make my fstab more uniform in its use?
---- blkid
Craig
Craig White wrote:
On Sat, 2009-04-25 at 13:00 -0400, Gene Heskett wrote:
Greetings;
I had to replace a terrabyte drive a few days ago, and I'm mounting it in fstab by its label.
How does one go about determining the UUID of this replacement device so I can make my fstab more uniform in its use?
blkid
Craig
Or else "hal-device", which also works with swap partitions, etc.
-Philip
On Saturday 25 April 2009, Philip A. Prindeville wrote:
Craig White wrote:
On Sat, 2009-04-25 at 13:00 -0400, Gene Heskett wrote:
Greetings;
I had to replace a terrabyte drive a few days ago, and I'm mounting it in fstab by its label.
How does one go about determining the UUID of this replacement device so I can make my fstab more uniform in its use?
blkid
Returned null. Oh, no argument, then it works. Including for swaps!
Craig
Or else "hal-device", which also works with swap partitions, etc.
This worked, but boy is it verbose.
-Philip
Thanks guys.
On Sun, 2009-04-26 at 00:13 -0400, Gene Heskett wrote:
On Saturday 25 April 2009, Philip A. Prindeville wrote:
Craig White wrote:
On Sat, 2009-04-25 at 13:00 -0400, Gene Heskett wrote:
Greetings;
I had to replace a terrabyte drive a few days ago, and I'm mounting it in fstab by its label.
How does one go about determining the UUID of this replacement device so I can make my fstab more uniform in its use?
blkid
Returned null. Oh, no argument, then it works. Including for swaps!
---- well, technically, it only lists physical devices and if you have an lvm setup with swap and logical volumes, it may require you to execute lvdisplay to see them.
As for arguments, it actually has a man page
Craig
On Sunday 26 April 2009, Craig White wrote:
On Sun, 2009-04-26 at 00:13 -0400, Gene Heskett wrote:
On Saturday 25 April 2009, Philip A. Prindeville wrote:
Craig White wrote:
On Sat, 2009-04-25 at 13:00 -0400, Gene Heskett wrote:
Greetings;
I had to replace a terrabyte drive a few days ago, and I'm mounting it in fstab by its label.
How does one go about determining the UUID of this replacement device so I can make my fstab more uniform in its use?
blkid
Returned null. Oh, no argument, then it works. Including for swaps!
well, technically, it only lists physical devices and if you have an lvm setup with swap and logical volumes, it may require you to execute lvdisplay to see them.
As for arguments, it actually has a man page
Incredible! An honest to goodness manpage for blkid? By golly, so it does, Amazing... I have gotten used to all this new stuff not having one cuz the authors are too busy|lazy to write a manpage for their latest masterpiece. :(
Offtopic: The audio guys in particular. Sometimes I long for the OSS days, at least it worked when it worked, not this heavily distorted from overloads whisper at subliminal levels for all system sounds I have now. From FF, all the plugins work great, but kde's sound effects other than the Charge that k3b plays at the end are of the did I hear that, or was that my imagination working overtime. There is no one on this list who has the foggiest idea how to get the crap fedora ships to actually work, and only maybe 10% of it has manpages. ---------------
So I first gave it the argument /dev/sdc, figuring it would just show that device, but that returned a null. By itself with no argument, the whole list in short form. Nice. fstab fixed. Thank you.
Craig
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
Gene Heskett wrote:
Offtopic: The audio guys in particular. Sometimes I long for the OSS days, at least it worked when it worked, not this heavily distorted from overloads whisper at subliminal levels for all system sounds I have now. From FF, all the plugins work great, but kde's sound effects other than the Charge that k3b plays at the end are of the did I hear that, or was that my imagination working overtime. There is no one on this list who has the foggiest idea how to get the crap fedora ships to actually work, and only maybe 10% of it has manpages.
I know the feeling - it took me a while to get sound working correctly after upgrading to Fedora 10. Pulse Audio insisted on trying to use device 1 instead of device 0. So it could not output to my sound card. And because it was using the card, nothing else could. Once I fixed that goof, all is well again.
Mikkel
From: "Gene Heskett" gene.heskett@verizon.net Sent: Saturday, 2009/April/25 21:13
On Saturday 25 April 2009, Philip A. Prindeville wrote:
Craig White wrote:
On Sat, 2009-04-25 at 13:00 -0400, Gene Heskett wrote:
Greetings;
I had to replace a terrabyte drive a few days ago, and I'm mounting it in fstab by its label.
How does one go about determining the UUID of this replacement device so I can make my fstab more uniform in its use?
blkid
Returned null. Oh, no argument, then it works. Including for swaps!
Craig
Or else "hal-device", which also works with swap partitions, etc.
This worked, but boy is it verbose.
$blkid /dev/sda1 /dev/sda1: LABEL="/boot-7" UUID="bfe129cd-8087-4c0b-aad1-08508b7adee2" SEC_TYPE="ext2" TYPE="ext3"
It works by partition not drive.
{^_-}
On Sun, 2009-04-26 at 01:31 -0700, jdow wrote:
$blkid /dev/sda1 /dev/sda1: LABEL="/boot-7" UUID="bfe129cd-8087-4c0b-aad1-08508b7adee2" SEC_TYPE="ext2" TYPE="ext3"
It works by partition not drive.
---- I think it is more like, you won't see the results you expect if you supply /dev/sdX as the argument because /dev/sdX is a physical device and not a block device to Linux.
Thus an apparent non-answer is actually the correct answer returning no block attributes queried for a physical device.
It's apparent in the first line of the man page...
NAME blkid - command-line utility to locate/print block device attributes
Craig
On Sun, 2009-04-26 at 05:52 -0700, Craig White wrote:
On Sun, 2009-04-26 at 01:31 -0700, jdow wrote:
$blkid /dev/sda1 /dev/sda1: LABEL="/boot-7" UUID="bfe129cd-8087-4c0b-aad1-08508b7adee2" SEC_TYPE="ext2" TYPE="ext3"
It works by partition not drive.
I think it is more like, you won't see the results you expect if you supply /dev/sdX as the argument because /dev/sdX is a physical device and not a block device to Linux.
Physical drives are block devices too:
$ ls -l /dev/sda brw-rw---- 1 root disk 8, 0 2009-04-25 18:06 /dev/sda
Note the 'b' at the start of the output line.
Filesystem or swap formatting *may* be applied at the drive level, but is almost always applied at the partion level, so in the vast majority of cases you will need to supply a partition ID to the blkid command (ie., the argument to blkid needs to be the same argument that was supplied to mkfs or mkswap -- drive if the drive was formatted, partition if a partition was formatted, LV if an LV was formatted).
-Chris
Craig White wrote:
On Sun, 2009-04-26 at 01:31 -0700, jdow wrote:
$blkid /dev/sda1 /dev/sda1: LABEL="/boot-7" UUID="bfe129cd-8087-4c0b-aad1-08508b7adee2" SEC_TYPE="ext2" TYPE="ext3"
It works by partition not drive.
I think it is more like, you won't see the results you expect if you supply /dev/sdX as the argument because /dev/sdX is a physical device and not a block device to Linux.
No, /dev/sdX is no different then /dev/sdX# as far as device files are concerned. It is just that they are not normally labeled if you have a partition table. But there is no reason you could not give it one. It is also possible to use a disk without a partition table. While it is not common usage, there is nothing stopping you from running mke2fs /dev/sdX and mounting the file system using mount /dev/sdX /mnt/filesystem.
Thus an apparent non-answer is actually the correct answer returning no block attributes queried for a physical device.
It's apparent in the first line of the man page...
NAME blkid - command-line utility to locate/print block device attributes
Craig
The reasion it returns no results is because the device does not have a UUID, not because it isn't a block device.
Mikkel