[Linux-cluster] Loop Device on a GFS file

David Ramsthaler (dramstha) dramstha at cisco.com
Wed Jan 31 00:23:51 UTC 2007


 

Can anyone give me info on why a loop device on a gfs file is read-only?
A write() 

returns "operation not permitted".

 

-David

 

 

[root at cfs2 xdd]# ll /mnt/gfs/bigFile

-rw-r--r--  1 root root 1048576000 Jan 30 11:06 /mnt/gfs/bigFile

[root at cfs2 xdd]# losetup /dev/loop0 /mnt/gfs/bigFile

 

[root at cfs2 xdd]# mkfs -t ext3 /dev/loop0

mke2fs 1.35 (28-Feb-2004)

Warning: could not erase sector 2: Attempt to write block from
filesystem resulted in short write

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

128000 inodes, 256000 blocks

12800 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=264241152

8 block groups

32768 blocks per group, 32768 fragments per group

16000 inodes per group

Superblock backups stored on blocks: 

        32768, 98304, 163840, 229376

 

Warning: could not erase sector 0: Attempt to write block from
filesystem resulted in short write

mkfs.ext3: Attempt to write block from filesystem resulted in short
write while zeroing block 255984 at end of filesystem

Writing inode tables: 0/8

Could not write 8 blocks in inode table starting at 66: Attempt to write
block from filesystem resulted in short write

[root at cfs2 xdd]#

 

But the same setup works on a local file:

 

[root at cfs2 xdd]# ll /tmp/bigFile

-rw-r--r--  1 root root 314572800 Jan 29 16:50 /tmp/bigFile

[root at cfs2 xdd]# losetup -d /dev/loop0

[root at cfs2 xdd]# losetup /dev/loop0 /tmp/bigFile

[root at cfs2 xdd]# mkfs -t ext3 /dev/loop0

mke2fs 1.35 (28-Feb-2004)

Filesystem label=

OS type: Linux

Block size=1024 (log=0)

Fragment size=1024 (log=0)

76912 inodes, 307200 blocks

15360 blocks (5.00%) reserved for the super user

First data block=1

Maximum filesystem blocks=67633152

38 block groups

8192 blocks per group, 8192 fragments per group

2024 inodes per group

Superblock backups stored on blocks: 

        8193, 24577, 40961, 57345, 73729, 204801, 221185

 

Writing inode tables: done                            

Creating journal (8192 blocks): done

Writing superblocks and filesystem accounting information: done

 

This filesystem will be automatically checked every 22 mounts or

180 days, whichever comes first.  Use tune2fs -c or -i to override.

[root at cfs2 xdd]#

 

-David

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-cluster/attachments/20070130/ae700a3b/attachment.htm>


More information about the Linux-cluster mailing list