Page 1 of 4 123 ... LastLast
Results 1 to 10 of 39

Thread: Mounting ext4 usb disk by UUID doesn't work

  1. #1
    Join Date
    Feb 2014
    Location
    Finland
    Posts
    30

    Default Mounting ext4 usb disk by UUID doesn't work

    OpenSUSE 13.1 64bit KDE

    I have a WD 3Tb USB3 disk that I cannot mount by UUID or ID. When I plug in the disk, KDE doesn't automount it, /dev/disk/by-uuid/ doesn't show the disk at all, and /dev/disk/by-id/ does show the disk but there is no ID for the partition itself.
    Just tried on Ubuntu 12.04 server and it works perfectly there, the UUID is recognized etc.. I even tried to generate a new UUID with tune2fs but it didn't change anything. I need to get it to mount by UUID or ID for an rsync backup script.

    dmesg
    Code:
    [32462.575019] usb 2-1: new high-speed USB device number 2 using ehci-pci
    [32462.693257] usb 2-1: New USB device found, idVendor=1058, idProduct=1230
    [32462.693262] usb 2-1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
    [32462.693264] usb 2-1: Product: My Book 1230
    [32462.693267] usb 2-1: Manufacturer: Western Digital
    [32462.693269] usb 2-1: SerialNumber: 574343344530303233313233
    [32462.693538] usb-storage 2-1:1.0: USB Mass Storage device detected
    [32462.693599] scsi10 : usb-storage 2-1:1.0
    [32463.696904] scsi 10:0:0:0: Direct-Access     WD       My Book 1230     1050 PQ: 0 ANSI: 6
    [32463.698910] sd 10:0:0:0: Attached scsi generic sg2 type 0
    [32463.700523] scsi 10:0:0:1: Enclosure         WD       SES Device       1050 PQ: 0 ANSI: 6
    [32463.700573] ses 10:0:0:1: Attached Enclosure device
    [32463.700662] ses 10:0:0:1: Attached scsi generic sg3 type 13
    [32463.703393] ses 10:0:0:1: Failed to get diagnostic page 0x8000002
    [32463.703397] ses 10:0:0:1: Failed to bind enclosure -19
    [32463.704640] sd 10:0:0:0: [sdb] Spinning up disk...
    [32464.705007] ..........ready
    [32473.975810] sd 10:0:0:0: [sdb] 732558336 4096-byte logical blocks: (3.00 TB/2.72 TiB)
    [32473.977055] sd 10:0:0:0: [sdb] Write Protect is off
    [32473.977059] sd 10:0:0:0: [sdb] Mode Sense: 53 00 10 08
    [32473.978304] sd 10:0:0:0: [sdb] No Caching mode page found
    [32473.978307] sd 10:0:0:0: [sdb] Assuming drive cache: write through
    [32473.979307] sd 10:0:0:0: [sdb] 732558336 4096-byte logical blocks: (3.00 TB/2.72 TiB)
    [32473.981801] sd 10:0:0:0: [sdb] No Caching mode page found
    [32473.981804] sd 10:0:0:0: [sdb] Assuming drive cache: write through
    [32474.084204]  sdb: sdb1
    [32474.085935] sd 10:0:0:0: [sdb] 732558336 4096-byte logical blocks: (3.00 TB/2.72 TiB)
    [32474.090805] sd 10:0:0:0: [sdb] No Caching mode page found
    [32474.090808] sd 10:0:0:0: [sdb] Assuming drive cache: write through
    [32474.090812] sd 10:0:0:0: [sdb] Attached SCSI disk
    [32504.838022] usb 2-1: reset high-speed USB device number 2 using ehci-pci
    sudo /usr/sbin/parted -l
    Code:
    Model: ATA WDC WD1001FALS-0 (scsi)
    Disk /dev/sda: 1000GB
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos
    
    Number  Start   End     Size    Type      File system     Flags
     1      1049kB  106MB   105MB   primary   ntfs            type=07
     2      106MB   315GB   314GB   primary   ntfs            type=07
     3      315GB   1000GB  686GB   extended                  boot, lba, type=0f
     5      315GB   323GB   8588MB  logical   linux-swap(v1)  type=82
     6      323GB   431GB   107GB   logical   ext4            type=83
     7      431GB   1000GB  570GB   logical   ext4            type=83
    
    
    Model: WD My Book 1230 (scsi)
    Disk /dev/sdb: 3001GB
    Sector size (logical/physical): 4096B/4096B
    Partition Table: msdos
    
    Number  Start   End     Size    Type     File system  Flags
     1      1049kB  3001GB  3001GB  primary               type=83
    (why no file system shown on the usb disk? it's ext4 and it works when mounted with /dev/sdb1...)

    ls -lh /dev/disk/by-uuid/
    Code:
    lrwxrwxrwx 1 root root 10 Mar  8 08:53 209df6ce-3dc9-455f-a7fd-e6244f55beed -> ../../sda7
    lrwxrwxrwx 1 root root 10 Mar  8 08:53 687C33657C332D66 -> ../../sda1
    lrwxrwxrwx 1 root root 10 Mar  8 08:53 68f908a3-3194-4eaa-be5b-b0352bbf46b3 -> ../../sda5
    lrwxrwxrwx 1 root root 10 Mar  8 08:53 7C6E3FEF6E3FA0B6 -> ../../sda2
    lrwxrwxrwx 1 root root 10 Mar  8 08:53 bfd1440e-5352-4f00-a023-68ed658b87be -> ../../sda6
    ls -lh /dev/disk/by-id/
    Code:
    lrwxrwxrwx 1 root root  9 Mar  8 08:53 ata-TSSTcorp_CDDVDW_SH-S203D -> ../../sr0
    lrwxrwxrwx 1 root root  9 Mar  8 17:58 ata-WDC_WD1001FALS-00E3A0_WD-WCATR0371895 -> ../../sda
    lrwxrwxrwx 1 root root 10 Mar  8 08:53 ata-WDC_WD1001FALS-00E3A0_WD-WCATR0371895-part1 -> ../../sda1
    lrwxrwxrwx 1 root root 10 Mar  8 08:53 ata-WDC_WD1001FALS-00E3A0_WD-WCATR0371895-part2 -> ../../sda2
    lrwxrwxrwx 1 root root 10 Mar  8 08:53 ata-WDC_WD1001FALS-00E3A0_WD-WCATR0371895-part3 -> ../../sda3
    lrwxrwxrwx 1 root root 10 Mar  8 08:53 ata-WDC_WD1001FALS-00E3A0_WD-WCATR0371895-part5 -> ../../sda5
    lrwxrwxrwx 1 root root 10 Mar  8 08:53 ata-WDC_WD1001FALS-00E3A0_WD-WCATR0371895-part6 -> ../../sda6
    lrwxrwxrwx 1 root root 10 Mar  8 08:53 ata-WDC_WD1001FALS-00E3A0_WD-WCATR0371895-part7 -> ../../sda7
    lrwxrwxrwx 1 root root  9 Mar  8 17:58 ata-WDC_WD30EZRX-00SPEB0_WD-WCC4E0023123 -> ../../sdb
    lrwxrwxrwx 1 root root  9 Mar  8 17:58 scsi-1ATA_WDC_WD1001FALS-00E3A0_WD-WCATR0371895 -> ../../sda
    lrwxrwxrwx 1 root root 10 Mar  8 08:53 scsi-1ATA_WDC_WD1001FALS-00E3A0_WD-WCATR0371895-part1 -> ../../sda1
    lrwxrwxrwx 1 root root 10 Mar  8 08:53 scsi-1ATA_WDC_WD1001FALS-00E3A0_WD-WCATR0371895-part2 -> ../../sda2
    lrwxrwxrwx 1 root root 10 Mar  8 08:53 scsi-1ATA_WDC_WD1001FALS-00E3A0_WD-WCATR0371895-part3 -> ../../sda3
    lrwxrwxrwx 1 root root 10 Mar  8 08:53 scsi-1ATA_WDC_WD1001FALS-00E3A0_WD-WCATR0371895-part5 -> ../../sda5
    lrwxrwxrwx 1 root root 10 Mar  8 08:53 scsi-1ATA_WDC_WD1001FALS-00E3A0_WD-WCATR0371895-part6 -> ../../sda6
    lrwxrwxrwx 1 root root 10 Mar  8 08:53 scsi-1ATA_WDC_WD1001FALS-00E3A0_WD-WCATR0371895-part7 -> ../../sda7
    lrwxrwxrwx 1 root root  9 Mar  8 17:58 scsi-1WD_My_Book_1230_WCC4E0023123 -> ../../sdb
    lrwxrwxrwx 1 root root  9 Mar  8 17:58 scsi-SATA_WDC_WD1001FALS-0_WD-WCATR0371895 -> ../../sda
    lrwxrwxrwx 1 root root 10 Mar  8 08:53 scsi-SATA_WDC_WD1001FALS-0_WD-WCATR0371895-part1 -> ../../sda1
    lrwxrwxrwx 1 root root 10 Mar  8 08:53 scsi-SATA_WDC_WD1001FALS-0_WD-WCATR0371895-part2 -> ../../sda2
    lrwxrwxrwx 1 root root 10 Mar  8 08:53 scsi-SATA_WDC_WD1001FALS-0_WD-WCATR0371895-part3 -> ../../sda3
    lrwxrwxrwx 1 root root 10 Mar  8 08:53 scsi-SATA_WDC_WD1001FALS-0_WD-WCATR0371895-part5 -> ../../sda5
    lrwxrwxrwx 1 root root 10 Mar  8 08:53 scsi-SATA_WDC_WD1001FALS-0_WD-WCATR0371895-part6 -> ../../sda6
    lrwxrwxrwx 1 root root 10 Mar  8 08:53 scsi-SATA_WDC_WD1001FALS-0_WD-WCATR0371895-part7 -> ../../sda7
    lrwxrwxrwx 1 root root  9 Mar  8 17:58 scsi-SWD_My_Book_1230_WCC4E0023123 -> ../../sdb
    lrwxrwxrwx 1 root root  9 Mar  8 17:58 wwn-0x50014ee20909771a -> ../../sdb
    lrwxrwxrwx 1 root root  9 Mar  8 17:58 wwn-0x50014ee2aed3b3e4 -> ../../sda
    lrwxrwxrwx 1 root root 10 Mar  8 08:53 wwn-0x50014ee2aed3b3e4-part1 -> ../../sda1
    lrwxrwxrwx 1 root root 10 Mar  8 08:53 wwn-0x50014ee2aed3b3e4-part2 -> ../../sda2
    lrwxrwxrwx 1 root root 10 Mar  8 08:53 wwn-0x50014ee2aed3b3e4-part3 -> ../../sda3
    lrwxrwxrwx 1 root root 10 Mar  8 08:53 wwn-0x50014ee2aed3b3e4-part5 -> ../../sda5
    lrwxrwxrwx 1 root root 10 Mar  8 08:53 wwn-0x50014ee2aed3b3e4-part6 -> ../../sda6
    lrwxrwxrwx 1 root root 10 Mar  8 08:53 wwn-0x50014ee2aed3b3e4-part7 -> ../../sda7
    fdisk:
    Code:
    Disk /dev/sdb: 3000.6 GB, 3000558944256 bytes, 732558336 sectors
    Units = sectors of 1 * 4096 = 4096 bytes
    Sector size (logical/physical): 4096 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disk label type: dos
    Disk identifier: 0x00028375
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1             256   732558335  2930232320   83  Linux

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,786

    Default Re: Mounting ext4 usb disk by UUID doesn't work

    Can you please next time copy thepropmt, the command, the output and the next prompt in one sweep between the CODE tags. We now have only the output and a story on how you probably generated it.

    I do not know exactly where to start in analyzing this, but what triggers me is that you say you use tune2fs, but you never explained or proved that there is a file system of a type that can be handled by tune2fs (ext2/3/4) on the one partition you have.

    My suspicion is that there is no file system at all there. This would explain:
    • that fuse2fs does not do what you want;
    • there is no UUID at all for the file system detected by udev and thus several symlink entries are not created in /dev/disk/;
    • there is no popup from KDE asking you what to do with the file system.
    Henk van Velden

  3. #3
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Mounting ext4 usb disk by UUID doesn't work

    On 2014-03-08 17:16, Daliz wrote:
    >
    > OpenSUSE 13.1 64bit KDE
    >
    > I have a WD 3Tb USB3 disk that I cannot mount by UUID or ID. When I plug


    > sudo /usr/sbin/parted -l
    >
    > Code:
    > --------------------


    > Model: WD My Book 1230 (scsi)
    > Disk /dev/sdb: 3001GB
    > Sector size (logical/physical): 4096B/4096B
    > Partition Table: msdos
    >
    > Number Start End Size Type File system Flags
    > 1 1049kB 3001GB 3001GB primary type=83
    >
    > --------------------




    > fdisk:
    >
    > Code:
    > --------------------
    >
    > Disk /dev/sdb: 3000.6 GB, 3000558944256 bytes, 732558336 sectors
    > Units = sectors of 1 * 4096 = 4096 bytes
    > Sector size (logical/physical): 4096 bytes / 4096 bytes
    > I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    > Disk label type: dos
    > Disk identifier: 0x00028375
    >
    > Device Boot Start End Blocks Id System
    > /dev/sdb1 256 732558335 2930232320 83 Linux
    >
    > --------------------



    Er... 3TB, with an msdos partition table? What?

    That can not work. You need a GPT table instead. I don't know how you
    managed to create it, but it can not work.

    I know that gparted can create it (I tried recently), but then access fails.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" at Telcontar)

  4. #4
    Join Date
    Feb 2014
    Location
    Finland
    Posts
    30

    Default Re: Mounting ext4 usb disk by UUID doesn't work

    ^ okay that would explain it.

    It's been a while since I got the HD so I cannot remember exactly how it is created BUT there is data in it, and it works.
    I'll have to create the partition table and partition again, I guess.

    Also I just tried this with an ext4 8gb flash drive and it works, so it's probably the partition table that's the fault.

  5. #5
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Mounting ext4 usb disk by UUID doesn't work

    On 2014-03-08 19:26, Daliz wrote:
    >
    > ^ okay that would explain it.
    >
    > It's been a while since I got the HD so I cannot remember exactly how it
    > is created BUT there is data in it, and it works.
    > I'll have to create the partition table and partition again, I guess.


    Unfortunately, I don't think it is possible to keep the data in place.
    You will have to back it up somewhere else, create totally new GPT
    partition table, create filesystem, recover data from backup.


    > Also I just tried this with an ext4 8gb flash drive and it works, so
    > it's probably the partition table that's the fault.


    It is a strange thing you do not get a message in the log related to
    this. I'm very surprised that the MBR table says it contains a 3000 GB
    partition, I thought it was impossible. Maybe some tools can handle it,
    and some can not.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" at Telcontar)

  6. #6
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,674
    Blog Entries
    3

    Default Re: Mounting ext4 usb disk by UUID doesn't work

    Quote Originally Posted by robin_listas View Post
    I'm very surprised that the MBR table says it contains a 3000 GB
    partition, I thought it was impossible.
    That's not a problem, I think.

    With a 512B sector size, you cannot have MBR partitioning on a disk that large. But the disk has 4K logical sector size, which should allow going to around a 16T disk before the LBA addresses exceed 32 bits.
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

  7. #7
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Mounting ext4 usb disk by UUID doesn't work

    On 2014-03-08 21:56, nrickert wrote:
    >
    > robin_listas;2629386 Wrote:
    >> I'm very surprised that the MBR table says it contains a 3000 GB
    >> partition, I thought it was impossible.

    >
    > That's not a problem, I think.
    >
    > With a 512B sector size, you cannot have MBR partitioning on a disk that
    > large. But the disk has 4K logical sector size, which should allow
    > going to around a 16T disk before the LBA addresses exceed 32 bits.


    That could be, but read this paragraph in the wikipedia:

    > http://en.wikipedia.org/wiki/GUID_Pa...BR_.28LBA_0.29



    +++···························
    While the MBR layout (and also the protective MBR layout) was defined
    around a sector size of 512 bytes per sector, the actual sector size can
    be larger on various media such as MO disks or hard disks with Advanced
    Format. Extra space in the MBR typically remains unused.

    If the actual size of the disk exceeds the maximum partition size
    representable using the legacy 32-bit LBA entries in the MBR partition
    table, the recorded size of this partition is clipped at the maximum,
    thereby ignoring the rest of disk. This amounts to a maximum reported
    size of 2 TiB, assuming a disk with 512 bytes per sector (see 512e). It
    would result in 16 TiB with 4 KB sectors (4Kn), but since many older
    operating systems and tools are hard-wired for a sector size of 512
    bytes or are limited to 32-bit calculations, exceeding the 2 TiB limit
    would cause serious compatibility problems.
    ···························++-

    So, what I think is that some tools simply can not work with such a
    partition table.


    I got recently a new disk, 3 TB size. It has 4 KB sectors (512 logical).
    I initially formatted it as MBR with gparted. It attempted to do it, but
    at some point of the process it bailed out and said it was impossible
    (When creating the filesystem, I think).


    Maybe Ubuntu has a toolchain that allows it, whereas openSUSE does not :-?

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" at Telcontar)

  8. #8
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,674
    Blog Entries
    3

    Default Re: Mounting ext4 usb disk by UUID doesn't work

    Quote Originally Posted by robin_listas View Post
    I got recently a new disk, 3 TB size. It has 4 KB sectors (512 logical).
    I initially formatted it as MBR with gparted. It attempted to do it, but
    at some point of the process it bailed out and said it was impossible
    (When creating the filesystem, I think).
    If you were to mount that 3T disk in an external drive container, and access it via USB, you would probably find that it has a logical sector size of 4K. Or, at least, that's my experience with a 1T disk.
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

  9. #9
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Mounting ext4 usb disk by UUID doesn't work

    On 2014-03-09 02:16, nrickert wrote:
    >
    > robin_listas;2629417 Wrote:
    >> I got recently a new disk, 3 TB size. It has 4 KB sectors (512 logical).
    >> I initially formatted it as MBR with gparted. It attempted to do it, but
    >> at some point of the process it bailed out and said it was impossible
    >> (When creating the filesystem, I think).

    >
    > If you were to mount that 3T disk in an external drive container, and
    > access it via USB, you would probably find that it has a logical sector
    > size of 4K. Or, at least, that's my experience with a 1T disk.


    Let me see! You got me curious.


    On a USB dock:

    Code:
    gdisk:
    
    Found valid GPT with protective MBR; using GPT.
    Disk /dev/sde: 5860533168 sectors, 2.7 TiB
    Logical sector size: 512 bytes
    
    
    
    fdisk:
    
    Disk /dev/sde: 3000.6 GB, 3000592982016 bytes, 5860533168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes  <===
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk label type: dos
    
    
    hdparm -I /dev/sde
    
    Configuration:
    Logical         max     current
    cylinders       16383   16383
    heads           16      16
    sectors/track   63      63
    --
    CHS current addressable sectors:   16514064
    LBA    user addressable sectors:  268435455
    LBA48  user addressable sectors: 5860533168
    Logical  Sector size:                   512 bytes
    Physical Sector size:                  4096 bytes
    Logical Sector-0 offset:                  0 bytes
    device size with M = 1024*1024:     2861588 MBytes
    device size with M = 1000*1000:     3000592 MBytes (3000 GB)
    
    
    
    smartctl -a /dev/sde
    
    Sector Sizes:     512 bytes logical, 4096 bytes physical

    Directly via internal SATA dock:


    Code:
    fdisk:
    
    Disk /dev/sde: 3000.6 GB, 3000592982016 bytes, 5860533168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes  <===
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disk label type: dos
    
    
    gdisk:
    
    Found valid GPT with protective MBR; using GPT.
    Disk /dev/sde: 5860533168 sectors, 2.7 TiB
    Logical sector size: 512 bytes
    
    hdparm -I /dev/sde
    
    Configuration:
    Logical         max     current
    cylinders       16383   16383
    heads           16      16
    sectors/track   63      63
    --
    CHS current addressable sectors:   16514064
    LBA    user addressable sectors:  268435455
    LBA48  user addressable sectors: 5860533168
    Logical  Sector size:                   512 bytes
    Physical Sector size:                  4096 bytes
    Logical Sector-0 offset:                  0 bytes
    device size with M = 1024*1024:     2861588 MBytes
    device size with M = 1000*1000:     3000592 MBytes (3000 GB)

    Only fdisk is fooled, the rest of the tools keep saying the same things.


    I see above there is something there named "LBA48" which can address
    them all. Is that the normal LBA we use?


    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" at Telcontar)

  10. #10
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,674
    Blog Entries
    3

    Default Re: Mounting ext4 usb disk by UUID doesn't work

    Your disk enclosure must be fancier than mine. It is presumably handling the buffering for 512B logical sectors.

    Quote Originally Posted by robin_listas View Post
    I see above there is something there named "LBA48" which can address
    them all. Is that the normal LBA we use?
    That's probably what GPT partition tables use (48bit logical block addresses). With an MBR formatted disk, there's only space for 32bits.
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

Page 1 of 4 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •