ipcs provides information on ipc facilities for which you have read access.
Resource Specification:
-m : shared_mem
-q : messages
-s : semaphores
-a : all (default)
Output Format:
-t : time
-p : pid
-c : creator
-l : limits
-u : summary
-i id [-s -q -m] : details on resource identified by id
usage : ipcs -asmq -tclup
ipcs [-s -m -q] -i id
ipcs -h for help.
New version:
Usage: ipcs [resource]... [output-format]
ipcs [resource] -i id
Provide information on IPC facilities for which you have read access.
-h display this help
-i id print details on resource identified by id
Resource options:
-m shared memory segments
-q message queues
-s semaphores
-a all (default)
ipcs: get rid of colons from header strings for consistency
This changes output of -u, -l, and -c.
Example of non consistent output:
$ ipcs -u | grep ^---
------ Shared Memory Status --------
------ Semaphore Status --------
------ Messages: Status --------
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
Petr Uzel [Fri, 21 May 2010 13:19:31 +0000 (15:19 +0200)]
mount: detect when kernel silently adds MS_RDONLY flag
Linux kernel can silently add MS_RDONLY flag when mounting file system that
does not have write support. Check this to avoid 'ro' in /proc/mounts and 'rw'
in mtab.
[kzak@redhat.com: - don't check for 'ro' for MS_MOVE and MS_PROPAGATION]
Reported-by: James Foris <jim.foris@med.ge.com> Signed-off-by: Petr Uzel <petr.uzel@suse.cz> Signed-off-by: Karel Zak <kzak@redhat.com>
Petr Uzel [Fri, 21 May 2010 12:18:31 +0000 (14:18 +0200)]
umount: do not sync() as the kernel does it by itself
On Fri, May 21, 2010 at 08:00:09AM -0400, Christoph Hellwig wrote:
> On Fri, May 21, 2010 at 01:55:17PM +0200, Petr Uzel wrote:
> > SUSE-based distributions have the following patch for some time. More
> > info here: https://bugzilla.novell.com/show_bug.cgi?id=447036
> >
> > From the Novell bugzilla:
> > <quote>
> > > I cannot see any justification for that sync call at all so I'd
> > > probably just remove it. Your
> > > patch is possibly safer so maybe it should be used as is.
> > </quote>
> >
> > So, does anybody know why/if the sync() is actually needed?
>
> It's not needed. The kernel performs a sync by itself.
Karel Zak [Tue, 18 May 2010 10:13:48 +0000 (12:13 +0200)]
libblkid: improve MD 0.90 detection
We don't have to check for collision between partition table and RAID
on all RAIDs. This problem is specific to MD, where underlying device
could be a partition. The RAIDs like via, intel, ... always use
whole-disks only.
Karel Zak [Fri, 14 May 2010 10:02:57 +0000 (12:02 +0200)]
blkid: add 'export' output format
This output format is similar to 'udev' but without udev specific
prefixed (e.g. ID_FS_*). The 'export' format is automatically enabled
for I/O Limits (-i).
Karel Zak [Fri, 7 May 2010 12:12:26 +0000 (14:12 +0200)]
cfdisk: support non-ascii characters in input
On Sat, Apr 03, 2010 at 12:58:48PM +0000, Jorge wrote:
> When you want to write changes to disk you're asked for a
> confirmation, like this one:
>
> Are you sure you want to write the partition table to disk? (yes
> or no)
>
> There is no problem on the English version, but when you launch the
> program in Spanish you get this:
>
> ¿Está seguro de que desea escribir la tabla de particiones en el
> disco?
> (sí o no):
>
> You can't type the "í" character. Trying to do so will end in no
> input at all. That is, typing in my keyboard "´" then "i" leads to
> nothing. So you can't write changes to disk, and you must launch the
> program in English for it to operate.
Reported-by: Jorge <yo@jorgesuarezdelis.name>
Addresses: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/205327 Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 28 Apr 2010 12:40:46 +0000 (14:40 +0200)]
fdisk: improve 'move begin of partition' command
The 'b' command ("move beginning of data in a partition")
implementation is too restricted. For example:
Device Boot Start End Blocks Id System
/dev/sdb1 2048 22527 10240 83 Linux
....
Partition number (1-4): 1
New beginning of data (2048-22527, default 2048):
^^^^^^^^^^
the range is defined by the current partition size. New version:
Partition number (1-4): 1
New beginning of data (1-22527, default 2048):
^^^^^^^
allows to move the begin to arbitrary place if the place is not
allocated by any other partition. This is useful for people who don't
want to use the default partitioning (1MiB offset, 1MiB grain).
The 'b' command is expert command and does not force users to use an
aligned LBA (fdisk(8) still prints warning (in 'p' command) if any
partition is not aligned to the physical sector boundary).
Karel Zak [Tue, 27 Apr 2010 15:12:50 +0000 (17:12 +0200)]
tests: explicitly use --chunk and --metadata in MD test
The newer mdadm version uses a different chunk size and superblock
format, so the final MD device has a different I/O limits (optimal I/O
size is 1MiB for 1.20 metadata).
We have to explicitly use the same format which is expected in our tests.
Reported-by: Yulia Kopkova <ykopkova@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Thu, 22 Apr 2010 19:30:04 +0000 (21:30 +0200)]
libblkid: fix collision between RAID and PT probing
The RAID signature is usually at end of the block device. We have to
differentiate between:
- RAID signature at the end of disk, and
- RAID signature at the end of the last partition
The position of the signature is same in both cases... It means we have
to the parse partition table and check if the area where is RAID signature
is covered by any partition. If yes, then the RAID signature belongs to the
partition and has to be ignored during whole-disk probing.
The second problem are RAID1 underlaying disks (=raid members). The
RAID device could be partitioned, in such a case the partition table
is visible from underlaying devices. These partition tables has to be
ignored. The libblkid ignores partition tables on raid members now.
Note that all these changes are implemented for blkid_do_safeprobe()
only. The others functions allow to access all detected superblocks or
partition tables.
Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=543749 Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 21 Apr 2010 12:24:52 +0000 (14:24 +0200)]
liblkid: export magic strings from raids
The library provides detected magic strings by SBMAGIC= and offsets of
the magic strings by SBMAGIC_OFFSET= variables. This patch allows to
support this feature for RAIDs and filesystems where the magic string
is not on fixed position.