5 Replies Latest reply: Oct 7, 2012 8:49 PM by 962822 RSS

    mount UFS under linux

    962822
      Hi

      I have a disk formated by solaris(sparc),but the host is crashed,the only chose for me is mount the disk under linux system(RHEL5.6).

      I have Upgraded the kernel,so Linux can recognize UFS.

      But when I try to mount the UFS disk with command :

      *[root@sgfsd055 log]# mount -t ufs -o ufstype=sun,ro /dev/sdc3 /mnt/*
      I got :

      mount: wrong fs type, bad option, bad superblock on /dev/sdc3,
      missing codepage or other error
      In some cases useful info is found in syslog - try
      dmesg | tail  or so
      When I cat /var/log/messages:

      Sep 18 21:17:14 sgfsd055 kernel: UFSD (fs/ufs/super.c, 645): ufs_fill_super:ENTER
      Sep 18 21:17:14 sgfsd055 kernel: UFSD (fs/ufs/super.c, 652): ufs_fill_super:flag 1
      Sep 18 21:17:14 sgfsd055 kernel: UFSD (fs/ufs/super.c, 336): ufs_parse_options:ENTER
      Sep 18 21:17:14 sgfsd055 kernel: UFSD (fs/ufs/super.c, 713): ufs_fill_super:ufstype=sun
      Sep 18 21:17:14 sgfsd055 kernel: ufs_read_super: fragment size 8192 is too large
      Sep 18 21:17:14 sgfsd055 kernel: UFSD (fs/ufs/super.c, 1102): ufs_fill_super:EXIT (FAILED)

      Any help please?
        • 1. Re: mount UFS under linux
          Dude!
          What is the output of:

          <pre>
          fdisk -l /dev/sdc
          </pre>
          • 2. Re: mount UFS under linux
            962822
            Thank you for your reply,fdisk -l output as below:

            [root@sgfsd055 ~]# fdisk -l

            Disk /dev/sda: 147.0 GB, 147086327808 bytes
            255 heads, 63 sectors/track, 17882 cylinders
            Units = cylinders of 16065 * 512 = 8225280 bytes

            Device Boot Start End Blocks Id System
            /dev/sda1 * 1 65 522081 83 Linux
            /dev/sda2 66 5287 41945715 83 Linux
            /dev/sda3 5288 7898 20972857+ 82 Linux swap / Solaris
            /dev/sda4 7899 17882 80196480 5 Extended
            /dev/sda5 7899 17882 80196448+ 83 Linux

            Disk /dev/sdb: 147.0 GB, 147086327808 bytes
            255 heads, 63 sectors/track, 17882 cylinders
            Units = cylinders of 16065 * 512 = 8225280 bytes

            Device Boot Start End Blocks Id System
            /dev/sdb1 * 1 17882 143637133+ 83 Linux

            Disk /dev/sdc (Sun disk label): 255 heads, 127 sectors, 60075 cylinders
            Units = cylinders of 32385 * 512 bytes

            Device Flag Start End Blocks Id System
            /dev/sdc3 u 0 60075 972764437+ 5 Whole disk
            /dev/sdc7 0 60075 972764437+ 4 SunOS usr

            Disk /dev/sdc3 (Sun disk label): 255 heads, 127 sectors, 60075 cylinders
            Units = cylinders of 32385 * 512 bytes

            Device Flag Start End Blocks Id System
            /dev/sdc3p3 u 0 60075 972764437+ 5 Whole disk
            /dev/sdc3p7 0 60075 972764437+ 4 SunOS usr

            Disk /dev/sdc7 (Sun disk label): 255 heads, 127 sectors, 60075 cylinders
            Units = cylinders of 32385 * 512 bytes

            Device Flag Start End Blocks Id System
            /dev/sdc7p3 u 0 60075 972764437+ 5 Whole disk
            /dev/sdc7p7 0 60075 972764437+ 4 SunOS usr

            Disk /dev/sdd (Sun disk label): 255 heads, 127 sectors, 58178 cylinders
            Units = cylinders of 32385 * 512 bytes

            Device Flag Start End Blocks Id System
            /dev/sdd3 u 0 58178 942047265 5 Whole disk
            /dev/sdd7 0 58178 942047265 4 SunOS usr

            Disk /dev/sdd3 (Sun disk label): 255 heads, 127 sectors, 58178 cylinders
            Units = cylinders of 32385 * 512 bytes

            Device Flag Start End Blocks Id System
            /dev/sdd3p3 u 0 58178 942047265 5 Whole disk
            /dev/sdd3p7 0 58178 942047265 4 SunOS usr

            Disk /dev/sdd7 (Sun disk label): 255 heads, 127 sectors, 58178 cylinders
            Units = cylinders of 32385 * 512 bytes

            Device Flag Start End Blocks Id System
            /dev/sdd7p3 u 0 58178 942047265 5 Whole disk
            /dev/sdd7p7 0 58178 942047265 4 SunOS usr

            Disk /dev/sde (Sun disk label): 255 heads, 127 sectors, 60707 cylinders
            Units = cylinders of 32385 * 512 bytes

            Device Flag Start End Blocks Id System
            /dev/sde3 u 0 60707 982998097+ 5 Whole disk
            /dev/sde7 0 60707 982998097+ 4 SunOS usr

            Disk /dev/sde3 (Sun disk label): 255 heads, 127 sectors, 60707 cylinders
            Units = cylinders of 32385 * 512 bytes

            Device Flag Start End Blocks Id System
            /dev/sde3p3 u 0 60707 982998097+ 5 Whole disk
            /dev/sde3p7 0 60707 982998097+ 4 SunOS usr

            Disk /dev/sde7 (Sun disk label): 255 heads, 127 sectors, 60707 cylinders
            Units = cylinders of 32385 * 512 bytes

            Device Flag Start End Blocks Id System
            /dev/sde7p3 u 0 60707 982998097+ 5 Whole disk
            /dev/sde7p7 0 60707 982998097+ 4 SunOS usr

            Disk /dev/sdf (Sun disk label): 255 heads, 127 sectors, 58178 cylinders
            Units = cylinders of 32385 * 512 bytes

            Device Flag Start End Blocks Id System
            /dev/sdf1 0 9 145732+ 2 SunOS root
            /dev/sdf2 u 9 18 145732+ 3 SunOS swap
            /dev/sdf3 u 0 58178 942047265 5 Whole disk
            /dev/sdf7 18 58178 941755800 4 SunOS usr

            Disk /dev/sdf1 (Sun disk label): 255 heads, 127 sectors, 58178 cylinders
            Units = cylinders of 32385 * 512 bytes

            Device Flag Start End Blocks Id System
            /dev/sdf1p1 0 9 145732+ 2 SunOS root
            /dev/sdf1p2 u 9 18 145732+ 3 SunOS swap
            /dev/sdf1p3 u 0 58178 942047265 5 Whole disk
            /dev/sdf1p7 18 58178 941755800 4 SunOS usr

            Disk /dev/sdf3 (Sun disk label): 255 heads, 127 sectors, 58178 cylinders
            Units = cylinders of 32385 * 512 bytes

            Device Flag Start End Blocks Id System
            /dev/sdf3p1 0 9 145732+ 2 SunOS root
            /dev/sdf3p2 u 9 18 145732+ 3 SunOS swap
            /dev/sdf3p3 u 0 58178 942047265 5 Whole disk
            /dev/sdf3p7 18 58178 941755800 4 SunOS usr

            Disk /dev/sdg (Sun disk label): 255 heads, 127 sectors, 58494 cylinders
            Units = cylinders of 32385 * 512 bytes

            Device Flag Start End Blocks Id System
            /dev/sdg3 u 0 58494 947164095 5 Whole disk
            /dev/sdg7 0 58489 947083132+ 4 SunOS usr

            Disk /dev/sdg3 (Sun disk label): 255 heads, 127 sectors, 58494 cylinders
            Units = cylinders of 32385 * 512 bytes

            Device Flag Start End Blocks Id System
            /dev/sdg3p3 u 0 58494 947164095 5 Whole disk
            /dev/sdg3p7 0 58489 947083132+ 4 SunOS usr

            Disk /dev/sdg7 (Sun disk label): 255 heads, 127 sectors, 58494 cylinders
            Units = cylinders of 32385 * 512 bytes

            Device Flag Start End Blocks Id System
            /dev/sdg7p3 u 0 58494 947164095 5 Whole disk
            /dev/sdg7p7 0 58489 947083132+ 4 SunOS usr

            Disk /dev/sdh (Sun disk label): 255 heads, 127 sectors, 58178 cylinders
            Units = cylinders of 32385 * 512 bytes

            Device Flag Start End Blocks Id System
            /dev/sdh3 u 0 58178 942047265 5 Whole disk
            /dev/sdh7 0 58178 942047265 4 SunOS usr

            Disk /dev/sdh3 (Sun disk label): 255 heads, 127 sectors, 58178 cylinders
            Units = cylinders of 32385 * 512 bytes

            Device Flag Start End Blocks Id System
            /dev/sdh3p3 u 0 58178 942047265 5 Whole disk
            /dev/sdh3p7 0 58178 942047265 4 SunOS usr

            Disk /dev/sdh7 (Sun disk label): 255 heads, 127 sectors, 58178 cylinders
            Units = cylinders of 32385 * 512 bytes

            Device Flag Start End Blocks Id System
            /dev/sdh7p3 u 0 58178 942047265 5 Whole disk
            /dev/sdh7p7 0 58178 942047265 4 SunOS usr

            Disk /dev/sdi (Sun disk label): 255 heads, 127 sectors, 57577 cylinders
            Units = cylinders of 32385 * 512 bytes

            Device Flag Start End Blocks Id System
            /dev/sdi3 u 0 57577 932315572+ 5 Whole disk
            /dev/sdi7 0 57576 932299380 4 SunOS usr

            Disk /dev/sdi3 (Sun disk label): 255 heads, 127 sectors, 57577 cylinders
            Units = cylinders of 32385 * 512 bytes

            Device Flag Start End Blocks Id System
            /dev/sdi3p3 u 0 57577 932315572+ 5 Whole disk
            /dev/sdi3p7 0 57576 932299380 4 SunOS usr

            Disk /dev/sdi7 (Sun disk label): 255 heads, 127 sectors, 57577 cylinders
            Units = cylinders of 32385 * 512 bytes

            Device Flag Start End Blocks Id System
            /dev/sdi7p3 u 0 57577 932315572+ 5 Whole disk
            /dev/sdi7p7 0 57576 932299380 4 SunOS usr

            Disk /dev/sdj (Sun disk label): 255 heads, 127 sectors, 58810 cylinders
            Units = cylinders of 32385 * 512 bytes

            Device Flag Start End Blocks Id System
            /dev/sdj3 u 0 58810 952280925 5 Whole disk
            /dev/sdj7 0 58810 952280925 4 SunOS usr

            Disk /dev/sdj3 (Sun disk label): 255 heads, 127 sectors, 58810 cylinders
            Units = cylinders of 32385 * 512 bytes

            Device Flag Start End Blocks Id System
            /dev/sdj3p3 u 0 58810 952280925 5 Whole disk
            /dev/sdj3p7 0 58810 952280925 4 SunOS usr

            Disk /dev/sdj7 (Sun disk label): 255 heads, 127 sectors, 58810 cylinders
            Units = cylinders of 32385 * 512 bytes

            Device Flag Start End Blocks Id System
            /dev/sdj7p3 u 0 58810 952280925 5 Whole disk
            /dev/sdj7p7 0 58810 952280925 4 SunOS usr

            Disk /dev/sdk (Sun disk label): 255 heads, 127 sectors, 58264 cylinders
            Units = cylinders of 32385 * 512 bytes

            Device Flag Start End Blocks Id System
            /dev/sdk3 u 0 58264 943439820 5 Whole disk
            /dev/sdk7 0 58264 943439820 4 SunOS usr

            Disk /dev/sdk3 (Sun disk label): 255 heads, 127 sectors, 58264 cylinders
            Units = cylinders of 32385 * 512 bytes

            Device Flag Start End Blocks Id System
            /dev/sdk3p3 u 0 58264 943439820 5 Whole disk
            /dev/sdk3p7 0 58264 943439820 4 SunOS usr

            Disk /dev/sdk7 (Sun disk label): 255 heads, 127 sectors, 58264 cylinders
            Units = cylinders of 32385 * 512 bytes

            Device Flag Start End Blocks Id System
            /dev/sdk7p3 u 0 58264 943439820 5 Whole disk
            /dev/sdk7p7 0 58264 943439820 4 SunOS usr

            Disk /dev/sdl (Sun disk label): 255 heads, 127 sectors, 59442 cylinders
            Units = cylinders of 32385 * 512 bytes

            Device Flag Start End Blocks Id System
            /dev/sdl3 u 0 59442 962514585 5 Whole disk
            /dev/sdl7 0 59442 962514585 4 SunOS usr

            Disk /dev/sdl3 (Sun disk label): 255 heads, 127 sectors, 59442 cylinders
            Units = cylinders of 32385 * 512 bytes

            Device Flag Start End Blocks Id System
            /dev/sdl3p3 u 0 59442 962514585 5 Whole disk
            /dev/sdl3p7 0 59442 962514585 4 SunOS usr

            Disk /dev/sdl7 (Sun disk label): 255 heads, 127 sectors, 59442 cylinders
            Units = cylinders of 32385 * 512 bytes

            Device Flag Start End Blocks Id System
            /dev/sdl7p3 u 0 59442 962514585 5 Whole disk
            /dev/sdl7p7 0 59442 962514585 4 SunOS usr
            [root@sgfsd055 ~]#
            • 3. Re: mount UFS under linux
              Nik
              Hi.

              Check that kernel support UFS (CONFIG_UFS_FS=m and CONFIG_UFS_FS_WRITE=y).

              Original disk from Solaris SPARC or x86 ?
              ( Use option sun for SPARC and sunx86 for Solaris x86)


              Regards.
              • 4. Re: mount UFS under linux
                Dude!
                From what I can gather, the default Linux kernel does not have UFS support enabled. However, you can see the disk label and partitions, so I'm not sure. If either ufstype=sun or sunx86 does not work, I suggest to put the disk in the original machine and try copy the data using tar or network access.
                • 5. Re: mount UFS under linux
                  962822
                  Thank you for your reply,Nik and Dude.

                  I have upgrade the kernel already.


                  ==========
                  File systems --->
                  │ │ Miscellaneous filesystems ---> │ │


                  │ <*> UFS file system support (read only) │ │
                  │ │ [*] UFS file system write support (DANGEROUS) │ │
                  │ │ [*] UFS debugging │ │


                  currently the kernel version is 2.6.27.62

                  regards.