I'm having trouble mounting an EXT2 partition, and am not sure what else to try. On my FreeNAS (FreeBSD 9.2) lab device, I have a ZFS pool with two zvols (zvol1 and zvol2). I have shared these with iSCSI to a Linux machine (CentOS 6.4). The Linux machine sees these as /dev/sdb and /dev/sdc.
Using the Linux machine, I have formatted /dev/sdb with an EXT2 filesystem, directly to the device (no partitioning). If I then make a snapshot on the NAS, I can mount that snapshot with
However, with /dev/sdc, I have labelled and partitioned it with a msdos/primary partition, then formatted /dev/sdc1 with EXT2. If I make a snapshot of that zvol, I can see two new block devices: /dev/zvol/pool/zvol2@snap and /dev/zvol/pool/zvol2@snaps1. I guessed that these represented the 'disk' and the 'partition', and that *s1 is the partition, but when I run
A
...but the output of
So if that *s1 block device is not the partition, what is it, where is my EXT2 partition's block device, and what should I actually be doing to mount the filesystem within FreeBSD?
(Note that I have also tried with a clone of the snapshot, with the same result)
Using the Linux machine, I have formatted /dev/sdb with an EXT2 filesystem, directly to the device (no partitioning). If I then make a snapshot on the NAS, I can mount that snapshot with
mount -r -t ext2fs /dev/zvol/pool/zvol1@snap /tmp/zvol1
. All well and good.However, with /dev/sdc, I have labelled and partitioned it with a msdos/primary partition, then formatted /dev/sdc1 with EXT2. If I make a snapshot of that zvol, I can see two new block devices: /dev/zvol/pool/zvol2@snap and /dev/zvol/pool/zvol2@snaps1. I guessed that these represented the 'disk' and the 'partition', and that *s1 is the partition, but when I run
mount -r -t ext2fs /dev/zvol/pool/zvol2@snaps1 /tmp/zvol2
, it fails with "Invalid argument". dmesg
additionally shows:
Code:
ext2fs: zvol/vol01/zvol2@snaps1: wrong magic number 0 (expected 0xef53)
A
gpart show
of the snapshot clearly shows the Linux partition:
Code:
=> 63 16777153 zvol/pool/zvol2@snap MBR (8.0G)
63 193 - free - (96k)
256 2096896 1 linux-data (1G)
2097152 14680064 - free - (7.0G)
...but the output of
file -s
suggests I am wrong about what that *s1 block device actually is:
Code:
# file -s /dev/zvol/pool/zvol1@snap
/dev/zvol/pool/zvol1@snap: Linux rev 1.0 ext2 filesystem data (mounted or unclean), UUID=a756aca7-470d-47d2-a021-97b904aa2f5b (large files)
# file -s /dev/zvol/pool/zvol2@snap
/dev/zvol/pool/zvol2@snap: x86 boot sector; partition 1: ID=0x83, starthead 4, startsector 256, 2096896 sectors, code offset 0xb8
# file -s /dev/zvol/pool/zvol2@snaps1
/dev/zvol/pool/zvol2@snaps1: data
So if that *s1 block device is not the partition, what is it, where is my EXT2 partition's block device, and what should I actually be doing to mount the filesystem within FreeBSD?
(Note that I have also tried with a clone of the snapshot, with the same result)