How to remove the disk label and use /dev/sdx...

Discuss Applications
Post Reply
User avatar
Basher52
guru
guru
Posts: 916
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

How to remove the disk label and use /dev/sdx...

Post by Basher52 » Tue Feb 09, 2010 1:32 pm

My grub after a new clean install of F11 looks like this:

#
UUID=34fa1988-6c56-4fb2-aa6f-7ea34d30e708 /webdata2 ext4 defaults 1 2
UUID=f9744c57-2a4b-45d9-8861-4a5d512c2b02 /webdata3 ext4 defaults 1 2
UUID=a82ac92b-15d3-43a5-a504-d97ed42fda93 /boot ext3 defaults 1 2
UUID=b78bab96-aa8c-4fe8-8e32-d180c33dab76 / ext4 defaults 1 1
UUID=fe69128f-2d5c-412a-bb82-4b4bd78a473b /webdata ext4 defaults 1 2
UUID=e1ebdc6f-f249-430b-a5e0-d0c8add17a66 /data ext4 defaults 1 2
/dev/mapper/pdc_bcjejjecep3 swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts defaults 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
This might be cos I set a RAID1 on the disks(made by 2 HDDs)
How can I remove that and use the, for me anyways, better "explanation" of the disks and partitions used by using: /dev/sdx... etc

//B52 :)

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Tue Feb 09, 2010 2:31 pm

Your Grub or your /etc/fstab? :)

You can use several different references for your file systems. UUID=xxx is one way, LABEL=xxx is another way, /dev/sdxx is another way. You can change them to whichever method you want to use.

$ man fstab
Last edited by Void Main on Sat Mar 13, 2010 7:56 pm, edited 1 time in total.

User avatar
Basher52
guru
guru
Posts: 916
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Post by Basher52 » Tue Feb 09, 2010 3:03 pm

The man says that using the UUID 'is more robust' so OK, I'll keep it, but I can't find the "translation" to the /dev/sdx' anywhere.
If I need to take a device down, I need to know what that device is, cos I cant umount using the UUID.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Tue Feb 09, 2010 5:56 pm

Actually you can mount it by UUID and that's exactly what happens when you boot and use a UUID in your fstab (see man mount). Once booted and everything is mounted it's easy to see what the device name is for that UUID just by typing "mount" or "df" and seeing what device name is associated with the mount point directory.

Also you could:

Code: Select all

ls -l /dev/disk/by-uuid
ls -l /dev/disk/by-label
Or to look at the UUID or volume name (LABEL) you could:

Code: Select all

tune2fs -l /dev/sda1
Replace /dev/sda1 with whatever file system you want to look at.

User avatar
Basher52
guru
guru
Posts: 916
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Post by Basher52 » Sat Mar 13, 2010 1:26 pm

by using these you gave me and this is what I get:

Code: Select all

ls -l /dev/disk/by-label
total 0
lrwxrwxrwx 1 root root 10 2009-12-26 10:44 SWAP-sda3 -> ../../sda3
lrwxrwxrwx 1 root root 10 2009-12-26 10:44 \x2f1 -> ../../sda2
lrwxrwxrwx 1 root root 10 2009-12-26 10:44 \x2fboot1 -> ../../sda1
lrwxrwxrwx 1 root root 10 2009-12-26 10:44 \x2fdata -> ../../sda4


ls -l /dev/disk/by-id
total 0
lrwxrwxrwx 1 root root  9 2009-12-26 10:44 ata-HDS722512VLSA80_VNRC3EC3CKR17M -> ../../sda
lrwxrwxrwx 1 root root 10 2009-12-26 10:44 ata-HDS722512VLSA80_VNRC3EC3CKR17M-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 2009-12-26 10:44 ata-HDS722512VLSA80_VNRC3EC3CKR17M-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 2009-12-26 10:44 ata-HDS722512VLSA80_VNRC3EC3CKR17M-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 2009-12-26 10:44 ata-HDS722512VLSA80_VNRC3EC3CKR17M-part4 -> ../../sda4
lrwxrwxrwx 1 root root  9 2010-03-13 19:18 scsi-200193c0000000000 -> ../../sdd
lrwxrwxrwx 1 root root 10 2009-12-26 09:44 scsi-200193c0000000000-part1 -> ../../sdd1
lrwxrwxrwx 1 root root 10 2009-12-26 09:44 scsi-200193c0000000000-part2 -> ../../sdd2
lrwxrwxrwx 1 root root 10 2009-12-26 09:44 scsi-200193c0000000000-part3 -> ../../sdd3
lrwxrwxrwx 1 root root  9 2009-12-26 10:44 scsi-SATA_HDS722512VLSA80_VNRC3EC3CKR17M -> ../../sda
lrwxrwxrwx 1 root root 10 2009-12-26 10:44 scsi-SATA_HDS722512VLSA80_VNRC3EC3CKR17M-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 2009-12-26 10:44 scsi-SATA_HDS722512VLSA80_VNRC3EC3CKR17M-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 2009-12-26 10:44 scsi-SATA_HDS722512VLSA80_VNRC3EC3CKR17M-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 2009-12-26 10:44 scsi-SATA_HDS722512VLSA80_VNRC3EC3CKR17M-part4 -> ../../sda4


ls -l /dev/disk/by-label
total 0
lrwxrwxrwx 1 root root 10 2009-12-26 10:44 SWAP-sda3 -> ../../sda3
lrwxrwxrwx 1 root root 10 2009-12-26 10:44 \x2f1 -> ../../sda2
lrwxrwxrwx 1 root root 10 2009-12-26 10:44 \x2fboot1 -> ../../sda1
lrwxrwxrwx 1 root root 10 2009-12-26 10:44 \x2fdata -> ../../sda4


ls -l /dev/disk/by-path
total 0
lrwxrwxrwx 1 root root  9 2009-12-26 10:44 pci-0000:00:0f.0-scsi-0:0:0:0 -> ../../sda
lrwxrwxrwx 1 root root 10 2009-12-26 10:44 pci-0000:00:0f.0-scsi-0:0:0:0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 2009-12-26 10:44 pci-0000:00:0f.0-scsi-0:0:0:0-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 2009-12-26 10:44 pci-0000:00:0f.0-scsi-0:0:0:0-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 2009-12-26 10:44 pci-0000:00:0f.0-scsi-0:0:0:0-part4 -> ../../sda4
lrwxrwxrwx 1 root root  9 2009-12-26 10:44 pci-0000:00:0f.1-scsi-1:0:1:0 -> ../../sr0
lrwxrwxrwx 1 root root  9 2009-12-26 09:44 pci-0000:04:04.0-scsi-0:0:0:0 -> ../../sdb
lrwxrwxrwx 1 root root 10 2009-12-26 09:44 pci-0000:04:04.0-scsi-0:0:0:0-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 2009-12-26 09:44 pci-0000:04:04.0-scsi-0:0:0:0-part2 -> ../../sdb2
lrwxrwxrwx 1 root root 10 2009-12-26 09:44 pci-0000:04:04.0-scsi-0:0:0:0-part3 -> ../../sdb3
lrwxrwxrwx 1 root root  9 2009-12-26 09:44 pci-0000:04:04.0-scsi-0:0:2:0 -> ../../sdd
lrwxrwxrwx 1 root root 10 2009-12-26 09:44 pci-0000:04:04.0-scsi-0:0:2:0-part1 -> ../../sdd1
lrwxrwxrwx 1 root root 10 2009-12-26 09:44 pci-0000:04:04.0-scsi-0:0:2:0-part2 -> ../../sdd2
lrwxrwxrwx 1 root root 10 2009-12-26 09:44 pci-0000:04:04.0-scsi-0:0:2:0-part3 -> ../../sdd3


ls -l /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 10 2009-12-26 09:44 04ff4fcd-bfda-4e0e-8c9e-7162a0f3da7a -> ../../sdd3
lrwxrwxrwx 1 root root 10 2009-12-26 09:44 1a141d24-710b-4145-a2d4-ac7d10490668 -> ../../sdd2
lrwxrwxrwx 1 root root 10 2009-12-26 09:44 2b785d75-9ad2-4e4f-a36c-4b59cca42410 -> ../../sdb2
lrwxrwxrwx 1 root root 10 2009-12-26 10:44 57c19dc8-9906-4ebd-b37f-b4531707c72b -> ../../sda1
lrwxrwxrwx 1 root root 10 2009-12-26 09:44 781ad913-8af2-4035-a3e2-535bb660d594 -> ../../sdb3
lrwxrwxrwx 1 root root 10 2009-12-26 10:44 83d70ef1-135e-4053-8a44-7df805c7d104 -> ../../sda2
lrwxrwxrwx 1 root root 10 2009-12-26 09:44 c6e98f57-7ab9-470b-93d4-873d2b5bf7c4 -> ../../sdd1
lrwxrwxrwx 1 root root 10 2009-12-26 10:44 f0c45570-3977-48a1-bf0e-3b95cc92f295 -> ../../sda4
lrwxrwxrwx 1 root root 10 2009-12-26 09:44 f1bd3445-62f9-4cbc-a606-bfbcf416652c -> ../../sdb1
and my df -h shows:

Code: Select all

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2              16G  9.9G  5.1G  66% /
/dev/sda1              99M   93M  1.6M  99% /boot
/dev/sda4              95G   22G   69G  24% /data
tmpfs                 473M   12K  473M   1% /dev/shm
/dev/sdb1             2.0T  1.9T   50G  98% /db1
/dev/sdb2            1008G  952G  5.0G 100% /db1b
/dev/sdb3             1.6T  895G  587G  61% /db2
/dev/sdd1            1008G  457G  500G  48% /db3
/dev/sdd2            1008G  237G  720G  25% /db3b
/dev/sdd3             277G   63G  200G  24% /db4
how can I see what physical disk that uses the /dev/sdb* disks?

here's a picture of the raid setup and the name of the physical disks.
I need to know what /dev/xxx the 500G disks are cos 3 of them are starting to get bad blocks and I need to get that changed.

Image




PS. is it:
three of them IS... or three of the ARE??
I know when it's only "one" you should use IS, but in this case I have no clue :P

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Sat Mar 13, 2010 8:00 pm

Code: Select all

fdisk -l
Oh, and "are". :)

User avatar
Basher52
guru
guru
Posts: 916
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Post by Basher52 » Tue Mar 23, 2010 2:29 pm

thanks :)
but I had to use

Code: Select all

parted -l
due to this

Code: Select all

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.

Post Reply