From mboxrd@z Thu Jan 1 00:00:00 1970 From: smiley@icebubble.org To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> References: <86zkecbc5d.fsf@cmarib.ramside> <20111229004856.731689ce@gmail.com> <20111230181551.2b46cb7f@gmail.com> Date: Mon, 2 Jan 2012 06:50:35 +0000 In-Reply-To: <20111230181551.2b46cb7f@gmail.com> (David du Colombier's message of "Fri, 30 Dec 2011 18:15:51 +0100") Message-ID: <86fwfy61j8.fsf@cmarib.ramside> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [9fans] p9p vac/vacfs compatibility: uid/gid, ctime, 9P2000.L, 9pserve Topicbox-Message-UUID: 52f656b2-ead7-11e9-9d60-3106f5b1d025 OK, I'm stumped. Maybe I'm making this more complicated than it has to be. Posing my question as simply as possible: If plan9port's vac is used to archive a Linux file system to venti, is there any way to access that file system in a way that exposes symbolic links, device nodes, sockets, and FIFOs in the archive? There are a number of possibilities I can think of (listed in approximate order of increasing obscurity): (1) plan9port's vacfs (2) plan9port's unvac (3) Netfiles (under acme) (4) plan9port's 9p command (5) Inferno I have a small "test" Linux filesystem with a mixture of regular files, directories, and character and block devices which I've archived (successfully!) using plan9port's vac. I can see the special files in the venti data. They're in there! But... (1) When using Linux's v9fs to mount a file system served by plan9port's vacfs, the symlinks and device nodes all stat as regular files. The file size of symlinks reflects the length of the link target, and the device files have a size of 3 bytes (for type, major, and minor). This happens whether or not I include version=9p2000.u or 9p2000.L as mount options. When I use 9pfuse to mount the file system, I get a little further: lrw-rw---- 1 root root 6 Mar 10 2005 video -> -rw-rw---- 1 root root 3 Mar 10 2005 video10 The symbolic links show up as links, but with the null string ("") as target. The Linux kernel interperets null symlinks to mean "./", causing all the links to refer to the directory in which they reside. :( The device files still present as ordinary files with a size of 3 bytes. Running "readlink" on the symbolic links always returns the null string. (2) plan9port's unvac explicitly skips extraction of files which are not regular files or directories. So, unvac-ing the archive isn't possible, either. :( (3) According to the Plan 9 wiki, Netfiles will only work with versions of OpenSSH older than the version I have. (4) The 9p utility provided by plan9port gets me access to a little more metadata. Using the 9p "ls" command: -Lrwxrwxrwx M 0 root root 5 Jan 2 03:16 modem D-rw-rw---- M 0 root disk 3 Mar 10 2005 hda You can see the symlink and device bits set in the mode. (The "D" represents a device node; "d" indicates a directory.) Using the 9p "stat" command: 'modem' 'root' 'root' '' q (0000000000000003 0 ) m 0200000777 at 1325474216 mt 1325474215 l 5 t 0 d 0 'tty3' 'root' 'tty' '' q (0000000000001528 0 ) m 040000660 at 1110476900 mt 1110476900 l 3 t 0 d 0 The targets of symlinks are still showing up as the null string. (I'm assuming that's what the '' represents.) (5) Installing Inferno just to access vac'd Linux file systems would really be tantamount to throwing up my hands and giving up on plan9port. I'd like use plan9port, if possible, rather than have to layer a whole new OS on top of Linux+p9p. So, I'm fresh out of ideas. Is there any way, at all, to present the full contents of a Linux filesystem that's been archived using the plan9port vac command? Thanks! -- +---------------------------------------------------------------+ |Smiley PGP key ID: BC549F8B | |Fingerprint: 9329 DB4A 30F5 6EDA D2BA 3489 DAB7 555A BC54 9F8B| +---------------------------------------------------------------+