Nabeel Saad
2007-Nov-15 15:22 UTC
[zfs-crypto-discuss] cannot mount ''mypool'': Input/output error
Hello,
I have a question about using ZFS with Fuse. A little bit of background of what
we''ve been doing first... We recently had an issue with a Solaris
server where the permissions of the main system files in /etc and such were
changed. On server restart, Solaris threw an error and it was not possible to
log in, even as root.
So, given that it''s the only Solaris machine we have, we took out the
drive and after much trouble trying with different machines, we connected it to
Linux 2005 Limited Edition server using a USB to SATA connector. The linux
machine now sees the device in /dev/sda* and I can confirm this by doing the
following:
[root]# fdisk sda
Command (m for help): p
Disk sda (Sun disk label): 16 heads, 149 sectors, 65533 cylinders
Units = cylinders of 2384 * 512 bytes
Device Flag Start End Blocks Id System
sda1 1719 11169 11264400 2 SunOS root
sda2 u 0 1719 2049048 3 SunOS swap
sda3 0 65533 78115336 5 Whole disk
sda5 16324 65533 58657128 8 SunOS home
sda6 11169 16324 6144760 7 SunOS var
Given that Solaris uses ZFS, we figured to be able to change the permissions,
we''ll need to be able to mount the device. So, we found Fuse,
downloaded, installed it along with ZFS. Everything went as expected until the
creation of the pool for some reason. We''re interested in either sda1,
sda3 or sda5, we''ll know better once we can mount them...
So, we do ./run.sh & and then the zpool and zfs commands are available. My
ZFS questions come here, once we run the create command, I get the error
directly:
[root]# zpool create mypool sda
fuse: mount failed: Invalid argument
cannot mount ''mypool'': Input/output error
However, if I list the pools, clearly it''s been created:
[root]# zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
mypool 74.5G 88K 74.5G 0% ONLINE -
It seems the issue is with the mounting, and I can''t understand why:
[root]# zfs mount mypool
fuse: mount failed: Invalid argument
cannot mount ''mypool'': Input/output error
[root]# zfs mount
I had searched through the source code trying to figure out what argument was
considered invalid and found the following:
477 if (res == -1) {
478 /*
479 * Maybe kernel doesn''t support unprivileged mounts, in
this
480 * case try falling back to fusermount
481 */
482 if (errno == EPERM) {
483 res = -2;
484 } else {
485 int errno_save = errno;
486 if (mo->blkdev && errno == ENODEV &&
!fuse_mnt_check_fuseblk())
487 fprintf(stderr, "fuse: ''fuseblk''
support missing\n");
488 else
489 fprintf(stderr, "fuse: mount failed: %s\n",
490 strerror(errno_save));
491 }
492
493 goto out_close;
494 }
in the following file:
http://cvs.opensolaris.org/source/xref/fuse/libfuse/mount.c
I didn''t really understand what that was suggesting the issue was,
other than the comment saying "unprivileged mounts"... I looked on
http://docs.sun.com/app/docs/doc/819-2240/zfs-1m and found a command:
zfs allow [-ldug] "everyone" |user |group [,,....]
-[uge] "everyone" |user |group [,,....]
Specifies to whom the permissions are delegated. Multiple entities can be
specified as a comma-separated list. If none of the -uge options are specified,
then the argument is interpreted preferentially as the keyword ?everyone?, then
as a user name, and lastly as a group name. To specify a user or group named
everyone?, use the -u or -g options. To specify a group with the same name as a
user, use the -g options.
However, when I tried it, it was not recognized:
[root]# zfs allow
unrecognized command ''allow''
Any thoughts or suggestions would be much appreciated!
Thank you very much
This message posted from opensolaris.org
Darren J Moffat
2007-Nov-15 17:11 UTC
[zfs-crypto-discuss] cannot mount ''mypool'': Input/output error
Nabeel Saad wrote:> Hello, > > I have a question about using ZFS with Fuse. A little bit of background of what we''ve been doing first... We recently had an issue with a Solaris server where the permissions of the main system files in /etc and such were changed. On server restart, Solaris threw an error and it was not possible to log in, even as root. > > So, given that it''s the only Solaris machine we have, we took out the drive and after much trouble trying with different machines, we connected it to Linux 2005 Limited Edition server using a USB to SATA connector. The linux machine now sees the device in /dev/sda* and I can confirm this by doing the following:What has this got to do with the development of the ZFS Crypto functionality ? -- Darren J Moffat