Hey list. Here is another freaky parted bug from the realms of parted code :) I just ran into this and my analysis might be wrong, so suggestions and corrections are appreciated. Unfortunately this does not work with loop devices...
<snip> #!/bin/bash parted="/usr/local/sbin/parted" dd if=/dev/zero of=/dev/sdc bs=1M count=10 yes | mkfs.ext3 /dev/sdc $parted /dev/sdc print free </snip> And this is the output.... <snip> [r...@parted ~]# /home/parted/Misc/loopscript 10+0 records in 10+0 records out 10485760 bytes (10 MB) copied, 4.5149 s, 2.3 MB/s mke2fs 1.41.4 (27-Jan-2009) /dev/sdc is entire device, not just one partition! Proceed anyway? (y,n) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 125184 inodes, 500736 blocks 25036 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=515899392 16 block groups 32768 blocks per group, 32768 fragments per group 7824 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912 Writing inode tables: done Creating journal (8192 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 20 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. Model: JetFlash TS2GJFV30 (scsi) Disk /dev/sdc: 2051MB Sector size (logical/physical): 512B/512B Partition Table: loop Number Start End Size File system Flags 1 0.00B 2051MB 2051MB ext3 [r...@parted ~]# </snip> Notice the last part of the output where parted thinks that this has a loopback label. I realize that this might have a purpose, unfortunately I don't see it, can someone pls enlighten me!! >From my point of view there is no partition table in the device and should be treated as a case where we cannot detect the partition table type. Moreover the code tells me that we are detecting a loop label that satisfies one of two conditions: 1. The condition expressed above and 2. when the device has the "GNU Parted Loopback 0" string. To me these two situations seem rather exclusive and should not be treated in the same way. I'll keep investigating and get back to the list when I have more info. Any suggestions/explinations are greatly appreciated. Regards. -- Joel Andres Granados Brno, Czech Republic, Red Hat. _______________________________________________ parted-devel mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/parted-devel

