I have some disks that were being used on a Solaris system. The disks are formatted as UFS. I attached them to a Debian system (with FreeBSD kernel. Debian/kFreeBSD), but I cannot mount them.

$ mount -t ufs /dev/da2s1 /mnt/diska
mount: /dev/da2s1 : Invalid argument

Also the tunefs.ufs does not work;

$ tunefs.ufs -p /dev/da2s1
tunefs.ufs: /dev/da2s1: could not read superblock to fill out disk

Is there an incompatibility between FreeBSD UFS and Solaris UFS? Is it possible to mount one, under the other OS ?

Note: tunefs.ufs works on the root partition

$ tunefs.ufs -p /dev/da7s2
tunefs.ufs: ACLs: (-a)                                         disabled
tunefs.ufs: MAC multilabel: (-l)                               disabled
tunefs.ufs: soft updates: (-n)                                 disabled
tunefs.ufs: gjournal: (-J)                                     disabled
tunefs.ufs: maximum blocks per file in a cylinder group: (-e)  2048
tunefs.ufs: average file size: (-f)                            16384
tunefs.ufs: average number of files in a directory: (-s)       64
tunefs.ufs: minimum percentage of free space: (-m)             8%
tunefs.ufs: optimization preference: (-o)                      time
tunefs.ufs: volume label: (-L) 

FreeBSD UFS2 and Solaris UFS, while sharing some original structure have somewhat diverged so I'm unsure freeBSD can mount it. Was your UFS file system properly unmounted ?

EDIT: Also, if the file system was created on SPARC hardware, it won't be mountable on x86 as the format is architecture dependent.

  • I mounted and unmounted under solaris but it did not work. I also wanted to try read-only UFS code in Linux, but it alse gave errors. I guess solaris UFS is very lonely :-/ – hayalci Dec 30 '10 at 22:24
  • Also, the UFS was created on x86 hardware. – hayalci Jan 7 '11 at 10:09
  • Most Gnu/Linux distributions should be able to directly mount in read-only mode an ufs slice created on Solaris running on x86 hardware. eg: "mount -r /dev/sdb5 /mnt". – jlliagre Jan 7 '11 at 12:57

Did you halted the solaris system without the unmount?

As far as I know you can safely mount a cleanly-unmounted Solaris UFS, otherwise it's really a layout compatibility issue. I'd try to do the same also with a recent GNU/Linux kernel

  • I have tried explicitly mounting and umounting the disks. But I still get the same message. I tried mounting in Ubuntu, but It gave an error message about superblock's magic number(can't remember exact message) – hayalci Dec 27 '10 at 19:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.